CurrReport.NEWPAGE
There are a few different implementations applied during report conversion dependng on how CurrReport.NEWPAGE function is used.
CurrReport.NEWPAGE used with āDataItemTableā.āField Nameāā
If CurrReport.NEWPAGE function is used on section trigger and is excecuted depending on āDataItemTableā.āField Nameā value, new group by SRB_PageGroupNo with page break is created. SRB_PageGroupNo is integer type variable which is increased according to the same conditions as CurrReport.NEWPAGE function is executed in Classic Dynamics NAV report. Group by SRB_PageGroupNo is created as a parent group of DataItemTable body group (group by DataItemTable primary key).
Example. Conversion of CurrReport.NEWPAGE function.
If there is Classic Dynamics NAV report with DataItems:
and CurrReport.NEWPAGE function used with āDataItemTableā.āField Nameā condition
during conversion there are two integer type variables added:
and code added on DataItemTable DataItemās OnPreDataItem() trigger,
also code added on DataItemTable DataItemās OnAfterGetReccord() trigger.
New column with SRB_PageGroupNo as Data Source created
and new group by SRB_PageGroupNo value created
with page break option Between each instance of a group selected.
CurrReport.NEWPAGE used on OnAfterGetReccord trigger without āDataItemTableā.āField Nameāā
If function CurrReport.NEWPAGE is used in Classic Dynamics NAV report trigger without āDataItemTableā.āField Nameā condition, then during conversion there is new C/AL integer type variable SRB_PageGroupNo created and increased instead of CurrReport.NEWPAGE code. Also group with page break by SRB_PageGroupNo is created as a parent group of DataItemTable body group (group by DataItemTable primary key) where function CurrReport.NEWPAGE is used.
Example. Conversion of CurrReport.NEWPAGE function.
If function CurrReport.NEWPAGE is used in some DataItem trigger,
then after conversion there is new C/AL global variable SRB_PageGroupNo created
and its value is increaced in the same place as function CurrReport.NEWPAGE was used.
New column with SRB_PageGroupNo as Data Source created
and new group by SRB_PageGroupNo value created
with page break option Between each instance of a group selected.