Crystal Reports SELECT CASE 语句 [英] Crystal Reports SELECT CASE statement
本文介绍了Crystal Reports SELECT CASE 语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在 Crystal Report 中有一个如下所示的 switch 语句:
I have a switch statement in a Crystal Report that looks like this:
stringvar tag := {table1.field1}; //contains a string value
select tag case
'First Value': {table1.field3}
'Second Value': {table4.field9}
default: 'Unknown';
但是当我尝试保存公式时,我得到了这个错误:
But when I try to save the formula, I get this error:
---------------------------
Crystal Reports
---------------------------
The remaining text does not appear to be part of the formula.
---------------------------
OK
---------------------------
在我的示例中,它突出显示了以第二"一词之前的单引号开头的公式.
And it highlights the formula beginning with the single quote before the word "Second" in my example.
我犯了什么愚蠢的语法错误?
What stupid syntax error am I making?
推荐答案
这个不应该写成...
select (tag )
case 'First Value': {table1.field3}
case 'Second Value': {table4.field9}
default: 'Unknown';
?
注意,我只是在网上查看了语法;我不是 Crystal Reports 专家...
?
Note, I just looked the syntax online; I'm not a Crystal Reports specialist...
这篇关于Crystal Reports SELECT CASE 语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文