# Dynamic Configuration of Maximum number of rows to retrieve for a specific Report definitions

**URL:** <https://forums.pega.com/t/dynamic-configuration-of-maximum-number-of-rows-to-retrieve-for-a-specific-report-definitions/1768>\
**Category:** General\
**Tags:** reporting, financial-services, pega-platform, lead-system-architect\
**Created:** [September 30, 2021, 12:51am UTC](https://forums.pega.com/t/dynamic-configuration-of-maximum-number-of-rows-to-retrieve-for-a-specific-report-definitions/1768 "2021-09-30T00:51:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![SVAQuest](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/svaquest/32/7150_2.png) [@SVAQuest](https://forums.pega.com/u/SVAQuest)\
**Post date:** [September 30, 2021, 12:51am UTC](https://forums.pega.com/t/dynamic-configuration-of-maximum-number-of-rows-to-retrieve-for-a-specific-report-definitions/1768/1 "2021-09-30T00:51:43Z")

</div>

Hi All,

What are the different option to configure the “Maximum number of rows to retrieve” for the specific Report definition?

The default was set to 500 in Design Studio → Reporting Setting & Data access tab of the Report Definition.

RULE-ADMIN-SYSTEM-SETTINGS PEGA-RULESENGINE PYMAXRECORDS (Default is 500) - This configuration will impact all the Report definition in the application

Do we have any DSS or System setting for Dynamic Configuration of “Maximum number of rows to retrieve” for the specific report definition?

What will default count if the RULE-ADMIN-SYSTEM-SETTINGS PEGA-RULESENGINE PYMAXRECORDS is set to null? What can have the largest impact on the performance in this context?

Any suggestion?

Regards

SVA Quest

---

<div class="post-metadata">

**Author:** ![Deivit](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/deivit/32/182_2.png) [@Deivit](https://forums.pega.com/u/Deivit)\
**Post date:** [September 30, 2021, 2:42am UTC](https://forums.pega.com/t/dynamic-configuration-of-maximum-number-of-rows-to-retrieve-for-a-specific-report-definitions/1768/2 "2021-09-30T02:42:58Z")

</div>

@SVAQuest I think there is no DSS to set the .pyMaxRecords for a single Report Definition.

If you want to change the .pyMaxRecords value, you can change it in the pagination option. If you set it, for example, to 10, it will change the .pyMaxRecords (see the xml attachment).

Change to 25 and you will see that the .pyMaxRecords will change (see the attachments).

Although this will force you to use pagination.

_You can always try the “Display N rows overall …” option 😃_

btw, I don’t know what will happen if it’s set to null, and I don’t want to. You can try modifying the rule directly using the obj- method.

 ![DisplayNrows.png](https://pega1.discourse-cdn.com/pega/original/2X/a/adef90d53e9c28fc0039c1d720d46c7707f94093.png)

 ![Pagination_10.png](https://pega1.discourse-cdn.com/pega/original/2X/3/315070f3f3ec989d90a1595c9ee7c3b6ae17ba1c.png)

 ![pyMaxRecords_xml_with_pagination_10.png](https://pega1.discourse-cdn.com/pega/original/2X/6/656c4b5c9ea4ed7d5e14a62bc9968c541c0414fe.png)

 ![pyMaxRecords_xml_with_pagination_25.png](https://pega1.discourse-cdn.com/pega/original/2X/4/4a110777e7a63b68b819e28aa14a3f3bc569f396.png)

---

<div class="post-metadata">

**Author:** ![Nirmalya.SenSharma](https://avatars.discourse-cdn.com/v4/letter/n/8dc957/32.png) [@Nirmalya.SenSharma](https://forums.pega.com/u/Nirmalya.SenSharma)\
**Post date:** [September 30, 2021, 7:12am UTC](https://forums.pega.com/t/dynamic-configuration-of-maximum-number-of-rows-to-retrieve-for-a-specific-report-definitions/1768/3 "2021-09-30T07:12:29Z")

</div>

@SVAQuest

The OOTB logic to figure out the max row to return is as following -

```auto
If (pyReportParamPageName.pyMaxRecords != "")

   Max Record = pyReportParamPageName.pyMaxRecords

ElseIf (Max No. Record specified in Report Def)

   Max Record = Max No. Record specified in Report Def

Otherwise
   Max Record = @getRuleSystemSetting("Pega-RulesEngine","pyMaxRecords")

```

Look at Step 12 and 30 of OOTB activity pxRetrieveReportData.

Structure of pyReportParamPageName page can be found here:

> **[Pegasystems Documentation](https://docs.pega.com/bundle/archive/page/archive/topics/archive-directory.htmlreporting/86/more-about-report-definition-rules)**

---

<div class="post-metadata">

**Author:** ![SVAQuest](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/svaquest/32/7150_2.png) [@SVAQuest](https://forums.pega.com/u/SVAQuest)\
**Post date:** [October 5, 2021, 7:10am UTC](https://forums.pega.com/t/dynamic-configuration-of-maximum-number-of-rows-to-retrieve-for-a-specific-report-definitions/1768/4 "2021-10-05T07:10:34Z")

</div>

Hi @Deivit

Thanks for the details.

And I also opted the paginations, did not get any option to configure max records dynamically in Report definition.

Regards  
SVAQuest

---

<div class="post-metadata">

**Author:** ![SVAQuest](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/svaquest/32/7150_2.png) [@SVAQuest](https://forums.pega.com/u/SVAQuest)\
**Post date:** [October 5, 2021, 7:44am UTC](https://forums.pega.com/t/dynamic-configuration-of-maximum-number-of-rows-to-retrieve-for-a-specific-report-definitions/1768/5 "2021-10-05T07:44:50Z")

</div>

Hi @Nirmalya.SenSharma

Thanks for the details.

If pxRetrieveReportData activity is customized, this may impact the entire application whenever this activity is called.

I am looking to update n max record for different Report definitions.

Regards  
SVAQuest

---

<div class="post-metadata">

**Author:** ![Nirmalya.SenSharma](https://avatars.discourse-cdn.com/v4/letter/n/8dc957/32.png) [@Nirmalya.SenSharma](https://forums.pega.com/u/Nirmalya.SenSharma)\
**Post date:** [October 6, 2021, 6:13am UTC](https://forums.pega.com/t/dynamic-configuration-of-maximum-number-of-rows-to-retrieve-for-a-specific-report-definitions/1768/6 "2021-10-06T06:13:46Z")

</div>

@SVAQuest You don’t even need to customize the pxRetrieveReportData activity.

You just need to create pyReportParamPageName page with required information prior to calling pxRetrieveReportData activity.

Thanks
