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

Suppressing details using SQL Expression? 1

Status
Not open for further replies.

ITCPhil

Technical User
Jun 30, 2005
181
CA
I am working in Crystal 10 pulling data from Oracle. The client wants to know the number of incidents reported in the past year on hardware failure. That is too vague to just pull data categorized as hardware since it's not necessarily a failure, it could be an installation.

So anyways, I am searching through the resolution of incidents for particular words. I have 4 words so I did 4 SQL expressions which I then make reference to in the section expert under the Suppress option. I placed them like so :

{%broken} = 0 or
{%failed} = 0 or
{%failure} = 0 or
{%replaced} = 0

where the expressions are :
{fn LOCATE('roke',"ALL_REQUESTS"."RESOLUTION" )}
{fn LOCATE('failed',"ALL_REQUESTS"."RESOLUTION" )}
{fn LOCATE('ailure',"ALL_REQUESTS"."RESOLUTION" )}
{fn LOCATE('eplace',"ALL_REQUESTS"."RESOLUTION" )}

Now, if I just place one of them, it works, but the second I add another expression, it suppresses everything in the report. How can I make it suppress based if the item matches any of the 4 expressions?

((While on this subject, is it possible to place all 4 conditions in the same SQL expression? I don't mean a command, I mean doing it in CR like I did here))

Thanks in advance,
Phil
 
For suppression, I think you want "ands" not "ors". You would be better off using this in the record selection area, and here you should use ors:

{%broken} > 0 or
{%failed} > 0 or
{%failure} > 0 or
{%replaced} > 0

This will only return the relevant records.

-LB
 
I see your point about record selection, I am running it now and hopefully it will work properly! thank you.


Phil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top