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

Showing Year Totals In Month Group

Status
Not open for further replies.

tjw2006

Programmer
Nov 16, 2006
103
0
0
GB
I have a report which shows an order breakdown by company for month and year, now as it stands the Month totals are showing up for each month and the Year totals are appearing at the end of the last month of the year...as you would expect! Is it possible to show the Year total with the Month total i.e. within the month group for each company?

Thanks in advance for any suggestions.
 
Yes, you will need to create a running total, and have it reset on the Month group.
 
Create a formula:

sum({table.orderamt},{table.date},"annually")

You can place this in the month group header or footer. Inserted summaries always reflect the level in which they are placed, so when you move them, they change value. Therefore, a formula is the solution in this case.

-LB
 
Thanks for that, but I've got two problems - firstly, the datasource doesn't have a date field as such, just a year field and month field and secondly, I will need the yearly total grouped by company, is there a way using the SUM function in conjunction with a group condition?

Thanks for your help with this.
 
How is your report grouped, i.e., what is your group #1,#2,#3?

-LB
 
Groups 1: Company 2: Year 3: Month & then the detail section
 
What I suggested earlier would give you the total by year per company, with the change to the group field:

sum({table.orderamt},{table.year})

Since the year group is nested within the company, this would show the amount per year for that company.

Another approach would be to insert a crosstab in the report footer and use company as the row, year, as the column, and amount as the summary field.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top