Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: suppress blank information Post Reply Post New Topic
Author Message
south
Groupie
Groupie


Joined: 31 Jul 2012
Online Status: Offline
Posts: 82
Quote south Replybullet Topic: suppress blank information
     Posted: 22 Aug 2012 at 6:51am
Hello Everyone,
 
I am trying to suppress a value field if it is blank and the text box that describes the field being displayed.  For example:
 
Address 2:  {address_value}
 
If the value field "{address_value}" is blank I want it to suppress the text box "Address 2" and the "value field". I am not sure how to do this. Any help would be appreciated!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 22 Aug 2012 at 6:57am
right click on the text select format text
common tab
suppress formula box
{address_value}=""
 
IP IP Logged
south
Groupie
Groupie


Joined: 31 Jul 2012
Online Status: Offline
Posts: 82
Quote south Replybullet Posted: 22 Aug 2012 at 7:32am
Thank you! 
 
It worked on the Address 2 but when I tried use and save this on a date field I received the message that says a date-time is required in the "" Any ideas?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 22 Aug 2012 at 8:53am
date would be null values if they are empty
try
isnull({table.datefield})
IP IP Logged
south
Groupie
Groupie


Joined: 31 Jul 2012
Online Status: Offline
Posts: 82
Quote south Replybullet Posted: 22 Aug 2012 at 9:35am

I tried the formula and it let me save but the text box "Date:" still appears in the report, even though no date appears.  I tried to add the date to the text box and then under Format Editor suppress embedded field blank lines but that didn't work either. 

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 22 Aug 2012 at 9:43am
make a formula field to test this
isnull({table.datefield})
Place this on your detail row and you should get a boolean response per row of TRue where it is null and False if it is not.
You are not conditionally suppressing the date field at all are you?
IP IP Logged
south
Groupie
Groupie


Joined: 31 Jul 2012
Online Status: Offline
Posts: 82
Quote south Replybullet Posted: 22 Aug 2012 at 10:07am
Now I am definatley confused.  I did exactly what you suggested and then checked one with no date and it came up false then I checked one with a date and it came up false?
I did nothing to the date field except format it as a date only not date-time.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 22 Aug 2012 at 11:21am

what is your source? if it is SQL then a NULL might be using 1/1/1900

you can try that the true / false check formula again but change it to
{table.field}=date(1900,1,1)


Edited by DBlank - 22 Aug 2012 at 11:26am
IP IP Logged
south
Groupie
Groupie


Joined: 31 Jul 2012
Online Status: Offline
Posts: 82
Quote south Replybullet Posted: 23 Aug 2012 at 2:57am
It is an SQL, the formular however still returns a false for both dated and non dated. 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 23 Aug 2012 at 4:10am
what does the field look like for items that do have values?
Can you see the data in a sql server manager? what does it look like in there and what data type does it make it in the original source table?
IP IP Logged
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