Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-28737

Add ability to support a list type parameter in the reports portlet

    Details

      Description

      Allow the ability to store a parameter value with a comma delimited list when creating a definition in the Reports Portlet.

      1. Create jasper report template with a parameter of type java.util.List
      2. Deploy reports-portlet
      3. Go to Control Panel -> Reports Admin
      4. Go to Sources tab -> Add Source -> fill out the necessary database information, Save
      5. Go to the Definitions tab -> Add Report Definition
      6. 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
      7. Go to the Definitions tab -> click on Actions on the definition you have just created -> Add Report -> Generate
      8. Go to Reports tab -> click on the link (Definition Name) on the report you have just created.
      9. 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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: