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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditionally Suppress a Text Field in the Page Header 1

Status
Not open for further replies.

xidnad

Technical User
Joined
Oct 26, 2004
Messages
12
Location
US
I am trying to supress multiple text fields in my page header using formulas simular to:

NOT({ado.Code} in ["025","030","031","032","033","034","035","036"])

there are for different text fields, each with their own group of codes.

In testing this I found that only the code in the first record was evaluated for the supression. How do I set suppression to evaluate all of the codes in the report before suppressing the field?


 
If you are trying to conditionally suppress a page header based on the presence anywhere in the report of a certain field value, then I think you need to create a subreport which mimics your main report (or is an import of the same report saved under another name) in the report header which sets up these values as a shared variable that you can then test in the page header section.

-LB
 
Thanks for the solution. Unfortunatly the third party software I run my reports in doesn't work well with subreports so I'll have to rethink my design.
 
Actually, I think you can do something else fairly simply. Create a formula that defines your suppression condition, as in {@notcodes}:

if NOT({ado.Code} in ["025","030","031","032","033","034","035","036"]) then 1

Then for your suppression formula use the following:

sum({@notcodes}) > 0

This will detect the presence of any of the codes anywhere in the report and then suppress your text box accordingly.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top