Link to home
Start Free TrialLog in
Avatar of Jeff S
Jeff SFlag for United States of America

asked on

Crystal Reports 10 - Suppress statement Help

I have a report with one detail band. In this detail band, I have multiple fields. This detail band needs to pull based on values entered into one specific field ...

Field Name = [Last Visit Date]

Three values that could be in this field.
'less than 2'
'2 or more'
'No detected Visit'

If the end user selects 'less than 2' only, I want the visits marked in my sql with 'less than 2' to print and suppress the '2 or more' and 'No detected Visit'.

If the end user selects '2 or more' only, I want the visits marked in my sql with '2 or more' to print and suppress the 'less than 2' and 'No detected Visit'.

Avatar of chikenhead
chikenhead
Flag of United States of America image

Typically I would set up a stored procedure that you can submit a parameter to in order to accomplish this.  When the user starts the report have them select the appropriate value from a list.
Avatar of Jeff S

ASKER

I have it set in SQL and in the third party application, the user has two checkboxs to pick from ....

__ Over 2 years
__ Under 2 years

When they select one, the records not meeting this condition need to be suppressed.
simply filter them off. You already have the parameter, and you said the column exists in the database as less than 2, no detected visit, or 2 or more.  

So go to Report> Selection Formula>Records
{?parameter} = {columnindatabase}
Avatar of Jeff S

ASKER

In my sql, I have set up filters as such:

(?VISITSOVER.VALUE.U? = 0 AND ('2YRStatus' <> '2 or more')) OR
(?VISITSOVER.VALUE.U? = 1)
)
AND
(?VISITSUNDER.VALUE.U? = 0 AND '2YRStatus' <> 'less than 2')) OR
(?VISITSUNDER.VALUE.U? = 1)
)

In Crystal, I created 2 Parameters .... VISITSOVER and VISITSUNDER.

I am confused on what you mean wykabryan.
ASKER CERTIFIED SOLUTION
Avatar of wykabryan
wykabryan
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jeff S

ASKER

Went the route of working out more in SQL, but your help was needed. Thanks