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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

YTD SALES, YTD COST, YTD GM - How to do it? 2

Status
Not open for further replies.
Jan 13, 2004
19
AU
Hi,

Crystal 8.05

I am trying to create formuals for three columns:
YTD SALES, YTD COST, YTD GM(Gross Margin)

Is there a quick way of doing it without hardcoding the dates. For the dates I am going to use the invoice dates.

My requirements are:

I want the report to show for example YTD SALES, YTD COST, YTD GM for last year 2002 To 2003and then to show the current year 2003 TO 2004 of YTD SALES, YTD COST, YTD GM

And they will be grouped by Item Group and Customer.

Thanks

 
In Crystal 8.5, you can do running totals that test for values like date.

If you want the date exactly a year ago, try
Code:
DateAdd("yyyy", -1, {your.date})
If you want the start of the calendar year:
Code:
date(Datepart("yyyy", {your.date}), 01, 01)

You can also do two or three calendar years ago, maybe applying these methods to currentdate

Madawc Williams
East Anglia, Great Britain
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top