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!

Suppress subtotals on only one column

Status
Not open for further replies.

ekl0908

Programmer
Aug 5, 2005
9
US
I'm working on a report which calculates the average price as follows:

-COMPUTE AVG-PRC/P12.2SM = PRODUCT_VALUE/UNITS_PACKED; AS 'Avg,Price'


The output should have subtotals for the units packed and the amount, but not for the average price.
Originally, I used a SUBTOTAL MULTILINES statement, as follows:

ON CUSTNAME SUBTOTAL MULTILINES AS 'Total for'

The report printed an average price subtotal which was incorrect.

I changed the statement to the following:

ON CUSTNAME SUMMARIZE AS 'Total for'

This statement caused the report to recalculate and print the correct average price in the subtotal, but then it printed a subtotal even for customers who purchased only one style.

What I am looking for is a way to keep the MULTILINES statement, so that there is no subtotal on any customer who has only one line, but suppress the subtotal on only the average price column. Any ideas on how to do this?

 
Any reason not to use:

ON CUSTNAME SUMMARIZE [red]MULTILINES[/red] AS 'Total for'
 

When I try SUMMARIZE MULTILINES, it prints a subtotal for each BY field. I ended up using ON CUSTOMERNAME SUBTOTAL MULTILINES FIELD1 FIELD3 FIELD4. The only fields that print subtotals then are the one I specified.

Thank you for your help!



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top