Question

Main report displaying all rows from sub report even after restricting the sub report records to max 1 row
We want to create a report which shows all the workobjects along with only the last updated pulse comment. For this i have created sub report on class PegaSocial-Message with pagination disabled and max record set to 1. When i am executing this sub report i am just getting the last updated pulse comment row. But when i execute this as sub report via the parent report i get multiple records for pulse for that workobject.
***Edited by Moderator: Pallavi to update FDBK ID***
-
Like (0)
-

How have you configured the sub-report in the main report? If you include it as a column in the main RD, you will see that the single pulse comment is mapped as a column for each row in the main RD.

As you will configure a sub-report under data access tab. The column has been included from the sub report (having max rows to 1) to show the pulse comment. If there are multiple pulse posts in a work object it is still showing all the pulse comments with repeating rows of the parent report rows instead of the last pulse comments.

I don't think the main report will consider the max rows to 1 of sub report. Instead, we can get all the rows by joining the subreport and as you need only the latest pulse post needs to be displayed we can use the Top Ranked option to display the latest pulse post for each case.
This will work if the main report has only 2 columns. Please find the below screenshot for more details.

Since it is a report it has more than 2 columns, so your suggestion for top rank doesn’t work here. I am curious why main report will not honor the max 1 record define in sub report? Is this a bug? What other options do I have other than creating a property and explicitly also inserting the pulse content in this property. This should have been ideally handled via sub report instead of customization.

I think the max 1 record is for display in that particular report only. As we are joining it is considering all records which we are querying.

I agree, I think the max records is not applied to the report query, and that is the result set you are joining to.

Please review the article at the link below:
It details how and when to use sub-reports. I think one of the example scenarios described may match what you are trying to do. I.e., instead of trying to use max records in the sub-report (which will not affect the query), you will probably end up doing a summary type report for the sub-report, using the MAX summarize function to get (only) the latest pulse note, and joining to that.

Thank for your suggestions, This issue has been acknowledge by GCS and will be taken up as product enhancement.
Hello Virendra,
Could you please share the FDBK ID so that we can connect it with the post?
Thanks,
Pallavi M | Moderator | Pega Collaboration Center