Create and Publish Jaspersoft Studio Reports

ccppmop1591
Use Jaspersoft Studio Professional to connect to Advanced Reporting to create, download, upload, and publish reports. You need a report developer user and a server connection to connect to Advanced Reporting. You can also create data adapters in Jaspersoft Studio to test report queries.
Complete the following procedures as prerequisites for developing reports. The article assumes that you have successfully installed Jaspersoft Studio Professional.
 
 
2
 
 
Create an Advanced Reporting Developer User
Create a report developer user who can log in to Jaspersoft Studio directly. Users that you create in Jaspersoft from 
Classic PPM
 are created with an encrypted password and are maintained by 
Classic PPM
. You cannot use this type of user for report development in Jaspersoft Studio. You need a user that is not maintained by 
Classic PPM
. The report developer user has no more rights than the Advanced Reporting administrator user in 
Classic PPM
, but can connect through Jaspersoft Studio.
 
Follow these steps:
 
  1. Log in to 
    Classic PPM
     as a user with Advanced Reporting administration rights.
  2. Click 
    Home
    ,
    Advanced Reporting
    .
  3. Click 
    Manage
    Users
     and then click 
    Add User
    .
  4. Enter the user name and password information (for example, report_developer). 
  5. To add the user to your organization, click 
    Add User to org
    .
    The report developer user is created. Do not use this user to log in to
    Clarity
    .
    The following image shows the Add User dialog for creating a report developer user in Jaspersoft:
    The image shows the Add User dialog for creating a report developer user in Jaspersoft
  6. Click 
    Edit
     on the right side of the properties page. 
  7. Locate the 
    ROLE_ADMINISTRATOR
     role, click the right arrow to assign the permission, and click 
    Save
    .
    The ROLE_ADMINISTRATOR role grants permission to modify and administer Advanced Reporting items in your organization.
    The following image shows the Properties window where you assign ROLE_ADMINISTRATOR permissions to the report developer user.
     
    The image shows the Properties window where you can assign the ROLE_ADMINISTRATOR permissions to the report developer user.
     
 Due to a known Jaspersoft issue, the Roles Available list might not include all roles or roles might not appear correctly. Resize the browser application window until the scroll bar appears. Once the scroll bar appears, scroll down to ROLE_ADMINISTRATOR. If you still do not see the scroll bar after resizing the window, type ROLE_ADMINISTRATOR in the search box and click the magnifier (search) icon. The known issue can also cause the roles to be listed multiple times.
Set Up the JasperReports Server Connection
 
Follow these steps:
 
  1. In 
    Classic PPM
    , click 
    Administration
    System Options
    . Set up the Advanced Reporting Server URL and Organization ID. See Configure General System Settings.
  2. In Jaspersoft Studio, in the Repository Explorer, right-click 
    Servers
     and select 
    Create JasperReports Server Connection
    .
  3. Complete the following information:
    •  
      Name
      Defines the name for the server connection (for example, Advanced Reporting Test Environment).
    •  
      URL
      Defines the Advanced Reporting Server URL exactly as it is defined in 
      Classic PPM
      .
    •  
      Organization
      Defines the Organization ID exactly as it is defined in 
      Classic PPM
      .
    •  
      User
      Defines the report developer user name.
    •  
      Password
      Define the report developer user password.
  4. Click 
    Test.
     
  5. Click 
    Finish
    .
    The following image shows the JasperReports Server Access Configuration window.
 
image2019-1-2_8-41-47.png
 
 If the connection is unsuccessful, verify that the report developer user exists and the password is correct. Also verify that the URL and Organization values are correct. For Jaspersoft 7.1, ensure the 
Use SOAP Protocol Only
 option is not selected. Expand 
Advanced Settings
 to select that option and click 
Test Connection
.
A 401 error is displayed, if the 
Use SOAP Protocol Only
 option is checked, as shown below:
