We are trying to force a morphX report to be an even number of pages in length (so our auto-folding machine can handle the workload properly) and have been unsuccessful in using element.pagesTotal() to do so.
How have others gotten a page count for per-entity reports at the element level?
(this is dynamics ax 2009)
Sorry, but
pagesTotalis a “magic” function that delivers the result after the report has finished, which is too late for you to emit anewPage.You will have to count yourself. Luckily X++ is quite good at it!
Declare your counter in
classDeclaration:Increment your counter in a page header
executesection:In fetch add your
newPageafter super() (or on break of customer number):