Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Null formula discrepancy

Status
Not open for further replies.

CrystalBox

IS-IT--Management
Mar 24, 2005
151
0
0
US
I'm using Crystal Report 11. I've run into a bump in the road with the record selection formula shown below. The report displays cases that are "pending", which means that the cases have not been classified with a classification code or classification date. Once in awhile a case that has been given a "classification" and "classification date will show on my "pending" report. I discovered that sometimes users will enter the "classification" code and "classification date" and hit the return key a couple of times, creating a blank space in those fields. The record selection formula will pickup the blank space and place the record in my "pending" report. What can I add to this formula to prevent it from happening? Thank you

(isNull({EXP_CLASSIFICATION.CLASSIFICATION}))
OR

(Trim({EXP_CLASSIFICATION.CLASSIFICATION})= "")
AND
Trim({EXP_CLASSIFICATION.CHANGE})=""

AND


IsNull({EXP_CLASSIFICATION.DATE})
OR {EXP_CLASSIFICATION.DATE} = date(0,0,0)

 
The following should select records with a blank or null classification AND a blank or a null date. Based on your question alone, I'm not sure where Trim({EXP_CLASSIFICATION.CHANGE})="" fits in
Code:
(
isNull({EXP_CLASSIFICATION.CLASSIFICATION}
 OR
Trim({EXP_CLASSIFICATION.CLASSIFICATION})= ""
) 
AND 
(
IsNull({EXP_CLASSIFICATION.DATE}
OR 
{EXP_CLASSIFICATION.DATE} = date(0,0,0)
)



_____________________________________
Crystal Reports 2011 and XI
Intersystems Cache 2012 ODBC connection

 
Thanks CoSpringsGuy. The formula is doing what it supposed to do, it's identifying the blank or null field. But once in awhile a user will inadvertently enter data in the fields and then hit the return a couple times creating a new blank row. The formula bypasses the row with data and acts on the null/blank row, displaying the record as incomplete when in reality it has been completed and shouldn't show up on the report. I guess he formula should include a statement where data is present it should stop there and not evaluate the rest (null row). I'm at a loss on how I should proceed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top