I have a requirement in JasperReports wherein I need to display the field based on a user’s configuration. If the field is visible to the user then display the field else the field will be hidden. Can anybody please suggest me the solution for this?
Share
You can use the
parameterfor setting condition to hide the field or not.The one way is to set
parameterwith help of JasperReports API.The sample code for setting parameter and building report:
The snippet of the report template (jrxml file):