Crystal报告如果有帮助,如何返回带有公式的字符串或变量 [英] Crystal report if then help, how to return a string or variable with formula
问题描述
相对较新的水晶而且我对公式有点麻烦。
Relatively new to crystal and I've hit a bit of a snag with a formula.
我正在尝试创建一个公式,将在何时报告RMA被收到了多少。如果没有收到任何项目,我希望它显示一条消息说明,但是如果收到RMA的项目,我希望它返回收据编号。
I'm trying to create a formula that will report out when an RMA was received and how many. If none of the items have been received, I want it to show a message stating such, but if items from the RMA have been received I want it to return the receipt number.
因为一张图片胜过千言万语......
Since a picture is worth a thousands words...
我尝试使用if if但我不认为你可以将字符串与BAQReportResult值组合。
I tried using an if then but I don't think you can combine strings with BAQReportResult values.
if {BAQReportResult.RMARcpt.OurReceivedQty}>0 then {BAQReportResult.RMARcpt.RMAReceipt}
之后我尝试了各种其他陈述,但坚持到这里我是...
After that I tried a variety of else statements but stuck here I am...
任何非常感谢帮助!
推荐答案
我认为你必须声明一个字符串类型然后在else部分中赋值。
I think you must declare a string type and then assign the value in else part.
创建一个公式并放在报告中,必须在公式中写出的内容如下:
Create a Formula and place in the Report, what has to be written in formula will be like:
stringvar text:="";
if {BAQReportResult.RMARcpt.OurReceivedQty}>0 then
text="{BAQReportResult.RMARcpt.RMAReceipt}"
else
text="There are ..."
这篇关于Crystal报告如果有帮助,如何返回带有公式的字符串或变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!