Subreport is again a separate query and that results are given to the main query for further condition applied to the main query. Subreport is used when there is no direct relation or in some complex requirements. Whereas Join condition is used when we have the direct relationship with the table.
@java2architect8 ай бұрын
I want to simply include everyting in subreport without doing in join. I can't seem to do that for some reason. I want to reuse report. It is giving me say 4 rows. Then later I want to filter additionally in main report to get it down to 2 rows. Why can I simply not get everythign in subreport into main report first? There is no join condition i have to specify between main report and sub report. But Pega will not save my configuration and insisting on one.
@pegaforlife31548 ай бұрын
In Pega, sub-reports allow you to include results from any report definition (including a report definition defined on a different Applies To class) in another report definition. However, it seems like you’re having trouble including everything from a sub-report into the main report without specifying a join condition. Here are some things you might want to consider: Sub-report Configuration: Each sub-report should be configured properly before you can refer them to your main report. This includes setting up the sub-report result count, column inclusion, join condition, column alias, and parameters. Join Condition: While it might seem counter-intuitive, a join condition is often necessary to establish a relationship between the main report and the sub-report. This is similar to how a sub-query works in SQL, where the sub-query is used to return data that will be used in the main query as a condition to further restrict the data to be retrieved. Alternative Approach: If there’s no common column to join on, one workaround could be to create a calculated field that extracts the common values from the columns you want to establish a match on, and then use those calculated fields to join together. Remember, the configuration of your sub-report and the relationship between your main report and sub-report can greatly affect the results of your report. If you’re still having trouble, I would recommend checking the Pega community forums or reaching out to Pega Support for more specific guidance. Hope this helps! 😊
@java2architect8 ай бұрын
@@pegaforlife3154 Actually Sub-Reports do not quite work as generic subqueries. In other words Select * From (Select * from SubReport) is not possible in Pega. Pega often makes "Reuse" a 4 letter word like "Pega" itself. Totally not worth the time. Copy Paste Modify works.