Discussion
Report Definition - pagination for data retrieval
In a Report Definition, we are joining 2 tables, Patient and CarePlanWO. Say Patient A has 4 CarePlanWO - CP1, CP2, CP3, CP4. We have to identify CP3 [say based on one user's Access Group, that is, CP3 was created by the user] and place the CP3 status in the Patient level [one column in Patient A will have the CP3 status].
1. While satisfying the above requirement, is it possible to use RD data pagination [retrieval from database to be paginated, say 10 patients at a time].
Currently we are calling non-paginated Report Definition from an activity, that retrieves all the patients and then running in loop through the resultset to get the CP3 status and place it in patient level.
2. If I assume the requirement can be achieved using OOTB RD pagiation, I have further doubt. While using data pagination, we dont see any rownum in the generated query. Does it actually run the same query whenever we navigate to next page and fetch entire resultset from database and while copying the resultset in the clipbooard, copies only 10[say pagniation is 10] rows in the clipboard, discarding the rest?
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
To get only 10 results at a time, use 'Maximum number of rows to retrieve' option in report definition, to restrict the number of rows at database query level.
As for pagination, it works as below:
Enabled paging with page size 20 and there are 50 records in total. Results will have 3 pages. When clicked on page 2
1. Inputs captured: Page index-2 Page size-20. Using these inputs it will calculate start index and end index of the rows to be returned.
2. Execute query and fetch all rows
3. Packages results as clipboard pages, only the rows from start index to end index(21-40 in this case).