How to call a subreport inside a subreport of report defination?

“Is there a way to include subreports within subreports? When we attempt to use a report definition for a subreport which already contains a subreport we get a validation error to prevent this.”

Hi @Venkatk17188855,

Pega is not accepting this type of approach because the main report might struggle to determine the final data layout and size when subreports contain further subreports. This can lead to errors during the report validation stage. Nested subreports can quickly become complex and difficult to manage. Imagine troubleshooting data flow and formatting issues across multiple layers of subreports.

However, there are alternative approaches to achieve similar results without nested subreports:

Analyze your reports and see if you can restructure the information hierarchy. Can you combine the data retrieved by the inner subreport into the parent report’s dataset, eliminating the need for nesting?

If the inner subreport relies on data from the outer report’s context, consider passing relevant parameters to the inner subreport. This allows the inner report to filter or manipulate its data based on the outer report’s information.

Instead of nesting, you can have the main report contain multiple subreports side-by-side or stacked. Each subreport can then focus on a specific aspect of the data, achieving a similar outcome to nested reports.

Regards,

Sai G

@Venkatk17188855

Hello,

Using a sub-report within another sub-report isn’t supported in PEGA due to its operational mechanisms. If you only require data, consider using a class join in PEGA instead.

I hope this solution helps you. Thank you.

@Venkatk17188855

  1. Did you trying using ranking to get the most recent record?
    1. Define main report on A
    2. Define two sub reports for report on A
    3. Sub report 1 is defined on B. In that report use ranking to get the data for the most recent record based on the data in A
    4. Sub report 2 is defined on C. In that report use ranking to get the data for most recent record based on the data returned in B.