How can we show parameters for the report or Ad hoc view in the report itself?
Many customers ask the question: “How can we show parameters for the report or Ad hoc view in the report itself?” and recently one of our solutions consultant engineer came up with this POC project for a prospect and I thought this would be very helpful for all Jaspersoft customers.
Please follow the steps listed below to display report parameters for each resource type Charts, Crosstabs and Tabular data in reports and ad hoc views. As this was a POC for another customer, this is not fully tested.
Note: Please ensure that you have done thorough testing before publishing this to production.
Download and install the "adhocparams-0.0.2-SNAPSHOT.jar" file.
You need to download the Jar file attached to this Wiki.
Installation:
After download, extract the jar file and drop adhocparams-0.0.2-SNAPSHOT.jar file into the Tomcat/webapps/jasperserver-pro/WEB-INF/lib/ and restart the Tomcat Application server.
And, then login to Jasper server and import downloaded exportTemplate.Zip file
Importing "exportTemplate.zip" into Jasper Reports Server:
Usage, when you want to create a report from an Adhoc View, use the template /public/templates/ShowParameters:
This template works for Tables, Crosstabs and Charts.
The only behavior you might run into is that when you have filters with many values inside, the Chart, Table, and Crosstab could be starting in Page 2.
As you see on the screenshot, the parameters values do not cover the entire page because it is predefined to be printed on a document:
Hope this helps some customers!
Recommended Comments
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