0

嗨,我有一个很长的公式字段,我想将其作为交叉表报告摘要字段包含在内。但是,在我定义公式字段后,我在交叉表屏幕中看不到它。如何包含它?这是我的公式字段

    WhilePrintingRecords;
numberVar rt;
numberVar layMdp;
numberVar totMdp;

rt=Round(({Command.GENGNPIAMT}/{Command.TOTALGNP})*100,2);
layMdp:={Command.GENPREMMDP};
totMdp:=(layMdp)*Truncate((rt/100),4);

此外,如果我将此公式字段放在详细信息部分中,它会显示为零。为什么它不计算任何东西?我喜欢它根据每个交叉表列计算值。

4

1 回答 1

1

您正在设置变量,但公式本身没有返回任何内容。如果要返回 totMdp 的值,只需在最后一行后面加上:

WhilePrintingRecords;
numberVar rt;
numberVar layMdp;
numberVar totMdp;

rt=Round(({Command.GENGNPIAMT}/{Command.TOTALGNP})*100,2);
layMdp:={Command.GENPREMMDP};
totMdp:=(layMdp)*Truncate((rt/100),4);
totMdp
于 2010-07-30T14:33:57.477 回答