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

Subtotal - row level by text field Cross Tab

Status
Not open for further replies.

jlr123

Technical User
Feb 24, 2014
117
0
16
US
I have a cross tab report where {AR_InvoiceHistoryHeader.CustomerNo}+" "+{AR_Customer.CustomerName}+ " "+{AR_InvoiceHistoryHeader.ShipToCity}+{AR_InvoiceHistoryHeader.ShipToState}+" - "+{AR_Customer.SalespersonNo} is my main row. I want to subtotal all columns (which is the summary of AR_InvoiceHistoryDetail.ExtensionAmt )by left ({AR_InvoiceHistoryHeader.CustomerNo},4)

Can you please tell me how to accomplish this? attaching view of cross tab.
Thanks.
 
 https://files.engineering.com/getfile.aspx?folder=ade01e0c-c9f2-4d54-b846-679dcf34e21d&file=Cross_tab_view.docx
Hi,

Assuming that {AR_InvoiceHistoryHeader.CustomerNo} is always numeric characters, if CustomerNo is a text field, then you'd do better using an Integer function rather than the 4 left-most characters, since, I noticed, that the first CustomerNo in your example has 5 Integer characters (10573.00).

I would venture to guess that CustomerNo in its database form in your ERP system, has no decimal values, and those have been added by this report to differentiate the CityState values within a CustomerNo in this report. If you have access to the data the report was using, then, I'd guess, you'd have CustomerNo alone to use to subtotal.

This is a drawback to using reports as a source for further reporting. These thing become much harder to extract as you get a report of a report of....ad nauseam.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein
AD1D550E-FCB5-4AB6-A3C8-1F86CACE2554_ne1bcz.jpg
 
The customer no is numeric and the customer numbers in our ERP has decimal point because we have a Parent and sub accounts. I want to total the extension amount by the so called "parent" in the cross tab. Is that possible?
 
Add your formula: left(custno,4) as your first (higher order row in the crosstab.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top