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

Percentage of - With a manual Crosstab

Status
Not open for further replies.

Jcfx

MIS
Oct 8, 2004
134
US
CR 9 on a SQL database. Taking a straightforward crosstab that showed our top customers and adding three columns. Percentage of Labor, Percentage of Parts, and Percentage of TotalSales all by Customer. I created a manual cross tab as per the Faq.

This is what I have so far.

Customer Fee Labor Labor% Part Part% Services Total Tot%
ABC 10.00 15.00 0 0 25.00
JoeSmoe 0 25.00 10.00 0 25.00
Acme 12.00 10.00 12.00 5.00 39.00
____________________________________________________________
Gtotal 22.00 50.00 22.00 5.00 89.00

Total is a running Total that changes on group by Customer.
In the Detail I have formula's similar to the following:
If Orderln.linetype = "fee" then Orderln.linetotal else 0

Detail is suppressed with subtotals by group in the group footer.

I am not sure how to get my percentages for each customer though, since they will be based off the grand totals.

Probably something simple that I am just missing, any help would be appreciated.




Julie Cox
CR Pro Version 9.2
 
I think I can get the percentages I want using the following for each column:
Code:
PercentOfSum ({@Labor}, {CUSTOMERS.NAME})

except for the Total Column which is based on a running total <Running total of orderln.linetotal by customer>.



Julie Cox
CR Pro Version 9.2
 
I was able to figure this out taking a different approach to the total field.

Thank you

Julie

Julie Cox
CR Pro Version 9.2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top