image2018-11-29_14-54-22.png
Create a Simple Report
You installed Jaspersoft Studio, created a report developer user, and configured a data adapter and a server connection. Now, you can create reports in Advanced Reporting. 
 
Follow these steps:
 
  1. In Jaspersoft Studio, select 
    File
    New
    Jasper Report
    .
    The New Report Wizard displays the report templates page.
  2. Select a template (for example, 
    Blank A4
    ) and click 
    Next
    .
    The New Report Wizard displays the report file page.
  3. Select a local folder to save the report and provide a file name with the 
    .jrxml
     extension. Avoid spaces and special characters when creating the JRXML file. 
  4. Click 
    Next
    .
    The New Report Wizard displays the data source page.
  5. Select the 
    One Empty Record - Empty rows
     data adapter for now. You can change it later.
  6. Click 
    Next
     and then click 
    Finish
    .
    Jaspersoft Studio generates the report and opens it in the Design area. You can work locally designing the report, adding fields, and other elements from the palette. You can also use the DataSet and Query editor dialog in the upper-right corner of the Design area to add and test the report query. In the dialog, you can select the most appropriate data adapter and can test your report query against a database.
    The following image shows the DataSet and Query editor dialog option:
 
The image shows the DataSet and Query editor dialog option
 
! We recommend that you do not develop reports in Jaserpersoft Studio using domains as a data source because it can severely impact performance. SQL is the preferred language for developing reports in Jaspersoft Studio.
For more details about the DataSet and Query editor dialog and other options for developing reports in Jaspersoft Studio, see Recommended Jaspersoft Training.
Video: Create a Report in Jaspersoft Studio
 

 
Create a Report Unit
Create a report unit by publishing a report to Advanced Reporting using the JRXML file previously created. A report unit contains the following items:
  • Main JRXML file
  • Input controls and other controls
  • Report resource bundles
  • Data sources
  • References to resources such as sub reports
 The data source is not the same as the data adapter. The data adapter is only necessary when you are running the report in Jaspersoft Studio locally in your client system. You can associate the report to a data source from the repository when you publish it.
Publish a Report
 
Follow these steps:
 
  1. In Jaspersoft Studio, open the report (JRXML file).
  2. Click 
    Publish Report to JasperReports Server
     in the upper-right corner of the Design area.
    The Report Publishing Wizard opens.
  3. Select the server and location where you want to publish the report. Avoid publishing reports under the 
    Classic PPM
     folder.
  4. Select 
    Create Report Unit
     if it is not already selected.
  5. Complete the following information:
    •  
      Report Unit Label
      Defines the report name that displays in the repository and when you search the library in Advanced Reporting.
    •  
      Report Unit Name (ID)
      Defines the report internal ID. Provide an ID that does not contain spaces and special characters. We also recommend that you prefix the ID with your company initials. You cannot modify the ID later.
    •  
      Report Unit Description
      Optional. Defines the report description that displays in the repository and when you search the library in Advanced Reporting. Provide meaningful keywords that can be helpful when searching for reports.
  6. Click 
    Next
    .
    The Select Resources to Publish window opens.
  7. Select Ignore from the drop-down instead of Overwrite for all resources included in the window.
  8. Click 
    Next
    .
    The Configure the data source window opens.
  9. Select Data Source from Repository.
  10. Navigate to the
    Clarity
    /Data Sources folder and select one of the following options:
    • Clarity
      BEAN for the transactional database
    • Clarity
      DWH BEAN for the Data Warehouse
    Select a data source even if the following message appears: "There is a problem with selected Datasource which is not valid". The message disappears when you select the correct data source.
  11. Click 
    Finish
    .
    The report is uploaded to the server. A "Successful!" message displays if there are no errors.
  12. Click 
    OK
    .
Add Resources to the Report
Add resources such as filter options to the report you previously published. You need the 
Advanced Reporting - Administer
 access right to complete this procedure.
 
