subha_iwov Posted December 15, 2008 Share Posted December 15, 2008 I have a requirement where depending on user input parameter 2 different tables are queried. But the resultset for the tables vary by 2 fields. How can I handle this. Is there a way by which I can disable or hide fields in a report. I tried having a boolean expression for PrintWithExpression properties in both field header and field value.Also Checked the option "Remove line when blank" for both field header and field value.And also Checked the option "Blank when null" for field value.Still I get the error:com.jaspersoft.jasperserver.api.JSExceptionWrapper: Unknown column name : DEP_UUID......Here DEP_UUID is the column name which is not present in the query resultset. I want to have this column because I want to show it for a differnt query based on user input.This is very much necessary for me. I am a beginner with iReport and have been struggling on this for a while. May be I am missng some basic knowledge. Could anyone please come forward to help me.Thanks,Subha Link to comment Share on other sites More sharing options...
subha_iwov Posted December 17, 2008 Author Share Posted December 17, 2008 Any help on this please.Thanks,Subha Link to comment Share on other sites More sharing options...
crusty_collins Posted December 17, 2008 Share Posted December 17, 2008 Maybe this will help... Use a print when function and make sure your fields are named the same. select a,b,c,"nothing" as d from db select a,b,"n" as c,"nothing" as d from db Then do a print when expression new Boolean($F{c}.equals("n") ? "False" : "True") Link to comment Share on other sites More sharing options...
mdahlman Posted December 17, 2008 Share Posted December 17, 2008 Subha, It sounds like you have a query problem to fix before you look at how to setup the print when expression. Modify your queries so that they both return the same fields. You may need something like this: SELECT COL1 ,COL2 ,'dummy value' as DEP_UUIDFROM mytable Once you have the queries working well, then worry about printing only what you want. Regards,Matt Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now