在Crystal报表中计算参数 [英] Calculation for a parameter in crystal reports

查看:66
本文介绍了在Crystal报表中计算参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi ..

我解决了这个问题,需要解决方案.

我有一份生成报告的水晶报告..
在帐单中,它包含该项目的金额以及适用于该金额的费用.

如果费用的描述为"ADD",则必须将其添加到项目总计中,如果其描述为"LESS",则应从项目总计中扣除,最终金额应显示为总计.

该报告显示了所有数据,我试图获取一个名为total的变量,并在它的字段资源管理器中编写了此代码..

hi..

I cam across this problem and need a solution.

I have a crystal report which generates a bill..
In the bill it includes the amount for the item and the charges that applies to the amount.

If the charges have description "ADD" , it must be added to the item total and if it has description "LESS" it should be deducted from item total and final amount should be displayed as total.

The report displays all the data, I tried to take a variable named total and on its field explorer i wrote this..

int _total;
if({Expensedetail.add_less}=''add'')
{
_total=_total+{Expensedetail.Amount};
}
else
{
_total=_total-{Expensedetail.Amount};
}







this is not working...can you guys please suggest me what to do??

推荐答案

您是否已在公式编辑器中编写了此代码?是否保存没有任何错误?

我认为您需要阅读"WhilePrintingRecords"的功能...
Have you written this code in the formula editor? Does it save without any errors?

I think you will need to read up on what "WhilePrintingRecords" does...


这篇关于在Crystal报表中计算参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