开发者

Crystal Report: Display 0.00 for duplicate values

I am making a crystal report which displays values from database. Now the values from db contains duplicate values.

I need that duplicate values should be suppressed and should display开发者_Go百科 0.00

For Ex.

Value

  • 250.00
  • 250.00
  • 250.00

Should display

  • 250.00
  • 0.00
  • 0.00

I have applied "Suppress Duplicate" to the column but don't know how to display 0.00 there.

Thanks much!


Do not check Suppress if Duplicated.. You need to write formula for Display String.

For example,

if PreviousIsNull ({object.field}) then 
  cstr({object.field})
else
if CurrentFieldValue=previous({object.field}) then 
   '0.00' 
else 
  cstr({object.field})

EDIT:

  if PreviousIsNull ({object.field}) then 
      cstr({object.field})
    else
    if {object.field}=previous({object.field}) then 
       '0.00' 
    else 
      cstr({object.field})


Right click on Field and click on Format Object Then click on Customize button Then there is a "Show zero value as" with dropdown to Default. Select that dropdown value to 0 instead of default.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