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.
Iam using the code as shown below and below is the output which Iam getting: CODE:
SQL SQLORA PREPARE REPORT FOR SELECT * FROM TABLE1; END
TABLE FILE REPORT PRINT ELEMENT INFO JAN_1ST_WK JAN_2ND_WK JAN_3RD_WK JAN_4TH_wK END -RUN
OUTPUT:
ELEMENT INFO JAN_1ST_WK JAN_2ND_WK JAN_3RD_WK JAN_4TH_WK Apparels abc IM units 22146 22106 22506 22645 Apparels xyz 1M units 960 710 980 910 Apparels lmn 1M units 960 710 980 910 Toys abc IM units 49947 49774 50143 50288 Toys xyz 1M units 505 519 609 258 Toys lmn 1M units 505 519 609 258
Now I need to add a new row named %units(based on some calculations) under xyz 1M units. I know how to add the new column but Iam not sure on how to add the new row ?
Can anyone please help me on how to get this done. Any help would be much appreciated.
Thanks a lot in advance for all your help!
Thanks, IPThis message has been edited. Last edited by: info4pal,
When you add code (or sample) in your post use the [ code ] yourcode [/ code ] tag (you must remove spaces) to enclose it. You will then be able to justify it so it will become more readable.
First thing you must know about "adding" row it's that it must have same column's format as other columns in the table. So except if you % row will only be a whole number without decimal, you'll need to have all column's format converted to match.
Second, the easiest way to add a row is to have two hold files and perform a MORE on them.
TABLE FILE CAR
SUM SEATS
BY COUNTRY
BY TOTAL COMPUTE ROWNAME/A10 = 'NB SEATS';
ON TABLE HOLD AS TMP1A FORMAT FOCUS
END
-RUN
TABLE FILE TMP1A
PRINT COMPUTE COL2 /A8 = FPRINT(SEATS, 'I3', 'A8');
BY COUNTRY
BY ROWNAME
ON TABLE HOLD AS TMP1B FORMAT FOCUS
END
-RUN
TABLE FILE CAR
SUM COMPUTE PCT/D5.1 = (RETAIL_COST - DEALER_COST) / DEALER_COST * 100;
BY COUNTRY
BY TOTAL COMPUTE ROWNAME/A10 = 'RATIO';
ON TABLE HOLD AS TMP2A FORMAT FOCUS
END
-RUN
TABLE FILE TMP2A
SUM COMPUTE COL2/A8 = FPRINT(PCT, 'D5.1', 'A8');
BY COUNTRY
BY ROWNAME
ON TABLE HOLD AS TMP2B FORMAT FOCUS
END
-RUN
TABLE FILE TMP1B
PRINT COL2
BY COUNTRY
BY ROWNAME
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
PAGESIZE='Letter',
ORIENTATION=LANDSCAPE,
$
TYPE=DATA,
COLUMN=COL2,
JUSTIFY=RIGHT,
$
ENDSTYLE
MORE
FILE TMP2B
END
-RUN
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013
From your question it seems like you might be looking for SUBTOTAL or RECOMPUTE, but without an example of the desired output that's the best I can guess.
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :