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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deleting null lines in the Detail section of a report

Status
Not open for further replies.

clydejones

Programmer
Jan 11, 2001
153
US
Hi All,

I have a report where I am not displaying null or '0' values nor am I displaying the lables for the would be or '0' values. I would also like to delete the line of the empty fields to make the report look better so there won't be gaps between lines. If anyone has any ideas, I would appreciate them.

Thanks,
Clyde
 
Turn on "Suppress Blank Section" for the Detail Section. Brian J. Alves
Terrier Consulting, Inc.
Email: brian.alves@worldnet.att.net
VB / Crystal / SQLServer
 
How are you "not displaying" them? By selecting around them, or suppressing them?

Can't you just select records where this field is < > 0. This will eliminate records that have 0 and null values for that field. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
ken and balves,

I guess I didn't make myself clear enough. There are serveral fields within the detail section of this report. If any of the fields are null or '0', I suppress the field and label. However for the fields that are not null or '0', I display them. I would also like to delete the line(s) of the field(s) that are null or '0'. The &quot;Suppress Blank Section&quot; only works if all fields of the details section is blank or null (which will be rare). Any ideas?

Clyde
 
I guess I'm not sure what your detail section looks like. Is it one line across?

Field 1 Field 2 Field 3

Or is it multiple lines?

Field 1 Field 2 Field 3
Field 4 Field 5 Field 6

If it's the latter case, split the detail section into Detail Section A and Detail Section B. If either line turns out to be blank, then Suppress Blank Section works. Brian J. Alves
Terrier Consulting, Inc.
Email: brian.alves@worldnet.att.net
VB / Crystal / SQLServer
 
Hi, Clyde!

Try this.

In your section expert for the Detail Section, select the Supress Key then the formula box. Your formula would go something like this:

{fieldname} = 0 or IsNull({fieldname})

Only when either of those conditions are met, will the line be suppressed.

Hope this helps.

LOW
 
Make each &quot;line&quot; it's own subsection, so that you can use the suppress if blank, or a suppress condition. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top