Jump to content
Changes to the Jaspersoft community edition download ×

How to handle dynamic fieldsets in a report?


subha_iwov

Recommended Posts

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

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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_UUID
FROM 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...