Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Report total on sort level

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Report total on sort level
 Login/Join
 
Member
posted
Hi

I would like to achieve the following report where the grand total is not just a one-liner but give totals per SEATS. Is this possible with a setting which I've missed? I know you can do it in a two step process where the totals are concatenated (read MORE) with the detail.

TABLE FILE CAR
SUM DEALER RETAIL
BY COUNTRY SKIP-LINE
BY SEATS AS SEATS
ROWS 2 OVER 4 OVER 5
ON TABLE COLUMN-TOTAL AS WORLD [OPTION...]
END
  COUNTRY     SEATS  DEALER_COST  RETAIL_COST
  -------     -----  -----------  -----------

  ENGLAND     2           11,719       13,978
              4           14,940       17,850
              5           11,194       13,491

  FRANCE      2                .            .
              4                .            .
              5            4,631        5,610

  ITALY       2           36,320       45,140
              4            4,915        5,925
              5                .            .

  JAPAN       2                .            .
              4            5,512        6,478
              5                .            .

  W GERMANY   2                .            .
              4            6,000        6,355
              5           48,563       58,377

  WORLD       2           48,039       59,118
              4           31,367       36,608
              5           64,388       77,478

Thanks
Ruhan

This message has been edited. Last edited by: ruhan,
 
Posts: 21 | Location: South Africa | Registered: April 22, 2005Report This Post
Virtuoso
posted Hide Post
Not a setting as far as I know. But also you can do it one step. This is not the neatest I've ever done, but you should get my drift:
DEFINE FILE CAR
N_COUNTRY/A10 = 'WORLD';
2SEATS/I4 = 2;
4SEATS/I4 = 4;
5SEATS/I4 = 5;
RETAIL2 = IF SEATS EQ 2 THEN RETAIL_COST ELSE 0; 
RETAIL4 = IF SEATS EQ 4 THEN RETAIL_COST ELSE 0; 
RETAIL5 = IF SEATS EQ 5 THEN RETAIL_COST ELSE 0; 

DEALER2 = IF SEATS EQ 2 THEN DEALER_COST ELSE 0; 
DEALER4 = IF SEATS EQ 4 THEN DEALER_COST ELSE 0; 
DEALER5 = IF SEATS EQ 5 THEN DEALER_COST ELSE 0; 


END
TABLE FILE CAR
SUM DEALER_COST RETAIL_COST 

DEALER2 NOPRINT DEALER4 NOPRINT DEALER5 NOPRINT 
RETAIL2 NOPRINT RETAIL4 NOPRINT RETAIL5 NOPRINT 
MAX.2SEAT NOPRINT MAX.4SEATS NOPRINT MAX.5SEATS NOPRINT

BY COUNTRY SKIP-LINE
BY SEATS
ON TABLE SUBFOOT
" "
"<N_COUNTRY<MAX.2SEATS<TOT.DEALER2<TOT.RETAIL2" 
"<+0> <MAX.4SEATS<TOT.DEALER4<TOT.RETAIL4" 
"<+0> <MAX.5SEATS<TOT.DEALER5<TOT.RETAIL5" 
ON TABLE SET STYLE *
HEADALIGN=BODY,GRID=OFF,$
TYPE=TABFOOTING, COLSPAN=4,$
TYPE=TABFOOTING, ITEM=1, POSITION=N1,$
TYPE=TABFOOTING, ITEM=2, POSITION=N2,$
TYPE=TABFOOTING, ITEM=3, POSITION=N3,$
TYPE=TABFOOTING, ITEM=4, POSITION=N4,$
ENDSTYLE
END


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Virtuoso
posted Hide Post
Or:
SET ASNAMES=ON
DEFINE FILE CAR
WORLD/A10 WITH COUNTRY = '*WORLD';
ONE/I1=1;
TWO/I1=2;
END

TABLE FILE CAR
SUM DEALER RETAIL
BY ONE AS ORDER
BY COUNTRY 
BY SEATS 
WHERE SEATS IN (2,4,5);
ON TABLE HOLD AS HOLD1 
END

TABLE FILE CAR
SUM DEALER RETAIL
BY TWO AS ORDER
BY WORLD AS COUNTRY
BY SEATS 
WHERE SEATS IN (2,4,5);
ON TABLE HOLD AS HOLD2 
END

TABLE FILE HOLD1
PRINT DEALER RETAIL
BY ORDER
BY COUNTRY 
BY SEATS 
ON TABLE HOLD AS HOLD3
MORE
FILE HOLD2
END

TABLE FILE HOLD3
SUM DEALER RETAIL
BY ORDER NOPRINT
BY COUNTRY UNDER-LINE
BY SEATS 
ROWS 2 OVER 4 OVER 5
ON TABLE PCHOLD FORMAT PDF
END
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Virtuoso
posted Hide Post
Was not happy with previous response, did not scale very well, not very neat. So using macguyver:
FILEDEF MACGUYVER MEM MACGUYVER.DAT (LRECL 3

EX -LINES *  EDAPUT MASTER, MACGUYVER, C, MEM,
FILE=MACG, SUFFIX=FIX,$
SEGNAME=ONE, $
FIELD=BLANK , , a1, a1, $
SEGNAME=TWO, PARENT=ONE, OCCURS=VARIABLE,$
FIELD=CHARACTER, ,a1, a1, $
FIELD=COUNTER, ORDER, i4, i4,$
EDAPUT*

EX -LINES * EDAPUT DATA,MACGUYVER,C,MEM, AB
EDAPUT*

JOIN BLANK WITH RETAIL_COST IN CAR TO BLANK IN MACGUYVER AS J1

DEFINE FILE CAR
BLANK/a1 WITH RETAIL_COST = '';
N_COUNTRY/a10 = IF CHARACTER EQ 'A' THEN COUNTRY ELSE 'WORLD';
END 

TABLE FILE CAR
SUM DEALER_COST AS 'Dealer Cost' RETAIL_COST AS 'Retail Cost'
BY CHARACTER NOPRINT
BY N_COUNTRY AS 'Country' SUBFOOT
" "
BY SEATS AS 'Seats'
ROWS 2 OVER 4 OVER 5
ON TABLE SET PAGE NOLEAD
ON TABLE SET NODATA 'n/a '
ON TABLE SET STYLE *
GRID=OFF,$
ENDSTYLE
END


(edit: just a check on certain options)

This message has been edited. Last edited by: Alan B,


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Member
posted Hide Post
Thanks for the suggestions. Closing.
 
Posts: 21 | Location: South Africa | Registered: April 22, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Report total on sort level

Copyright © 1996-2020 Information Builders