Crystal Report: Is PreviousNull prints incorrect data

微笑、不失礼 提交于 2019-12-13 03:37:59

问题


Some days back i posted a question in SO at Crystal Report: Display 0.00 for duplicate values

The question was to remove duplicate values and the report should display 0.00 instead. It was very kind of @adatapost that he posted a solution.

Now,it is throwing very irritating and awkward problem.

The 7th record is showing up 0.00

Hence, if the record was like before as

400.00
400.00
400.00
500.00
500.00
500.00
600.00
600.00
600.00

After that formula applied is showing something like

400.00
0.00
0.00
500.00
0.00
0.00
0.00 (THIS IS INCORRECT-- IT SHOULD BE 600.00)
0.00
0.00

Can you please throw some light in this issue? I appreciate your inputs & efforts.

thanks!


回答1:


Create a formula named 'Amount'.

Add the following to the formula:

If PreviousIsNull ({table.field}) Or Previous ({table.field}) <> {table.field} Then
    {table.field}
Else
    0

Use this formula instead of the database field.



来源:https://stackoverflow.com/questions/5018368/crystal-report-is-previousnull-prints-incorrect-data

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!