Crystal Report: Display 0.00 for duplicate values(Crystal Report:重复值显示 0.00)
问题描述
我正在制作一个显示数据库值的水晶报表.现在 db 中的值包含重复值.
I am making a crystal report which displays values from database. Now the values from db contains duplicate values.
我需要抑制重复值并显示 0.00
I need that duplicate values should be suppressed and should display 0.00
例如
价值
- 250.00
- 250.00
- 250.00
应该显示
- 250.00
- 0.00
- 0.00
我已将禁止重复"应用于该列,但不知道如何在那里显示 0.00.
I have applied "Suppress Duplicate" to the column but don't know how to display 0.00 there.
非常感谢!
推荐答案
不要勾选Suppress if Duplicated..您需要为显示字符串编写公式.
Do not check Suppress if Duplicated.. You need to write formula for Display String.
例如,
if PreviousIsNull ({object.field}) then
cstr({object.field})
else
if CurrentFieldValue=previous({object.field}) then
'0.00'
else
cstr({object.field})
if PreviousIsNull ({object.field}) then
cstr({object.field})
else
if {object.field}=previous({object.field}) then
'0.00'
else
cstr({object.field})
这篇关于Crystal Report:重复值显示 0.00的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!