Hi everyone...
This simple article might be usefull.
1. Create a singleinstances codeunit (named it PAGExOFy) with 2 functions on it :
SetLastPage(LastPage : Integer)
OurLastPage := LastPage;
GetLastPage() : Integer
Exit(OurLastPage);
2. Design a report and put a code on a OnPostReport trigger :
OnPostReport()
PAGExOFy.SetLastPage(CurrReport.PAGENO);
3. Put 2 TextBox on a report, the first one, or the x one (as we all know) is simply put CurrReport.PAGENO on its SourceExpr property.
The second one, or the y one, put PAGExOFy.GetLastPage on its SourceExpr property.
4. Unfortunately with this method, which is the only simple method i know, i have to preview the report twice, to make the y number on PAGE x OF y, to be displayed correctly.
I hope this method might help for anyone who need it...until we (specially me, considering im a new user at this forum) can get a better method.
Thanks
0
Comments
Fly high and check out the site, e.g.
http://www.mibuso.com/forum/viewtopic.p ... light=html
which I find as a good alternative to preview (although you still has to run the report twice
Don't feel shy, just check before talking O:)
Thoms Hviid Thorn
Item - OnPreDataItem()
LinesPerPage = 20;
PageCount := ROUND(Item.Count /LinesPerPage,1,'>');
then you have a simple total pages!
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com