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

Supressed detail 1

Status
Not open for further replies.

mrfl

Technical User
Sep 25, 2006
4
US
I need help suppressing a detail section. I want the section to suppress when it doesn’t have 1 of 3 answers. The field I’m working with has multiple responses separated by an “&” so typical answers are

mother&emergency contact&guardian
father&co-guardian
brother/sister&emergency contact

I want to keep the records on the report if they have a guardian so the first and second records would appear on the report but the 3rd record would drop off.

I wrote this:
(InStr({Significant_Other_Info.Relationship_Value},"*Guardian*")= 0) or
(InSTr({Significant_Other_Info.Relationship_Value},"*Co-Guardian*")= 0) or
(InStr({Significant_Other_Info.Relationship_Value},"*Plenary Guardian*")= 0)

but everything is getting surpressed.
 
The problem arises that with the 'OR', one of those conditions will be true no matter what the data, thus suppressing the line. The logic would have to be re-visited.
 
InStr(ucase({Significant_Other_Info.Relationship_Value}),"*GUARDIAN*")= 0

You need to standardize the case as above. You only need this one test, since "guardian" is IN the other two options.

-LB
 
No luck, I tried lbass's code but every record is still being surpressed.
 
Please show the exact formula you used.

Where are you putting the formula?

-LB
 
If you are doing a suppress, don't you want "InStr(ucase({Significant_Other_Info.Relationship_Value}),"*GUARDIAN*")<> 0 ". Still seems like some of the records should have been displayed. Looks like the code needs to be put in the detail line to see where our logic has gone astray.
 
No, for suppression the code should be '='-- it is saying suppress records that don't have "GUARDIAN" in them.

-LB
 
I read the post wrong. Welcome to Monday. FYI: Yosemite is beautiful this time of year and free for the week. I am out of shape walking the trails. :)
 
I copied and pasted into the 'Supress' Section Expert of the detail section:

InStr(ucase({Significant_Other_Info.Relationship_Value}),"*GUARDIAN*")= 0

and all the records are supressed.
 
Duh, must be Monday. Get rid of the "*"'s. No wildcards used in Instr.
 
Well, I thank all of you - no 'Duh's. It worked!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top