Affects Version/s: 6.1.10 EE GA1, 6.1.20 EE GA2
Allow the ability to store a parameter value with a comma delimited list when creating a definition in the Reports Portlet.
- Create jasper report template with a parameter of type java.util.List
- Deploy reports-portlet
- Go to Control Panel -> Reports Admin
- Go to Sources tab -> Add Source -> fill out the necessary database information, Save
- Go to the Definitions tab -> Add Report Definition
- Choose the Data Source previously created, upload the template created in Step 1, and fill in the key and comma delimited values for value, Save
- Go to the Definitions tab -> click on Actions on the definition you have just created -> Add Report -> Generate
- Go to Reports tab -> click on the link (Definition Name) on the report you have just created.
- Click on Actions on the file -> Download to view the report.
A use example would be, for sports we want to be able to receive all the players names for a certain basketball team and active date range.
- name (List of basketball Teams)
- startDate (start of the active date)
- endDate (end of the active date)
So now the report would be able to retrieve all players for a list of basketball team names with a date range dynamically, whether it be one basketball team name or a list of them.
And this example is very similar to a report for finance where a non-technical user can enter a name for a finance account and a date range, receive the data from all the finance accounts the user has entered.
Originally it wasn't possible to put in a list of values so you would have to setup "basketballTeamName1", "basketballTeamName2", ... of definition parameters or generate single separate reports for each basketball team, but now since it's a list, its dynamic. Now it can be "basketballTeamNames" (list type, one or many, comma delimited): we can now generate a report that will return to us all the players in the list of basketball team names, dynamically all in one report.