Collapse Submit a Service Request Contact Information for Technical SupportMy Service Notifications
Custom Scripts Run After Report Execution
Answer ID 10247 | Last Review Date 10/04/2018
Why don't the Record Count & Pages areas update when I run a custom script using unset()?
Reports, Custom Scripts, All Sites
A report shows an inaccurate Record Count & Page Count, which does not correspond with the actual number of records displayed by the report.
In a report which has a custom script the order of operations is: first the report runs populating both the "Records" & "Pages" areas. After this happens, the custom script executes.
If you have a custom script which uses the unset() function, it hides the rows as specified at this time. What it does not do is remove the rows from the report. Therefore, the Records & Pages areas are not effected by this function. This behavior is as-designed so we generally recommend using filters rather than scripting to reduce results returned in reports.