Jump to content

Show Hide Report Columns based on parameter passed


nairit91

Recommended Posts

I have created a jrxml report in Jaspersoft Studio. I have declared a report parameter "showRef_id" of type String with default value as "N". I'm now trying to control show/hide of the column Reference Id in the report based on the value of the parameter.

To achieve the above what i did is selecting the whole table first and then selecting the particular column "Reference Id". I then navigated to column properties -> Cell -> print when expression and used the following expression:

$P{showRef_id} = "N" ? true : false

Then when i'm trying to generate the report or trying to obtain a preview of the same, it is encountering a compilation error. Is there anyway in which i can achieve show/hide of report columns based on paramter conditions passed. I have tried declaring the parameter as boolean and even integer but unfortunately no good luck.

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...