Link to home
Start Free TrialLog in
Avatar of Lawrence Salvucci
Lawrence SalvucciFlag for United States of America

asked on

Crystal Report Dates

I'm trying to create a record selection criteria for my report but I want to use CurrentDate less 1 day to always get the previous day for my report. But I need it to skip weekends (and possibly holidays). How can I write this to always get the previous workday? This is how I have it set up right now but it will give me Sunday results if I ran this on a Monday.

{syecaudt.ftdate} in CurrentDate -1

Open in new window

SOLUTION
Avatar of Mike McCracken
Mike McCracken

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 Lawrence Salvucci

ASKER

I would like to use our holidays, yes. How would I go about putting our holidays in this selection criteria?
Avatar of Mike McCracken
Mike McCracken

I am not sure if you can or not.  There is a formula for WorkingDays that incorporates holidays.  I'll have to look at it to see if that method can be used.

Are you scheduling this to run M-F or is it run manually?

If manually, is there any reason not to have an optional date parameter so this could be run for any date?  Default would be to run for yesterday if nothing is entered.

mlmcc
I want to set this up to run automatically every day M-F.
ASKER CERTIFIED SOLUTION
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
Thank you very much for your help!