Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Suppress page header if details are empty Post Reply Post New Topic
Author Message
HSwolfs
Newbie
Newbie
Avatar

Joined: 11 Feb 2010
Location: Belgium
Online Status: Offline
Posts: 6
Quote HSwolfs Replybullet Topic: Suppress page header if details are empty
    Posted: 11 Feb 2010 at 2:00am
hi all,

i'm quite new to CR11 (well, to CR in any way) and I have a question...

I have a report that looks like this :

(3.1 Person 1)
(name) - (first name)
(phone)

(3.2 Person 2)
(name) - (first name)
(phone)

Note that the details are 2 different detail-sections so :
(name) - (first name) : detail a
(phone) : detail b

If the details are empty, they are suppressed already via section expert.
But the problem is that the title remains visible when the details are empty.

How can this be fixed? I already used the search function but I can't seem to apply those solutions to my report so I started this new post.

Thanks in advance.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 11 Feb 2010 at 7:42pm
depends on how your data is set up.
One possible way may be to conditionally suppress the section based on ISNULL({table.name})
IP IP Logged
HSwolfs
Newbie
Newbie
Avatar

Joined: 11 Feb 2010
Location: Belgium
Online Status: Offline
Posts: 6
Quote HSwolfs Replybullet Posted: 16 Feb 2010 at 1:14am
hi, thanks for your reply...
the report consists of following parts :
[Report header]
Label sets title here

[Detail a]
name first name

[Detail b]
Street number

...
until [Detail k]

The idea is that the report header is suppressed when all details are empty...
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Feb 2010 at 7:18am

So you may have a name and nothing else and you want to suppress the name only if all the other fields are empty, correct?

If the fields are NULL and not empty strings then in the section expert you can conditionally suppress the section as
isnull({table.street}) and isnull({table.field_c}) and isnull({table.field_D})....repeat for all fields used
IP IP Logged
HSwolfs
Newbie
Newbie
Avatar

Joined: 11 Feb 2010
Location: Belgium
Online Status: Offline
Posts: 6
Quote HSwolfs Replybullet Posted: 16 Feb 2010 at 11:29pm
Originally posted by DBlank

So you may have a name and nothing else and you want to suppress the name only if all the other fields are empty, correct?

If the fields are NULL and not empty strings then in the section expert you can conditionally suppress the section as
isnull({table.street}) and isnull({table.field_c}) and isnull({table.field_D})....repeat for all fields used
will give that a try... thanks already :)Clap
IP IP Logged
HSwolfs
Newbie
Newbie
Avatar

Joined: 11 Feb 2010
Location: Belgium
Online Status: Offline
Posts: 6
Quote HSwolfs Replybullet Posted: 11 Apr 2010 at 11:22pm
it has been a while but it works like a charm cheers! Clap
IP IP Logged
HSwolfs
Newbie
Newbie
Avatar

Joined: 11 Feb 2010
Location: Belgium
Online Status: Offline
Posts: 6
Quote HSwolfs Replybullet Posted: 11 Apr 2010 at 11:30pm
small side-question : how do you suppress a detail if there is also a textfield in it?
IP IP Logged
HSwolfs
Newbie
Newbie
Avatar

Joined: 11 Feb 2010
Location: Belgium
Online Status: Offline
Posts: 6
Quote HSwolfs Replybullet Posted: 12 Apr 2010 at 1:02am
nevermind :) found it after searching a bit myself :)
Just add  : tablename.fieldname = '' to the suppres-condition.
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.031 seconds.