Link to home
Start Free TrialLog in
Avatar of LVGICT
LVGICT

asked on

suppressing outcomes in Crystal 10

I'm trying to produce a report in Crystal 10 where the outcome is suppressed if there is a date in one of the fields.  It's a list of contracts and if they have an end date in the end date field I don't want these to show.

I've never used Sequel so can't do a stored procedure.  Is there a way of doing this please?
Avatar of wykabryan
wykabryan
Flag of United States of America image

yes, right click on section headers> go to section expert> suppression.  There you will see a X+2 button.  Click on it and it will open up a formula box to you. Something like this should work:

date({columnA})='01/01/2006' OR
date({columnB})='01/01/2006' OR
ect.. Do this for all the columns that you want to check.

The other way, which is preferred in my opinion, is rather than have a static date turn it into a parameter.  Then feed the parameter into the condition.  Something like this:

Parameter Name: SDate
Data Type: String


Then in your formula, using the same instructions from above, add the parameter to the formula
date({columnA})=date({?SDate})OR
date({columnB})=date({?SDate}) OR
ect.. Do this for all the columns that you want to check.


Hope this helps.
Avatar of LVGICT
LVGICT

ASKER

hi

it's not  quite what i was after as i don't want to have to go through all the columns as there are quite a lot of them, all with different dates.

I tried the suppression option and keyed in:
{course_package.end_date} > 02/12/2003 09:41:07
(as all end dates start after this).  however, it doesn't like the date format and i haven't been able to check if it works.  Any ideas gratefully received.
Unfortunately you will have to look at any and all column to ensure that you are suppressing.

>{course_package.end_date} > 02/12/2003 09:41:07
>(as all end dates start after this).  however, it doesn't like the date format and i haven't been able to check if it works.  >Any ideas gratefully received.

Date({course_package.end_date}) > date('02/12/2003 09:41:07')

or you could just do:
{course_package.end_date} > '02/12/2003 09:41:07'
This way will compare both date and time.  
ASKER CERTIFIED SOLUTION
Avatar of frodoman
frodoman
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
I would actually take this a step further.  Why suppress the fields at all?  Why not use the select expert to filter the records for only the records you want in the first place?

Navigate to Report|Edit Selection Formula and use frodoman's formula:

not(isNull({course_package.end_date}))

This will filter the report so that only records with actual end dates are returned.

~Kurt
Avatar of LVGICT

ASKER

that's brilliant.  thanks very much