You can define a report on a class that includes data from descendant classes by using the Report on descendant class instances option in Report Definitions. Prior to Pega 7.2, only one descendant class could be included when you used the implementation class mapping. When you select the Report on descendant class instances option in Pega 7.2, a new option, Include all descendant classes, is displayed. You can use this option to include the data from all the descendant classes of the report’s primary class.
If you want only a subset of descendant classes, you can add a single filter condition on the pxObjClass property of the class to determine the subset of descendant classes to include.
If the descendant classes included in the report are mapped to multiple class tables, the autogenerated SQL for the report query uses UNIONs to include this data.
The performance of a report that combines results from multiple class tables is likely to be poor if the relevant database columns (those involved in filters, sorting, and other related activities) are not appropriately indexed.
Additional notes and limitations
- Reports created prior to Pega 7.2 retain the older behavior of not including multiple descendant classes and only using the implementation class mapping. The new Include all descendant class instances option must be selected for these reports, and the reports must be resaved to include multiple descendant classes in the reports.
- New reports created in the Pega 7.2 Designer Studio default to the new Include all descendant class instances option.
- The template reports that are provided with the Pega 7 Platform from which new reports are created in the Report Browser and Report Viewer (pyDefaultReport and pyDefaultSummaryReport), also default to the new Include all descendant class instances option. If you created custom template reports for some application classes, you must change these reports to enable the new option in reports created in the Report Browser for these classes.
- When you drill down from a summary report to a list report, the descendant class option specified on the summary report overrides the option specified in the drill down report so that drill-down results are consistent with those of the summary report.
- If it is not possible to include results from multiple class tables in a drill-down report because referenced properties are not optimized in all those tables, the drill-down report shows only partial results by automatically reverting to the pre-Pega 7.2 option of including results from only a single class using the implementation class mapping.