Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Date/Time Suppression Post Reply Post New Topic
Page  of 2 Next >>
Author Message
south
Groupie
Groupie


Joined: 31 Jul 2012
Online Status: Offline
Posts: 82
Quote south Replybullet Topic: Date/Time Suppression
    Posted: 19 Sep 2012 at 8:56am

I have added a date/time field and text box in the report I am working on.  I would like to suppress the text box when there is no date/time.  I have tried the format editor - common tab - suppress - and used a formular to suppress if there is no date.  It does not work! Yet no date is listed on the date field.  ??

IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 19 Sep 2012 at 9:02am
the supression formula would be something like:
 
isnull({table.datetime})
 
that should do it
 
HTH
IP IP Logged
south
Groupie
Groupie


Joined: 31 Jul 2012
Online Status: Offline
Posts: 82
Quote south Replybullet Posted: 19 Sep 2012 at 9:20am
I already tried that...it doesn't work. 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 19 Sep 2012 at 10:13am
are these all on the same detail row or are you doing summary level checking?
is it really a datetime field or a string that is formatted like datetime?


Edited by DBlank - 19 Sep 2012 at 10:19am
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 19 Sep 2012 at 8:50pm
Hi..
 
In suppress formula editor.. On top middle there is drop down box, choose Default values for Null and make the following change in your formula :
 
isnull(table.field) or {table.field} = " "
Thanks,
Sastry
IP IP Logged
south
Groupie
Groupie


Joined: 31 Jul 2012
Online Status: Offline
Posts: 82
Quote south Replybullet Posted: 20 Sep 2012 at 3:15am

I have it in the group editor and it is a datetime field.  There must be some kind of default date but when I look in the table that the information is coming from it's blank. I can not believe something that I thought would be so easy ends up being so difficult!

IP IP Logged
south
Groupie
Groupie


Joined: 31 Jul 2012
Online Status: Offline
Posts: 82
Quote south Replybullet Posted: 20 Sep 2012 at 3:18am
I did the formula and it says that there is an error in the formula - i highlights  "" and says a datetime is required here.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 20 Sep 2012 at 3:40am
What do you mean by "I have it in the group editor'?
IP IP Logged
south
Groupie
Groupie


Joined: 31 Jul 2012
Online Status: Offline
Posts: 82
Quote south Replybullet Posted: 20 Sep 2012 at 4:02am

Sorry...I meant I have it in the group header not in the detail section of the report.

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 20 Sep 2012 at 4:19am

The formula you wrote evaluates per row (detail section).

Since you are palcing it in a group header it is only evaluating for the first row in the group.
 
try to do some trouble shooting
make a formula field as lockwelle suggested usingh
isnull({table.datetime})
place it on the detail section
it should return True (if the fiel sis null) or False (if the field has a value).
Is this working as you expect?
IP IP Logged
Page  of 2 Next >>
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.031 seconds.