通过Crystal Report中的另一个公式更改公式值

时间:2012-04-17 09:29:44

标签: crystal-reports formula

我想通过Crystal Reports中的另一个公式更改公式的值。

我遇到了一个问题:我在DB中有一个字符串列,并保存为例如“Cars”或“Doors”或..

并且在报告中我将所有类别都写在普通文本框中。 (像RadioButtonList一样)。

并希望如果列是“汽车”,它将检查汽车TextBox旁边。 (像RadioButtonList一样)

我认为我制作了一个名为main_Categ的公式,并且每个类别TextBox旁边都有一个公式,我将写入main_Categ公式

if the Column = "cars" then CarsFormula="1"
else if the Column = "Doors" then DoorsFormula="1"

等等。 你觉得怎么样?

2 个答案:

答案 0 :(得分:0)

我认为每个复选框都有一个公式会更简单。在每个公式中,只需输入:{table.field}='doors'。这将返回true / false。

您的方法似乎引入了不必要的复杂性。

答案 1 :(得分:0)

每个公式必须评估自己。

创建2个公式

CarsFormula {column} ="cars"

DoorsFormula {column}="doors"

相关问题