Hi all,
I was wondering if I could get some help on a custom formula in Crystal. The report is intended to pull a rolling month to date for this year and last year daily from a Clarity database. Currently it works perfectly up until the turn of the month when the report completely blanks and gives an error. I'm a bit out of my depth with Crystal since my role hasn't been a report writer in Crystal for a number of years...and I was no where near as sophisticated.
Using the stock function produces bad results as last year to date we have that days data, where this year the day is still happening.
Included are the custom commands - Start (pulls day 1 of this month, or last month after the month ends):
if date(year(currentdate), Month(currentdate), day(currentdate)) = Date(year(currentdate), month(currentdate), 1)
Then date(year(currentdate), month(currentdate)-1, 1)
Else date(year(currentdate),month(currentdate),1)
End date/yesterdays date:
if date(year(currentdate),month(currentdate), day(currentdate)-1) = date(year(currentdate), month(currentdate), 1)
Then date(year(currentdate), month(currentdate)-1, day(dateserial(year(currentdate), month(currentdate)-1, 1-1)))
Else date(year(currentdate), month(currentdate), day(currentdate)-1)
Thanks in advance...this is driving me crazy!