Custom AOR_Report.php

hi team, is there a way to customize AOR_report.php to limit the number of rows displayed.

regards

Hey there,

So, unfortunately, it seems as though the AOR_Reports functionality isn’t currently capable of being fully extended, like other modules:
https://community.suitecrm.com/t/customisation-for-reports-aor-reports/72917/7
https://community.suitecrm.com/t/custom-changes-to-aor-report-php/58493/2

So, I can’t immediately think of a way to do this, and make it be upgrade-safe…


However, if you still want to make this change, you can modify the section you have highlighted.

For example, create a new line in your config_override.php file, like so:

$sugar_config['report_list_max'] = '5';

Then, in the section that you have highlighted, modify it like so:

image
( I have commented out the previous If/else statement, and created a new one that uses our new config_override value)

This should limit reports to the value that you have entered in config_override.php, (in this instance: 5)

And, as we don’t modify the “list_max_entries_per_page” value, it won’t affect the number of items displayed on Module Listviews.


However, I’d like to stress again that this would not be upgrade-safe, and there is a chance that the code is overwritten upon upgrading

1 Like

I’ve learned a few tricks since those posts you linked :wink:

This kind of thing should probably work also for Reports module upgrade-safe customization:

Of course, you’ll have to adapt that example to the AOR_Reports module, making sure to get all the names correctly.

2 Likes

Ah, very cool!
Much appreciated!

Thank you very much John, I think I will have to make those changes and take it for a future update