1

下面是我的水晶报表,我想执行类似下面的公式,因为我是水晶报表的新手,我该怎么做?

if (`Fee_unit`==Percent)
{
FeeTotal = (`Fee` divided by 100) * `Number of patients`;
}
else
{
FeeTotal = `Fee` *  `Number of patients`;
}

水晶报表

4

1 回答 1

2

在字段资源管理器-> 公式-> 新公式中。

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
于 2013-10-06T15:27:20.287 回答