Follow these steps:
 
  1. In 
    Classic PPM
    , click 
    Home
    Advanced Reporting
    .
  2. Select 
    View
    Repository
  3. Navigate to the folder where the report is located.
  4. In the Repository, right-click the report and select 
    Edit
    .
    The Set Up the Report page displays.
  5. Click 
    Controls & Resources
    . Click one of the following links:
    • Add Resource to add resources from the repository such as report bundles.
    • Add Input Control to add input controls from the repository.
  6. Click 
    Submit
    .
You do not need to publish the report every time you edit it. Once you have created the report unit, you can simply upload the JRXML file from Jaspersoft Studio instead of publishing the report. You can also upload a local JRXML file from the Set Up the Report page when editing the report in Advanced Reporting. However, the report server does not validate the JRXML file when you upload it. Use Jaspersoft Studio to validate the JRXML before uploading it. 
For more details about input controls and other resources for developing reports in Jaspersoft Studio, see Recommended Jaspersoft Training.
Create a Parent Report with Child Subreports
You can create a parent report and add child subreports to it. The following procedure uses the Project Storyboard report as an example. The Project Storyboard report is included with the Advanced Reporting content that is installed with the PMO Accelerator add-in.
 
Follow these steps
:
 
 
3
 
3
 
 
Download the Main and Subreports JRXML
 
Follow these steps:
 
  1. In Jaspersoft Studio, in the Repository Explorer, expand Servers and the server connection.
  2. Navigate to the
    Clarity
    /Reports/Project Management folder and expand the Project Storyboard report.
    The resources in the report unit display.
  3. Right-click Main jrxml and select Download To File as shown in the following image.
    The Save As window opens.
    The following image shows the Main jrxl file and the Download to File option.
    The image shows the Main jrxl file and the Download to File option
     
  4. Select a folder and provide a file name without spaces and special characters (for example, My_ProjectStoryboard.jrxml). We recommend that you prefix your report names with your company initials.
  5. Click 
    OK
    .
    Jaspersoft Studio saves the report JRXML file in your local folder and opens it in the editor.
  6. In the 
    Project Storyboard
     report folder, right-click the 
    Project Storyboard Earned Value Analysis
     subreport and select 
    Download To File
    .
  7. Select a folder and keep the file name that is already provided, replacing CSK with your company initials (for example, My_PRJ_ProjectStoryboard_EVAnalysis_Subreport.jrxml).
  8. Click 
    OK
    .
    Jaspersoft Studio saves the report JRXML file in your local folder and opens it in the editor.
  9. In the Project Storyboard report folder, right-click the 
    Project Storyboard Issues
     subreport and select 
    Download To File
    .
  10. Select a folder and keep the file name that is already provided, replacing CSK with your company initials (for example, My_PRJ_ProjectStoryboard_Issues_Subreport.jrxml).
  11. Click 
    OK
    .
    Jaspersoft Studio saves the report JRXML file in your local folder and opens it in the editor.
Now that you downloaded the source files for the main report and its sub reports, you have all the source files open in the editor and saved in your local folder. Use these copies to create your own version of the Project Storyboard report.
Create Report Unit for Main Report
Create a report unit to run the report from Advanced Reporting. The report unit contains the main JRXML file, references to sub reports used by the main report, input controls, report bundles, and other controls. The report unit also contains the data source that is used by the report. The data source is not the same as the data adapter. When you publish a report, you associate it to a data source from the repository. The data adapter is only necessary when you are running the report in Jaspersoft Studio locally in your client system.
 
