Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional Suppression of Headers

Status
Not open for further replies.

worsleyl

Technical User
Jun 11, 2001
14
0
0
CA
CR 9, Sybase ASA 6.0.2

Setup
H1 Program
H2 Client
H3 Service Maximum (ActivityDate)conditional suppress (see below)
H4 ActivityDate suppress
Details activitydate suppress

Sample Output
H1 Seating
H2 Joe Blow
H3 OT 2005 02 02 conditional suppress (see below)
H4 2005 02 02 suppress
Details 2005 01 01 suppress
Details 2005 02 02 suppress

H3 PT 2003 01 01 conditional suppress (see below)
H4 2003 01 01 suppress
Details 2002 01 01 suppress
Details 2003 01 01 suppress

H1 Orthotics
H2 Sally Jones
H3 OT 2004 01 01 conditional suppress (see below)
H4 2004 01 01 suppress
Details 2003 12 12 suppress
Details 2004 01 01 suppress

I want to display Program, Client, Service, ActivityDate ONLY IF the maximum ActivityDate < 2003 03 31 (or isnull)

I have a formula used to conditionally suppress H3 : @suppress service = false

@suppress service
IsNull ({Activity.ActivityDateTime})
or
({Activity.ActivityDateTime}) < datetime (2003, 04, 01, 00, 00, 00 )

and this works well for H3.

However, I don’t want to see H2 if all H3 are suppressed and I don’t want to see H1 if all H2 and H3 are suppressed:

Desired Output:
H1 Seating
H2 Joe Blow
H3 PT 2003 01 01

Using the same conditional suppression on H2 does not work – in the example above, H2 Joe Blow’s name would be suppressed because the first H3 (OT) 2005 01 01 satisfies the formula.


Please let me know if I can provider further clarification. Any help much appreciated.

 
It's a general rule in Crystal that things are done in a particular order and that you have to fit in with it. Crystal is a very sophisticated report-writer, not a complete language.

For your problem, I see two possibilities:
a) Find a new test that will determine if any H2 or H3 prints will occur within the H1. This may not be possible, of course.
b) Suppress the H1 and H2 headers. Re-create them as higher headers in H3, and use group-based counts to ensure that they are only printed once per G1 or G2.

Hope this helps.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Madawc
I tried your second suggestion and it worked like a charm!
Thanks SO much.

PS tried to give you a star but link wasn't working, so will try again later!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top