[英]How to add formula on Crystal report fields
以下是我的水晶报表,我想执行以下公式,因为我是水晶报表的新手,我该怎么做?
if (`Fee_unit`==Percent)
{
FeeTotal = (`Fee` divided by 100) * `Number of patients`;
}
else
{
FeeTotal = `Fee` * `Number of patients`;
}
在“字段资源管理器”->“公式”->“新公式”中。
From the drop down above select Basic Syntax.
If {TableName.FeeUnit} = {TableName.Percent} Then // Assuming you have FeeUni and Percent as column in TableName table. Drag drop the two and wrap with the code
formula=({TableName.Fee}/100)*{TableName.Patients} // formula here is a keyword
Else
formula={TableName.Fee}*{TableName.Patients}
End If
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.