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] Subtotal and Grandtotal

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Subtotal and Grandtotal
 Login/Join
 
Platinum Member
posted
Hi,

Here's the sample code,

TABLE FILE CAR
SUM SALES
BY COUNTRY
BY SEATS
WHERE SEATS EQ 2 OR 4
ON COUNTRY SUMMARIZE AS 'Total'
END

Above the Grandtotal(last row), i need two subtotal rows, one for SEATS 2 and others for SEATS 4.

Sample output (last three rows):
Total for SEATS 2: ###
Total for SEATS 4: ###
TOTALS: ###

My idea is to have two TABLE FILE requests and merge them together later or position the 2nd request to the very end of the first report.

Is there any better techique than the above one.
I dont prefer using ON TABLE SUBFOOT method.
Output format is PDF.

Thanks
Atturhari
WF-769

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


WF 7.7.02 on Windows 7
Teradata
HTML,PDF,EXCEL,AHTML
 
Posts: 165 | Registered: September 29, 2008Report This Post
Expert
posted Hide Post
Try something along the lines of -
DEFINE FILE CAR
  SALES2/D9.2 = IF SEATS EQ 2 THEN SALES ELSE 0;
END
TABLE FILE CAR
SUM SALES
    SALES2 NOPRINT
BY COUNTRY 
BY SEATS
WHERE SEATS EQ 2 OR 4
ON COUNTRY SUMMARIZE AS 'Total'
ON TABLE SUBFOOT
"Total for Seats = 2 <TOT.SALES2"
END

You'll have to play with report positioning and placement but it gives you the basic idea (I wouldn't want to deprive you of a creativity opportunity Wink)

I realise that you'd prefer not to use SUBFOOT but you'll probably end up having to handle data twice or more which is inefficient and unecessary.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Platinum Member
posted Hide Post
thanks Tony for your input.
I have an "ACROSS" field in my real request.
Thats the reason i avoid SUBFOOT.


WF 7.7.02 on Windows 7
Teradata
HTML,PDF,EXCEL,AHTML
 
Posts: 165 | Registered: September 29, 2008Report This Post
Expert
posted Hide Post
I understand the SUBFOOT issue and using ACROSS, but there are ways around it by understanding what prefixes to use and when -

DEFINE FILE CAR
  SALES2/D9c = IF SEATS EQ 2 THEN SALES ELSE 0;
  SALES4/D9c = IF SEATS EQ 4 THEN SALES ELSE 0;
  SALEST/D9c = SALES;
  CONTINENT/A10 = DECODE COUNTRY('ENGLAND' 'Europe' 'FRANCE' 'Europe' 'ITALY' 'Europe' 'JAPAN' 'Asia' 'W GERMANY' 'Europe' ELSE 'Unknown');
END
TABLE FILE CAR
SUM SALES2 NOPRINT
    SALES4 NOPRINT
    SALEST NOPRINT
SUM SALES  AS 'Sales'
BY COUNTRY 
BY SEATS
ACROSS CONTINENT AS ''
WHERE SEATS EQ 2 OR 4
ON TABLE SUBFOOT
""
"Total for Seats 2: <SUM.SALES2"
"Total for Seats 4: <SUM.SALES4"
"Total <SUM.SALEST"
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
  GRID=OFF, SIZE=10, HEADALIGN=BODY, $
TYPE=TABFOOTING, ITEM=1, COLSPAN=2, $
TYPE=TABFOOTING, ITEM=2, JUSTIFY=RIGHT, $
ENDSTYLE
END

gives
                     Asia    Europe 
COUNTRY     SEATS    Sales    Sales 
-----------------------------------
ENGLAND         2        .    22000 
                4        .    10000 
ITALY           2        .    25400 
                4        .     4800 
JAPAN           4    78030        . 
W GERMANY       4        .     8900 
  
Total for Seats 2:            47400 
Total for Seats 4:           101730 
Total                        149130 

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Platinum Member
posted Hide Post
Tony,

I want the "Total for SEATS 2", other TOTALS splitted between ASia and Europe. Also, i have two SUM fields.

My ACROSS field is a dynamic DATE field.

Is this all possbile in SUBFOOT? Would be more than happy if you have any trick for it.

Thankyou for your efforts.


WF 7.7.02 on Windows 7
Teradata
HTML,PDF,EXCEL,AHTML
 
Posts: 165 | Registered: September 29, 2008Report This Post
Expert
posted Hide Post
Looks like you'll be doing multiple passes of your data then. Let's hope there are not too many records.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report 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] Subtotal and Grandtotal

Copyright © 1996-2020 Information Builders