简体   繁体   English

Crystal Reports C#公式仅返回false

[英]Crystal Reports C# formula returning false only

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 & why its returning 'false' i dont know, instead of dept name. 在ReportFooter中,我为车间创建了一个列,我想显示部门名称n单位名称(其单位在车间中),并将此公式字段放置在ReportFooter中,该字段仅返回一个值,而不是每个条件的真实值和原因我不知道其返回的“假”,而不是部门名称。 I want to select all those records whose jobstatus is workshop n display it in the reprotfooter. 我想选择所有作业状态为Workshop n的记录,并将其显示在reprotfooter中。 Can anyone please help me... 谁能帮帮我吗...

Thanks 谢谢

TROUBLE SHOOT 疑难解答

IF {Sp_Get_DailyReport;1.Job_Status} = "Workshop" THEN {Sp_Get_DailyReport;1.Department_Name} ELSE {Sp_Get_DailyReport;1.Job_Status} 如果{Sp_Get_DailyReport; 1.Job_Status} =“ Workshop”然后{Sp_Get_DailyReport; 1.Department_Name} ELSE {Sp_Get_DailyReport; 1.Job_Status}

This function will return the value of the Job_Staus if the Job_Status value is anything BUT "Workshop" 如果Job_Status值为“ Workshop”,则此函数将返回Job_Staus的值

Are you sure the Job_Status value contains "Workshop" Check for Spaces as Well could try trimming Job_Status 您确定Job_Status值包含“ Workshop”吗?还检查空间是否可以尝试修剪Job_Status

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM