How to count report pages in a preprocessed MorphX report?

We are trying to get the morphX report to be an even number of pages in length (so our auto-folding machine can handle the workload correctly) and failed to use element.pagesTotal()

to do so.

How did others get the page score for each item reporting item at the item level?

(this is ax 2009 dynamics)

+3


source to share


1 answer


Sorry, but this pagesTotal

is a "magic" function that delivers the result after the report has finished, which is too late for you to choose newPage

.

You will have to calculate for yourself. Luckily, X ++ works pretty well!

Declare your counter in classDeclaration

:

 Counter pc;

      



Increase your spinner in the execute

header section of the page:

 pc++;

      

In the selection, add newPage

after super () (or if you break the customer number):

boolean fetch()
{
    boolean ret = super();
    if (pc mod 2 == 1)
        element.newPage();
    return ret;
}

      

+4


source







All Articles