Kbase P56022: How to calculate the current page number with Report Builder
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  25/11/2003 |
|
Status: Unverified
GOAL:
How to calculate the current page number with Report Builder
GOAL:
Is there any alternative to the Report Builder default function Page_rb to calculate the current page number?
GOAL:
How to have a default function not affected by the Reset Page option in the Group definitions.
GOAL:
Report Builder
FIX:
1) Create an Aggregate field: record-in-the-page
Type -> Count
Reset -> Per-page
2) Create a new calculated filed myPageNumber:
(IIF(record-in-the-page=1,myPageNumber + 1,myPageNumber))
myPageNumber increases its value of 1 when it the first record of the page is retrieved.
You can use myPageNumber as new information for the page number instead of the default Report Builder function Page_rb. This function won't be affected by the Reset Page option in the Group definitions.
Note that while this functions increases its value when meeting the first record of the page it doesn't correctly work when dealing with report containing pages with no record in it.