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

Year By Year Sales Comparison

Status
Not open for further replies.

wameri

Technical User
Mar 4, 2004
18
KE
Hi All,
Cystal 9, Access2000
I have tried but cant figure how to go about this.
The report is to show annual sales, month by month over a period of say five years, then graph the output.
In mind is a report that looks like;

2006 2005 2004 2003 etc
Jan $100 $900 $600 etc
Feb $99 $890
March $89
April etc
May
June
July $870
August
Sept
Oct
Nov
Dec $78 $700

Kindly assist and thanks in advance.
 
Crosstab, year by month? Never done one, but it should work.

Insert > Crosstab, if you've not used them before.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
As Madawc suggests, use a crosstab and in the columns place the date by year, in the row palce the date by month (those are options built in when selecting group options in the crosstab), then the value in the summary field as a sum.


Place the crosstab in the report header or report footer.

-k
 
Am getting some output but the rows are running upto the first month in the database to the last month in the current year ie 01/01/2003 upto 04/2006.
The columns are ok ie 2003,2004,2005 etc
This is what am getting

2003 2004 2005 2006
01/2003
02/2003
03/2003
etc
11/2003
12/2003
01/2004
02/2004
etc
11/2004
12/2004
01/2005
02/2005
etc
11/2005
12/2005
01/2006
02/2006
etc
04/2006
05/2006

I am not good in formulars but after inserting

datepart("m",{invheader.datesold}) for the rows,

the report now prints what I wanted.

Thanks once again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top