Follow these steps:
 
  1. In Jaspersoft Studio, verify that you have all the report source files open in the editor and saved in your local folder.
  2. Select the tab where the main report is open.
  3. Select 
    Outline
     and click the report name at the top level of the hierarchy.
    The Properties tab displays the report properties.
  4. Select 
    Properties
    Report 
    and then change the report name by replacing CSK with your company initials. Keep the resource bundle as CSK.
    The following image shows the Properties tab displaying the report properties.
    The image shows the Properties tab displaying the report properties
     
  5. Select 
    Outline
     and expand 
    GroupDetail Group Footer 1
     until the subreport elements appear.
    The following image displays the 
    GroupDetail Group Footer 1
     subreport elements.
    The image displays the GroupDetail Group Footer 1 sub report elements
     
  6. Click the first subreport.
    The subreport properties appear.
  7. Navigate to the first subreport element properties and change the expression replacing CSK with your company initials.
  8. Repeat the steps to change the expression for the second subreport.
  9. Save your changes locally. If, for some reason, the 
    Save
     option is not available, navigate to the Source tab in the designer area and try to save the report. If you are still unable to save the report, make a small change in the report source and click 
    Save
     from the toolbar. The report is saved when the 
    *
     in front of the report tab name disappears.
    The message 
    Do you want to publish this report to JasperReports Server?
     appears.
  10. Click 
    No
    .
  11. Click 
    Publish Report to JasperReports Server
     in the upper-right corner of the Design area.
    The Report Publishing Wizard opens.
  12. Select the server and location where you want to publish the report. Avoid publishing reports under the 
    Classic PPM
     folder.
    The following image shows the Publish Report to JasperReports Server window.
    The image shows the Publish Report to JasperReports Server window
     
  13. Select 
    Create Report Unit
     if it is not already selected.
  14. Complete the following information:
    •  
      Report Unit Label
      Defines the report name that displays in the repository and when you search the library in Advanced Reporting.
    •  
      Report Unit Name (ID)
      Defines the report internal ID. Provide an ID that does not contain spaces and special characters. We recommend that you not prefix the ID with your company initials. You cannot modify the ID later.
    •  
      Report Unit Description
      Optional. Defines the report description that displays in the repository and when you search the library in Advanced Reporting. Provide meaningful keywords that can be helpful when searching for reports.
  15. Click 
    Next
    .
    The Select Resources to publish window opens.
  16. Select Ignore from the drop-down instead of Overwrite for all resources included on the window.
  17. Click 
    Next
    .
    The Configure the data source window opens.
  18. Select Data Source from Repository.
  19. Navigate to the
    Clarity
    /Data Sources folder and select CA_PPM_DWH_BEAN for the Data Warehouse. Select the data source even if the following message appears: "There is a problem with selected Datasource which is not valid". The message disappears when you select the correct data source.
    The following image shows the Configure the data source window where you select a data source.
    The image shows the Configure the data source window where you select a data source.
     
  20. Click 
    Finish
    .
    The report is uploaded to the server. A "Success!" message appears if there are no errors.
  21. Click 
    OK
    .
    The following image shows the message that appears when resources are published successfully on the JasperReports Server.
    The image shows the message that appears when resources are published successfully on the JasperReports Server
     
At this point, the Project Storyboard report unit exists in Advanced Reporting. However, it does not include the subreports.
Add Subreports to Main Report Unit
Change the subreport names and upload them using the JRXML files that you previously downloaded.
 
Follow these steps:
 
  1. In Jaspersoft Studio, verify that you have all the report source files open in the editor and saved in your local folder.
  2. Select the tab where the first subreport is open.
  3. Select Outline and click the report name at the top level of the hierarchy.
    The report properties appear.
  4. Select Properties, Report, and change the report name by replacing CSK with your company initials. Keep the resource bundle as CSK.
  5. Save your changes locally.
    The message 
    Do you want to publish this report to JasperReports Server?
     appears.
  6. Click 
    No
    .
  7. Repeat the steps to change the name for the second sub report.
  8. In the 
    Repository Explorer
    , expand 
    Servers
     and the server connection.
  9. Navigate to the folder where your copy of the Project Storyboard report is located (the one you published previously).
    The resources in the report unit appear.
  10. Right-click the report unit folder and select 
    New
    .
    The following image shows an example of a Project Storyboard report folder.
    The image shows an example of a Project Storyboard report folder
     
  11. Select 
    JRxml
    .
  12. Click 
    Next
    .
    The 
    Add Resource
     wizard appears.
  13. Complete the following information:
    •  
      Name
      Defines the name of the sub report as an internal name that does not display in the repository.
    •  
      ID
      Defines the sub report internal ID used by the main report when it calls the sub report. Provide an ID that does not contain spaces and special characters. We recommend that you prefix the ID with your company initials. You cannot modify the ID later.
    •  
      Description
      Optional. Defines the sub report description as an internal description that does not display in the repository.
  14. Click 
    Next
    .
    The Report file window opens.
  15. Select 
    Upload from File System
     from the drop-down list.
  16. Click 
    Finish
    .
  17. Repeat the steps in this procedure for the Project Storyboard Issues sub report.
