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 Query Problem

Status
Not open for further replies.

AIMS

Technical User
Jan 16, 2003
20
0
0
US
I am using CR 8.5 and initially was using the following query;

if {stpuw_slide_labels.specimen_desc} like ('*transplant') then crGray else defaultattribute

This worked great until my end users also mentioned that another group needed to be added. So I modified the above query to what is below, but I don't get shading on both parameters, only the first one. What's wrong?

if ({stpuw_slide_labels.specimen_desc} like ('*transplant') or
{stpuw_slide_labels.specimen_desc} like ('native liver')) then crGray else defaultattribute
 
Hi,
No wild card in second Like statement - typo or mistake?

[profile]
 
No there is no typo or wild card. Should I use an =?
 
The only way I could recreate your problem was by adding extra spaces around 'native liver'. First you should probably check to see if the field prints results with native liver as separate words, and then you might try trimming the database field, as in:

if trim({stpuw_slide_labels.specimen_desc}) like '*transplant' or
trim({stpuw_slide_labels.specimen_desc}) like 'native liver' then crGray else defaultattribute

-LB
 
Guess what, it's case sensitive. I changed native to Native and it works. Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top