Focal Point
[SOLVED] Subtotal only for multiple lines

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/440100763

February 10, 2010, 12:41 PM
rfbowley
[SOLVED] Subtotal only for multiple lines
My client wants to see a subtotal line if and only if there are multiple lines in the sort group. The old school way of doing this is:

TABLE FILE CAR
PRINT SEATS
COMPUTE TEST/I11 = IF CAR = LAST CAR THEN TEST +1 ELSE 1; NOPRINT
BY COUNTRY
BY CAR
ON CAR SUBTOTAL WHEN TEST GT 1
END



I thought I had read that in one of these releases after 7.6 there was an adjective added to the SUBTOTAL command to do this, or am I just getting old and having halucinations? The client is using 7.6.8 on a Unix box.

This message has been edited. Last edited by: Kerry,


Robert F. Bowley Jr.
Owner
TaRa Solutions, LLC

In WebFOCUS since 2001
February 10, 2010, 12:50 PM
njsden
I can use the MULTILINES keyword in WF 5.3.4 to accomplish what you need:

TABLE FILE CAR 
PRINT 
        SEATS 
BY COUNTRY 
BY CAR 
ON CAR SUBTOTAL MULTILINES
END




Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
February 10, 2010, 12:53 PM
njsden
quote:

MULTILINES
Suppresses the printing of a subtotal line for every sort break that has only one detail line, since the subtotal value is equal to this one value. Note that MULTI-LINES is a synonym for MULTILINES. MULTILINES is not supported with horizontal (ACROSS) sort fields.




Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
February 10, 2010, 12:55 PM
njsden
quote:
or am I just getting old and having halucinations?


Aren't we all? Music



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
February 10, 2010, 02:06 PM
rfbowley
Ok, so MULTILINES came out WAY before I thought it did.

Thanks for the help all


Robert F. Bowley Jr.
Owner
TaRa Solutions, LLC

In WebFOCUS since 2001
February 16, 2010, 02:11 PM
njsden
Robert,

Could you please switch the topic to [SOLVED] or [CLOSED]?

Thanks,
- Neftali.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.