Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Suppress Blank or Null Field's in Crystal XI Post Reply Post New Topic
Author Message
TAH2
Newbie
Newbie
Avatar

Joined: 16 Mar 2010
Online Status: Offline
Posts: 23
Quote TAH2 Replybullet Topic: Suppress Blank or Null Field's in Crystal XI
    Posted: 08 Nov 2010 at 4:27am

I need to print the following address information on a report.  I need to suppress Address2 when it contains a blank or a null value

Contact Name
Company
Address1
Address2
City, State Zip
 
I tried checking the Suppress option in the Format Editor and entering the following formula but this did not work.
 
isnull ({tablename.Address2}) or {tablename.Address2} = ''
 
I also tried putting the field in a text box and selecting the Suppress Embedded Field Blank Lines in the Format Editor but that did not work either.
 
IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 08 Nov 2010 at 4:31am
I've had problems sometimes with null values. There may be a more elegant way of doing it but sometimes len({table.Address2})<1 or len({table.Address2})<2 works well for me.
|< /\ '][' ( )
IP IP Logged
s2ymon
Newbie
Newbie


Joined: 08 Nov 2010
Online Status: Offline
Posts: 3
Quote s2ymon Replybullet Posted: 08 Nov 2010 at 4:38am

in section expert in details (if your field is in details section) press X-2 button next to Suppress (no Drill-Down) without actually ticking this field and put this formula:

 
worked for me
IP IP Logged
TAH2
Newbie
Newbie
Avatar

Joined: 16 Mar 2010
Online Status: Offline
Posts: 23
Quote TAH2 Replybullet Posted: 08 Nov 2010 at 5:13am

My fields are in a group footer.  Unfortunately this did not work nor did the previous suggestion.

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Nov 2010 at 5:40am
your original formula is 'correct'.
When referencing NULL objects in the formula you have to mention them first as you did.
However when placing the suppression formula in a group footer it is only referencing the last detail row in the group. Not sure how your data is set up but you may need to alter it to use group level data.


Edited by DBlank - 08 Nov 2010 at 5:40am
IP IP Logged
TAH2
Newbie
Newbie
Avatar

Joined: 16 Mar 2010
Online Status: Offline
Posts: 23
Quote TAH2 Replybullet Posted: 08 Nov 2010 at 7:32am

I finally got it to work using a text box.  Initially I only put Address2 in a text box.  This time I created a text box and then added all of the address fields.  I then went to the Format Editor and selected Suppress Embedded Field Blank Lines.

IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.017 seconds.