Print Page | Close Window

Suppress page header if details are empty

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=9092
Printed Date: 04 May 2024 at 9:08am


Topic: Suppress page header if details are empty
Posted By: HSwolfs
Subject: Suppress page header if details are empty
Date 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.



Replies:
Posted By: DBlank
Date 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})


Posted By: HSwolfs
Date 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...


Posted By: DBlank
Date 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


Posted By: HSwolfs
Date 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


Posted By: HSwolfs
Date Posted: 11 Apr 2010 at 11:22pm
it has been a while but it works like a charm cheers! Clap


Posted By: HSwolfs
Date Posted: 11 Apr 2010 at 11:30pm
small side-question : how do you suppress a detail if there is also a textfield in it?


Posted By: HSwolfs
Date Posted: 12 Apr 2010 at 1:02am
nevermind :) found it after searching a bit myself :)
Just add  : tablename.fieldname = '' to the suppres-condition.



Print Page | Close Window