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

Show 3 years worth of sales totals

Status
Not open for further replies.

grecon

Technical User
Mar 8, 2007
78
US
Hi I have a report for total customer purchases, but I want to show three years worth and have each year in their own column. Right now I'm using one date range (ie 01/01/2008 - 01/01/2011)and it just totals them all together, I want to be able to break out each years total. How do I do this? Thanks
 
Group by your date field then click options and for "The section will be printed:" dropdown, select for each year. That should group your dates by year.

-DJWW
 
I understand what you are saying but if I do that it still puts the totals in one column since I have it as sum of invoice.inv_total I don't know how to get each years total in its own column???????
 
My mistake. To do that, you'll need to make a subreport for each year. What I've done in the past is make 4 reports (for 3 years). The main report is blank, no tables or anything. The 3 other reports, are for each year. The first one, for the record selection, use: {table.date} in Date(2008, 01, 01) to Date(2008, 12, 12)

Do the same thing for the other two reports and switch the year. Put each report in the main blank report in the detail section and don't link them (since there's no table to link them to). When you run it, if there are any other parameters, they should pop up normally.

Hope that helps.

-DJWW
 

I don't know what else you want to do with this data, but a crosstab would easily give you three columns, one for each year, with summarized sales totals.

 
Thanks I just realized a cross tab would be best and I did that but have a question. I just posted that ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top