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     [solved] Column totals on across-values within by-field

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[solved] Column totals on across-values within by-field
 Login/Join
 
Guru
posted
In the example below, the sales figures are in local currency of COUNTRY. I like to have column totals on SEATS within each COUNTRY. There seems no provision in GUI report painter to do what I want. Is there a simple way to do this? Thanks.
DEFINE FILE CAR
CURRENCY/A3 = IF COUNTRY EQ 'JAPAN' THEN 'YEN' ELSE 'EUR';
END
TABLE FILE CAR
SUM 
     SALES
     CURRENCY
BY COUNTRY
SUM 
     SALES
BY COUNTRY
BY CAR
ACROSS SEATS ACROSS-TOTAL
END
  

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


Developer Studio 7.6.11
AS400 - V5R4
HTML,PDF,XLS
 
Posts: 305 | Location: Winnipeg,MB | Registered: May 12, 2008Report This Post
Virtuoso
posted Hide Post
Hua, I'm not sure I understand your requirement completely. Is this perhaps what you need?

DEFINE FILE CAR
CURRENCY/A3 = IF COUNTRY EQ 'JAPAN' THEN 'YEN' ELSE 'EUR';
END
TABLE FILE CAR
SUM 
     SALES
     CURRENCY
BY COUNTRY
ON COUNTRY SUBTOTAL SUM. SALES
SUM 
     SALES
BY COUNTRY
BY CAR
ACROSS SEATS ACROSS-TOTAL
END


It would help if you provided a sample output illustrating what you expect.



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.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Guru
posted Hide Post
Thanks for your reply, njsden. Here is the sample output:

 
				SEATS			
				2	4	5	TOTAL
COUNTRY	SALES	CURRENCY	CAR	SALES	SALES	SALES	SALES
ENGLAND	12000	EUR	JAGUAR	0		12000	12000
			JENSEN		0		0
			TRIUMPH	0			0
*TOTAL ENGLAND			0	0	12000	12000  <====== TOTAL PER SEAT PER COUNTRY

FRANCE	0	EUR	PEUGEOT			0	0
*TOTAL FRANCE	0		0	0	0	0      <====== TOTAL PER SEAT PER COUNTRY
 	
ITALY	30200	EUR	ALFA ROMEO	25400	4800	30200
			MASERATI	0	0	0
*TOTAL ITALY				25400	4800	30200  <====== TOTAL PER SEAT PER COUNTRY

JAPAN	78030	YEN	DATSUN		43000		43000
			TOYOTA		35030		35030
*TOTAL JAPAN			0	78030	0        78030  <====== TOTAL PER SEAT PER COUNTRY

W GERMANY	88190	EUR	AUDI			7800	7800
			BMW		8900	71490	80390
*TOTAL W GERMANY			0	8900	79290	88190  <====== TOTAL PER SEAT PER COUNTRY

							
 


Developer Studio 7.6.11
AS400 - V5R4
HTML,PDF,XLS
 
Posts: 305 | Location: Winnipeg,MB | Registered: May 12, 2008Report This Post
Virtuoso
posted Hide Post
How about this?

DEFINE FILE CAR
CURRENCY/A3 = IF COUNTRY EQ 'JAPAN' THEN 'YEN' ELSE 'EUR';
END
TABLE FILE CAR
SUM 
     SALES
     CURRENCY
BY COUNTRY
SUM 
COMPUTE C_SALES/D10.2 = SALES; AS 'SALES'
BY COUNTRY
BY CAR
ACROSS SEATS ACROSS-TOTAL
ON COUNTRY SUBTOTAL SUM. C_SALES
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.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Virtuoso
posted Hide Post
Please disregard the code above. I just tested it and the results are far from right.



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.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Virtuoso
posted Hide Post
This one is better (I hope Smiler):

DEFINE FILE CAR
CURRENCY/A3 = IF COUNTRY EQ 'JAPAN' THEN 'YEN' ELSE 'EUR';
C_SALES/D10.2 = SALES;
END
TABLE FILE CAR
SUM 
     C_SALES AS 'SALES'
     CURRENCY
BY COUNTRY
SUM 
     SALES
BY COUNTRY
BY CAR
ACROSS SEATS ACROSS-TOTAL
ON COUNTRY SUBTOTAL SUM. SALES
ON TABLE NOTOTAL
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.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Guru
posted Hide Post
Awesome! Didn't think of using a different fieldname at detail level.
Thanks again, njsden! Smiler

Hua


Developer Studio 7.6.11
AS400 - V5R4
HTML,PDF,XLS
 
Posts: 305 | Location: Winnipeg,MB | Registered: May 12, 2008Report This Post
Virtuoso
posted Hide Post
I am no expert with the GUI but I think you can achieve that effect using the Report Painter, unless multi-verb request are disallowed there.



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.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Virtuoso
posted Hide Post
You're welcome! Please let us know if your adventure with Report Painter proves to be fruitful!

- 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.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Master
posted Hide Post
Quite intersting Neftali. you have readymade solutions. such a quick response. Smiler
 
Posts: 542 | Location: Dearborn, MI | Registered: June 03, 2009Report This Post
Guru
posted Hide Post
quote:
Originally posted by njsden:
You're welcome! Please let us know if your adventure with Report Painter proves to be fruitful!

- Neftali.


As fruitful in GUI. Use different field name for sure when summing the same field in mult-sorts.

Hua


Developer Studio 7.6.11
AS400 - V5R4
HTML,PDF,XLS
 
Posts: 305 | Location: Winnipeg,MB | Registered: May 12, 2008Report This Post
Virtuoso
posted Hide Post
quote:
you have readymade solutions


Not really Ram Smiler

As Hua had already done what we expect from anyone who asks for support in this forum (that is: do some research first, try by themselves and post workable sample codes using any of the IBI-provided files) it was rather easy to try different options until reaching the intended output. I even initially proposed some solution that was nowhere close to what Hua needed Red Face but thankfully it did not create more confusion (I guess Wink).



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.
 
Posts: 1533 | Registered: August 12, 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     [solved] Column totals on across-values within by-field

Copyright © 1996-2020 Information Builders