The report unit with the main and sub reports is now created.
 We recommend that you do not publish reports that include sub reports from Jaspersoft Studio. To modify reports that include sub reports. Download them to your local system and then upload the updated JRXML files. Follow this practice for both the main and the sub reports.
Add Resources to a Report
Add resources such as filter options to the reports that you previously created. For example, the Project Storyboard report uses localized input controls and hence requires the report resource bundle. You require the Advanced Reporting - Administer right to complete the following procedure.
  1. In 
    Classic PPM
    , click Home, Advanced Reporting.
  2. Select View, Repository. 
  3. Navigate to the folder where the report is located.
  4. In the Repository, right-click the report and select Edit.
    The Set Up the Report page displays.
  5. Click Controls & Resources.
  6. Click Add Resource and then click the 
    select a resource from the Repository
     option.
  7. Click Browse and navigate to
    Clarity
    /Resources/Localization.
  8. Scroll down until you find Report Resource Bundle.
  9. Select Report Resource Bundle and click Next.
  10. Provide a name and resource ID (for example, CSK_Report_Resource_Bundle).
  11. Click Next.
  12. Click Submit.
  13. Repeat these steps to add other resources such as input controls.
  • To learn more about the input controls and other resources that are used for developing reports in Jaspersoft Studio, see Recommended Jaspersoft Training.
  • To learn more about the input controls used by the Project Storyboard report, see the Advanced Reporting Product Guide on CA Support.
Tips for Creating and Publishing Reports
  • Make sure that you keep a backup copy of the JRXML files you create or modify. Store these copies in a source control tool or any other system or collaboration tool that you use to control source code.
  • Some input controls, such as Project, Investment, Resource, have dependencies on other input controls. They are cascading input controls. These input controls require that all dependencies are added to the report.
  • The $R{} expression that is used in input control names is for localization purposes. Do not use the $R{} expression in your input controls unless you want them localized to other languages.
  • The keyword included in the $R{} expression is available in the Report Resource Bundle and for this reason the base Report Resource Bundle should be associated to a report that includes at least one input control referencing the $R{} expression. The Report Resource Bundle is also required if the report itself contains $R{} expressions to display labels.
  • The base Report Resource Bundle contains labels in English. Report Resource Bundles from other languages that 
    Classic PPM
     supports are available under the
    Clarity
    /Resources/Localization folder. You can add extra report resource bundles to your report unit to support other languages.
  • If a report unit is corrupted, a 
    java.lang.Exception: Attachment not present!
     error appears. The error occurs more often with reports that are published from Jaspersoft Studio and contain subreports. In some versions, this message also appears after you first publish a new report. To resolve the error, follow these steps:
    1. Upload the main JRXML file and the corresponding JRXML files of each subreport that is associated to the main report.
    2. If this is a new report that you just published, publish the report again a second time.
Jaspersoft Report Page Limits
The 
Classic PPM
 
Classic PPM
page where you generate a report determines the maximum number of pages for very large reports:
 
Classic PPM
 Release:
Application Page:
Method:
Page Limit
14.2 and newer
Advanced Reporting
Run or Export (Save As)
500
Schedule a Report
1,000
15.3 or newer
Reports and Jobs
Run Immediately or Schedule
1,000