Print Page | Close Window

Suppress field if another is Suppressed

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=14327
Printed Date: 04 May 2024 at 12:05pm


Topic: Suppress field if another is Suppressed
Posted By: RenVilo
Subject: Suppress field if another is Suppressed
Date Posted: 12 Sep 2011 at 2:09am
Hi,

Say you have Field1, Field2, Field3

Both Field1 and Field2 has data but Field3=Null

They are all on the report in that order next to each other.

Now I want Field2 to check if Next(Field3)=Null. If it is the suppress it.

Up to here I'm fine.

My question now is:

How do I get Field1 to suppress?

I want Field1 to check if the "status" of Field2=Suppressed. If that is true then Suppress field1 as well.

Is this possible?

A other solution (Long way) is to create a parameter for each of these fields and make them 0 and 1. If it suppress then the number will change. But I don't really want to do that.

Any tips?

tx



Replies:
Posted By: lockwelle
Date Posted: 12 Sep 2011 at 2:15am
you could build 'another' detail line, put the suppression formula for field2 in that, suppress the whole line and then check the formula for what it has.
 
would the supression for field 1 be,
if next(field2) = null?
or
next(field2) = null or next(field3) = null
 
or something else?
 
if it just checking if field 2 would be suppress, just add that to field1
 
HTH


Posted By: RenVilo
Date Posted: 12 Sep 2011 at 2:23am
Hi,

well I will have about 10 fields in total :)

The database I have is bad and I am doing a Left outer join from start to finish.

The point in this is because:

The data will come back as

Audit|Control|Test|Results

Test | Yes   |     |
Test | Yes   | Yes | Good

and so on... Because it is a many to many I do get a lot of fields that is like that. I want to suppress that first record because the second record do have additional information.

At the moment my Control Suppress section says:

Next(ControlName)=ControlName
Test=""

So it checks to see if the next control name is the same. If it is and the current controlname has no Test then it will "skip" this and suppress it.

Now I want the Audit name to suppress as well so that my entire row of that data will suppress :)

Everything has to be next to each other so I can't really add another detailed section.

I'm just looking for some kind of code so that I can use syntax to do a statement and say:

Audit Syntax Section:

IF ControlName.visible=true then
Audit.visible=true

Something like that



Print Page | Close Window