I have a crystal report that is created by linking the table to create the sql query. The query is pulling: Job#, CustomerName, Plant, and DefineDate. When I run the report it pulls back the data correctly but I want it to leave a blank for the DefineDate if the job is a certain status. I created a formula field called DefineDate and put this if statement in there:
if {SSLOM.SearchKey} = {IPJOBM.JOB_NUMBER} and {SSLOM.DataItem}= "Def Rec DT" then {SSLOM.AlphaValue} else " "
(This is saying if fields match, which is the job# and the status is 'Def Rec DT' print out the data else leave blank.)
When I ran the report with this if statement it returned blanks for all the rows returned, but some of them should have returned data.
Request clarification before answering.
Hi ,
your logical expression might not return expected result.
and also check the below statement.
if TOTEXT({SSLOM.SearchKey}) = TOTEXT({IPJOBM.JOB_NUMBER}) and TOTEXT({SSLOM.DataItem})= 'Def Rec DT' then {SSLOM.AlphaValue} else ' '
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you sure that the "Def Rec DT" string is in the right case and is an exact match to what's in the data? I might also take out the "else" part of the if statement - like this:
if {SSLOM.SearchKey} = {IPJOBM.JOB_NUMBER} and UpperCase({SSLOM.DataItem})= "DEF REC DT" then
{SSLOM.AlphaValue}
If that doesn't work, you'll need to do some debugging. For this, I would first take out
and UpperCase({SSLOM.DataItem})= "DEF REC DT"
and see whether the date shows up. If it does, then there is an issue with the string comparison. If it doesn't, then the issue is with the SearchKey/JOB_NUMBER comparison.
-Dell
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.