Support Article
ListView returning wrong total count when Enable Paging checked
SA-36607
Summary
ListView returning wrong total count when Enable Paging checked.
Suppose the page size is given as 'X'. Then pxTotalResultCount is showing a maximum value of X*10 in the clipboard irrespective of the number of records displayed.
Error Messages
Not Applicable
Steps to Reproduce
1. Create a list view and check the enable paging option.
2. Provide a page size (suppose 'X') to specify number of records to be shown per page.
When List view is run the property pxTotalResultCount should give the count of total records fetched. Instead it is showing a maximum value of X*10.
Root Cause
Under Paging Properties, if Page mode is set to 'Numeric', pxTotalResultCount value is (Number of records per page) X (number of pages).
If pxTotalResultCount is used, the count is loaded only once and for the first page, value retrieved is total records.
But from the second page onwards, value is 0. This is the expected behavior.
Resolution
Perform the following local-change:
- Instead of using pxTotalResultCount, use pyTotalResultCount under LISTVIEW_<reportname>.pyPagingParams whose value remains the same on page.
- Under Paging Properties, change Page Mode to 'Next Previous' or 'DropDown'. ('Numeric' mode does not work).
The property pyTotalResultCount will fetch the desired value when page mode is either "Next-Previous" or "Drop-Down", even when clicked on different pages.
Published May 4, 2017 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.