PageNo is Being deprecated in versions: 1.0 or greater - [Business Central Report Tips]

PageNo Method is used to get or set current page number of report. But when you convert report code from C\AL to AL then in vs code you will see warning saying 'PageNo' is being deprecated in versions: 1.0 or above. This warning will become an error in future release.

PageNo is Being deprecated in versions

 So what is the solution for the issue of PageNo?

The solution is simple delete this line of code. This code is used in classic report designer to show the page number or to get or set the page number of the report. But in RDLC report page number is built-in variable and you can use that instead of CurrReport.PageNo variable. 
In all of the standard report built-in variable called Globals!PageNumber is used when we need page number in report.

Conclusion:

Just remove the line of code it doesn't do anything useful when used in C/AL or AL code. Also if it is used in datasets remove from there too. 

Reference:


Post a Comment

Thank you for comment, I really appreciate your view.

–>