我有一个场景,水晶报告中有5-6行,列的类型是"Money“,我想要有列值”非零“的所有行的计数。
稍后,我使用这个计数显示在"TextField“中的水晶报告中
到目前为止,我已经创建了一个公式,并键入了以下代码
numbervar cnt;
cnt = 1;
if {MyReport;1.Cash_deposit} <> 0.00 then
cnt = cnt +1;现在我无法表现出这样的价值,有人帮我吗?
样本数据:
Cash_Deposit
--------------
10.05
0.00
25.69
0.00
89.47在这种情况下,我希望在我的"TextField“中显示(3)
发布于 2014-04-16 08:47:20
有一个语法error...You缺少:。像这样改变。
numbervar cnt;
cnt := 1;
if {MyReport;1.Cash_deposit} <> 0.00 then
cnt := cnt +1;方法1:
为什么你用这个公式代替你可以在下面的方式使用。
if {MyReport;1.Cash_deposit} <> 0.00 then
{MyReport;1.Cash_deposit};方法2:
当计数为zero时压制该字段
关于本节的supress公式,请编写以下代码:
if {MyReport;1.Cash_deposit} = 0.00 then
true
else false发布于 2014-04-16 12:32:58
创建一个公式:
// {@NonZero}
If {MyReport;1.Cash_deposit}<>0 Then
1
Else
0插入汇总字段;选择公式字段;将摘要更改为Count;选择所需位置(可以选择在窗口中创建新组)。
不需要将公式字段添加到画布中,此方法才能工作。
https://stackoverflow.com/questions/23103023
复制相似问题