nairit91 Posted July 3, 2017 Share Posted July 3, 2017 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 : falseThen 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 More sharing options...
reportdev Posted July 3, 2017 Share Posted July 3, 2017 If you would like to hide the entire column based on a parameter, then you should use a table element.Check this post in which i have posted the sample jrxmlhttp://community.jaspersoft.com/questions/1046016/how-dynamically-hide-columns-table 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