Crystal reports - Previous year  but same date range

kelsanit
kelsanit used Ask the Experts™
on
have crystal report where i am passing startdate and enddate to sub report.  In the sub report I have two running totals:

1: Requested Period sales:  uses startdate and enddate of values passed to sub report
2: Previous Period Sales:  want to use same date range but change year -1  

what is the best way to do this?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Senior Consultant
Most Valuable Expert 2011
Top Expert 2013
Commented:
I assume you are filtering based on the date

You can get last year with

StartDate
DateAdd('yyyy',-1, {YourStartDate})

EndDate
DateAdd('yyyy',-1, {YourEndDate})

mlmcc

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial