Below is my crystal report ,I want to perform Formula something like below ,as I am new to crystal report how can I do this ?
if (`Fee_unit`==Percent)
{
FeeTotal = (`Fee` divided by 100) * `Number of patients`;
}
else
{
FeeTotal = `Fee` * `Number of patients`;
}
In Field Explorer -> Formula-> New Formula.
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.