Click to See Complete Forum and Search --> : Suppress row if a field contains a null


kj4pls
December 3rd, 2008, 03:57 PM
I am a novice at Crystal Reports and would appreciate if someone could help me out. I have tried to find a solution in the long list of pryor posts and have not had any luck. I have a report that I am trying to create and would like to have a given row not appear if a particular field of data is a null. The field is a string type. Ex. if APH_DET_REC.APH_STAIN is a null then I would like it to not show up on the report.

Ned Pepper
December 3rd, 2008, 05:03 PM
Go the the section expert (report menu->section expert or point at the word "Details" in the design view and right click)

Hightlight "Details" in the section expert and locate suppress (no drill down) on the common tab. Click the X-2 icon to open the formula editor and enter the formula

isnull({APH_DET_REC.APH_STAIN})


this will suppress the details section when the field is null

kj4pls
December 4th, 2008, 11:30 AM
Thank you for your response. It was not successful. Maybe I did not explain what I wanted correctly. In my Details section of Design I have 6 fields of data placed. I want the line (record) suppressed from the report when the field {APH_DET_REC.APH_STAIN} is null. The results of your suggestion displayed the 5 fields of data with the {APH_DET_REC.APH_STAIN} field blank (null)

jggtz
December 4th, 2008, 01:13 PM
Try setting the record selection formula as :

not isnull({APH_DET_REC.APH_STAIN})

kj4pls
December 4th, 2008, 05:22 PM
I tried the not isnull ({APH_DET_REC.APH_STAIN}) in the record selection and it did not work. Thank you for the suggestion.

Ned Pepper
December 8th, 2008, 06:44 PM
hello,
Both the solution I provied, and the one provided by jggtz will work (i tested them) unless your field is not truly null. It may be that your field isn't null but contains blanks spaces. You should try either solution again but add a test for a blank ( {TABLE.Field} = " ")

kj4pls
December 16th, 2008, 11:55 AM
Thank you Ned. I have found a way to obtain what I was trying to do. I agree with you in that the field must not be truly null. With my limmited knowledge I was not able to determin if the field was truly null. I was not able to change a record in the database that I am working with to a null status ({APH_DET_REC.APH_STAIN} = " "). I do believe there is something in the field that I am working with but I don't know how to reveal it, since nothing shows up on the report that I am creating. What I did do is use a Lenght statement on the field and it shows up as 0.00 in the report. The records that I want to show up in the report contain any where from 3 to 6 characters. So what I then did to accomplish my goal was to in the suppress formula put in Lenght ({APH_DET_REC.APH_STAIN}) < 1