Skip to main content

CurrReport.PAGENO

CurrReport.PAGENO is frequently used in Classic Dynamics NAV report code and control source expressions, but this function is not supported on RDLC format report layouts and always returns number 1. This makes CurrReport.PAGENO implementation difficult, but during conversion the most common cases of CurrReport.PAGENO usage are handled.

CurrReport.PAGENO used in control SourceExpr​

If CurrReport.PAGENO function used in Classic Dynamics NAV report header or footer control SourceExpr property, this function is changed to Globals!PageNumber function in RDLC format report layout during conversion.

If header or footer section with CurrReport.PAGENO used have to be printed only on first/last page (PrintOnEveryPage = No), CurrReport.PAGENO is changed to constant value of number 1.

CurrReport.PAGENO used with CurrReport.SHOWOUTPUT​

If (CurrReport.PAGENO = 1) expression used in some header sections trigger code with CurrReport.SHOWOTPUT function, after report transformation sections are converted to tablix rows, which has RepeatOnNewPage = No (Static Properties -> Other -> RepeatOnNewPage). If there are some other same DataItem header sections, which do not have CurrReport.SHOWOUTPUT(CurrReport.PAGENO = 1) code on section trigger and have to be repeated on every page (PrintOnEveryPage = Yes) in Classic report, during conversion different layout groups by constant values are created to separate rows which should be printed on every page from the ones which should be printed only on the first page.

  • Example. Conversion of sections with code CurrReport.SHOWOUTPUT(CurrReport.PAGENO = 1) used.

    If there are some header sections which triggers have code with CurrReport.SHOWOUTPUT(CurrReport.PAGENO = 1) used (marked in green) and all other header sections do not have such code and have to be repeated on every page, currreport.pageno

    during conversion there are separate groups created with proper RepeatOnNewPage value for rows with CurrReport.SHOWOUTPUT(CurrReport.PAGENO = 1) and without it. currreport.pageno