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

Formatting groups vertically then horizontally 1

Status
Not open for further replies.

Juice05

Programmer
Dec 4, 2001
247
US
I have a formatting issue that I can't quite get to work. I am trying to create a report that will display expenses vertically, then I need the amounts displayed horizontally. My data looks like this:

Year Quarter Expense Cost
2006 1 Food 200
2006 1 Clothing 400
2006 2 Gas 100
2006 2 Food 180
2006 3 Food 150
2006 4 Gas 160

I need the information Displayed like this:

Q1 Q2 Q3 Q4 Total
Food 200 180 150 0 530
Clothing 400 0 0 0 400
Gas 0 100 0 160 260

Total 600 280 150 160 1190

Any help would be greatly appreciated.
 
Insert a crosstab in the report footer where you use expense as the row field, quarter as the column, and sum of cost as the summary. If your data includes multiple years, then use Year as your first column field, and Quarter as your second column field.

-LB
 
That did the trick...Thanks a million.

One question though...why dos the cross tab need to be in the report footer?
 
It doesn't have to be. You could have it in the report header, too--I just thought it looked like you wanted to show the data first followed by the crosstab. Note that a crosstab placed in a group section will show results only for that particular group instance. If you had a group on year, you could place the crosstab in the year group, and then it would show results by quarter for that particular year--one crosstab per year.

-LB
 
Thanks for sharing your knowledge. You have saved me a lot of time and frustration.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top