how do i subtract two grandtotal fields in Crystal Reports

北城以北 提交于 2019-12-13 04:01:36

问题


I'm using crystal reports and i have created two sum grandtotal fields. Now i want to do field 1 - field 2 in a X1 formula, but i can't call those fields into the formula. So I tried to use Sum({field1}) - 2 but that doesn't seem to get the grandtotal.

Is it possible to do a grandtotal in a sum like Sum({field1}.GrandTotal) ?


回答1:


create a formula and write

Sum({field1}-Sum({field2}

and place at rigt most part that is after all columns.

If this doesn't work then follow below process.


Crate a formula @Grandtotal1

Sum({field1},{Group1}(if using group)

create a formula @Grandtotal2

Sum({field1},{Group2}(if using group)

Now create another formula

EvaluateAfter(@Grandtotal1);
EvaluateAfter(@Grandtotal2)

@Grandtotal1+@Grandtotal2


来源:https://stackoverflow.com/questions/22297405/how-do-i-subtract-two-grandtotal-fields-in-crystal-reports

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