PageTotal

Hi all, I want display pagestotal but i can’t display. I create method for display, Display STR pageNum() { return StrFmt(“Page Total :”, element.pagesTotal()); } Why element.pagesTotal() not use on report? What function or method can use display page total? Your sincerely. tra.

It is better developer’s practice to add Integer field with DataMethod set to PagesTotal, and label set to “Page Total” (In your case). There is also a method Page that return current page. In order for PageTotal to be shown in Report Preview you have to move from first page to some other, or to last page. I guess Axapta performs total page number calculation then, and show total number of pages. This is done when printing pages too, so don’t be supprised if you see no pages total on screen, but they show when you print. Hope this helps [^]

or, possibly (if the code you wrote is what you are really using) the StrFrm(“Pages : %1”,intValue); should be used this way Correct me if I am wrong

Display STR pageNum()
{
return StrFmt(“Page Total : %1”, element.pagesTotal());
}