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

Field suppression for two conditions

Status
Not open for further replies.

xidnad

Technical User
Oct 26, 2004
12
US
I am using Crystal 7.0 and trying to suppress a text field, using the Format Editor, based on two different conditions. The suppression works with either condition but ignores the second condition if I try to use them together. I am trying to use:
{ado.Influ3Code} like "OVL" and {ado.Influ3Percent} = -100 or {ado.UnitType} like "PPAV"
I have also tried
({ado.Influ3Code} like "OVL" and {ado.Influ3Percent} = -100) or {ado.UnitType} like "PPAV"

What am I missing?

Thanks
 
Use more parentheticals to help define what you need, and note that you're using a LIKE condition ithout wildcards, so look at the asterisk I added in there:

(
{ado.Influ3Code} like "OVL"
and
{ado.Influ3Percent} = -100
)
or
(
{ado.UnitType} like "PPAV*"
)

Asterisk added to the like clause, if you want an exact match, use the = not a LIKE.

This appears as though it should work, however you're generally better served to post technical information:

Crystal version
Dtabase/connectivity used
Example data
Expected output

-k
 
Thanks for your remarks once I made those changes and reversed the order
({ado.UnitType} like "*PPAV*") or({ado.Influ3Code} like "*OVL*" and {ado.Influ3Percent} = -100)
it worked.
 
Odd that reversing the order would have anything to do with it...but Crystal kind be kinda funny at times...

The asterisks are key though if you're doing a LIKE.

Glad that you worked it out.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top