如何计算预渲染的MorphX报告中的报告页面? [英] How to count report pages in pre-rendered MorphX report?

查看:62
本文介绍了如何计算预渲染的MorphX报告中的报告页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正试图将morphX报告的长度强制为偶数页(以便我们的自动折叠机可以正常处理工作量),但使用element.pagesTotal()未能成功.

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?

(这是dynamic ax 2009)

(this is dynamics ax 2009)

推荐答案

对不起,但是pagesTotal是一个魔术"函数,可在报告完成后提供结果,这对于您发出.

Sorry, but pagesTotal is a "magic" function that delivers the result after the report has finished, which is too late for you to emit a newPage.

您将不得不数一数.幸运的是,X ++非常擅长!

You will have to count yourself. Luckily X++ is quite good at it!

classDeclaration中声明您的柜台:

 Counter pc;

在页面标题execute部分中增加您的计数器:

Increment your counter in a page header execute section:

 pc++;

在提取时,将您的newPage添加到super()之后(或在客户编号中断时):

In fetch add your newPage after super() (or on break of customer number):

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

这篇关于如何计算预渲染的MorphX报告中的报告页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