如果水晶报告中的条款 [英] if clause in crystal reports

查看:50
本文介绍了如果水晶报告中的条款的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



i创建了一个水晶报告,我想写一个公式。



我的公式:



 IF {Sp_Get_DailyReport; 1.Job_Status} ='Workshop'
THEN {Sp_Get_DailyReport; 1.Department_Name}





但是,这个公式没有返回值。



i编辑了我的公式,现在我得到'假'而不是Dept-name。

 stringvar text:=; 
IF {Sp_Get_DailyReport; 1.Job_Status} ='Workshop'
THEN text ={Sp_Get_DailyReport; 1.Department_Name}





在ReportFooter中,我为研讨会创建了一个列,我想显示部门名称n单位名称,其单位在车间,我将此公式字段放在ReportFooter中,其中只返回一个值,

而不是每个条件的真实。







为什么它返回'false '我不知道,而不是dept名字。



我想选择所有那些jobstatus是workshop n的记录在reprotfooter中显示它。 





任何人都可以帮助我...



谢谢

解决方案

Quote:

Job_Status

的数据类型是什么。



检查它,然后根据它修改值。另外

Quote:

'Workshop'

可以替换为

引用:

工作坊





请尽量告诉我。



并修改THEN text ={Sp_Get_DailyReport; 1.Department_Name}至



THEN text:={Sp_Get_DailyReport; 1.Department_Name}并尝试


例如,如果我从数据库得到1,我需要显示女性否则为男性,因为我们可以这样写。



  if  {SelAppointmentByAppointmentID;  1  .Gender} =  1 然后
女性
else
男< /跨度>


Hi guys,

i have created one crystal report where i want to write a formula.

my formula:

IF {Sp_Get_DailyReport;1.Job_Status} = 'Workshop' 
THEN {Sp_Get_DailyReport;1.Department_Name}



but, this formula doesn't returning a value.

i have edited my formula, now i'm getting as 'false' instead of Dept-name.

stringvar text := "";
IF {Sp_Get_DailyReport;1.Job_Status} = 'Workshop' 
THEN text = "{Sp_Get_DailyReport;1.Department_Name}"



In ReportFooter i have created one column for workshop where i want to display department name n unit name whose units are in workshop and i'm placing this formula field in ReportFooter where its returns only one value,
instead of each condition where its true.

and

why its returning 'false' i dont know, instead of dept name.

I want to select all those records whose jobstatus is workshop n display it in the reprotfooter.



Can anyone please help me...

Thanks

解决方案

What is the datatype of

Quote:

Job_Status

.

Check it and then modify the value according to that. Also

Quote:

'Workshop'

can be replaced with

Quote:

"Workshop"



Pls try and let me know.

and also modify THEN text = "{Sp_Get_DailyReport;1.Department_Name}" to

THEN text := "{Sp_Get_DailyReport;1.Department_Name}" and try


for example if i will get 1 from database i need to display "female" otherwise "male" for that we can write like this

if{SelAppointmentByAppointmentID;1.Gender}=1 then
    "Female"
         else
    "Male"


这篇关于如果水晶报告中的条款的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