简体   繁体   中英

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. I want to select all those records whose jobstatus is workshop n display it in the 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}

This function will return the value of the Job_Staus if the Job_Status value is anything BUT "Workshop"

Are you sure the Job_Status value contains "Workshop" Check for Spaces as Well could try trimming Job_Status

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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