Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Parameters - Last year to this year ???

Status
Not open for further replies.

AlexCpd

Technical User
Feb 25, 2004
3
US
I am using CR-8 and I am trying to create a monthly report that compares the same month last year with this year example > Feb 03 with Feb 04 and then show any percent% change for the values...

Any help would be greatly appreciated!

Alex
 
There may be an easier way but I would do this
Create two date parameters, start and end
In selection criteria add

datefield between {?Start} to {?End} and
datefield between dateadd("yyyy", -1,{?Start}) to dateadd("yyyy", -1,{?End})

Create two formuals which return your amount values for the two date ranges, place in details and then sum each one, suppress details, you will then have two totals for each date range which you can display or use in a formula to calculate %age change.

The dataadd formula will not be passed to SQL statement so you will bring back all data to report so if you have a big database it will be slow to run.

Ian
 
Ian,

I think you mean "or" not "and"--a date can't be in both years. :)

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top