Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Using join filters to combine data in reports

Updated on September 18, 2020

Save time and enhance the process of creating reports by referencing data from other reports. You can use another report as a filter to include or exclude specific data in your report.

The report that you reference becomes a subreport, which means that it provides data to your main report. By using join filters, you can reference report definitions from multiple classes. For example, in a financial report of the company, you can include a subreport with a property that fetches the most recent expenses of employees. This approach provides a way to filter the contents of the main report to display how the recent expenses affect the company budget.
Before you begin: Create a report definition to use as a subreport. For more information, see Creating advanced reports.
  1. In the navigation pane of Dev Studio, click Records, and then click ReportsReport definition.
  2. In the list of report definitions, click the report definition that you want to use as the main report.
  3. On the Query tab, in the Edit columns section, define the contents of your main report.
    For more information, see Report definitions.
  4. Add the subreport to your main report:
    1. On the Data Access tab, in the Sub-reports section, click Add sub-report.
    2. In the Prefix field, enter a unique alias for the subreport that you want to reference in the main report.
      The system uses prefixes to reference correct subreports.
      For example: Enter SUBREPORT1
    3. In the Class name field, specify the class to which the subreport applies.
    4. In the Name field, select the subreport.
  5. Define how you want the subreport to function:
    1. Click Configure, and at the top of the Configure sub-report use dialog box, specify how many rows from the subreport to display.
      For example: Select More than 1 row if you want to fetch address data that includes multiple rows, such as the city name or postal code.
    2. Optional: To specify which fields in the main report reference the subreport data, in the Where will you use this sub-report? section, select a specific check box.
      For example: Select the Columns to include check box to reference the data in the Edit columns section of the Query tab.
      By default, the Right hand side of the filter conditions check box is selected.
  6. In the How will you join rows in the reports? section, specify the join conditions:
    1. Click Add join condition.
    2. In the Sub-report column list, select the subreport property that you want to match with the main report.
      For example: Select Label.
    3. In the Value field, select a property of the main report that matches the subreport property.
    4. In the Do not match rows list, select how the system joins data.
      For example: Select Include only matching rows from both reports to fetch matching records from the subreport and the main report.
    5. Click Submit.
  7. In the upper-right corner of the report definition, click Save.
What to do next: Perform a test-run of the report by clicking ActionsRun.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us