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.
My client wanted to display hyphen "-" instead of zero values in an Excel report. I can only find the zero-suppressing format, which just display nothing in the cell. So here is the question:
1. Is it possible to do this natively in WebFOCUS?
2. If #1 is no, can I pass an Excel cell formatting string from WebFOCUS to the output spreadsheet?This message has been edited. Last edited by: bug,
7.66 and 7.704 System: Windows / AIX / Linux Output: Mostly HTML, with some PDF, Excel and Lotus(!)
Posts: 147 | Location: Toronto (GTA) | Registered: May 25, 2005
SET NODATA = -
-RUN
TABLE FILE CAR
SUM
SALES
COMPUTE NEW_COL/D12 MISSING ON = IF SALES EQ 0 THEN MISSING ELSE SALES;
BY COUNTRY
ON TABLE HOLD AS EXL1 FORMAT HTMTABLE
END
-RUN
SET HTMLFORMTYPE='XLS'
-RUN
-HTMLFORM BEGIN
<HTML>
<BODY>
!IBI.FIL.EXL1;
</BODY>
</HTML>
-HTMLFORM END
Thanks Ram! This may work for non-monetary data. When the numbers are dollar amount, a left-justified dollar sign ($) is required. If I define the missing data as "$ -" then the dollar sign is not justified with other non-zero value amounts. Any work around for this?
7.66 and 7.704 System: Windows / AIX / Linux Output: Mostly HTML, with some PDF, Excel and Lotus(!)
Posts: 147 | Location: Toronto (GTA) | Registered: May 25, 2005
yes, you are correct. If you require $ and space with proper alignment, then use FTOA instead of NODATA. Here is the sample code.
TABLE FILE CAR
SUM
SALES
COMPUTE NEW_COL/A80 = IF SALES EQ 0 THEN '$ &|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;&|nbsp;-' ELSE FTOA(SALES,'(D20M)','A40');
BY COUNTRY
ON TABLE HOLD AS EXL1 FORMAT HTMTABLE
ON TABLE SET STYLE *
TYPE=DATA, COLUMN=NEW_COL, JUSTIFY=RIGHT, $
ENDSTYLE
END
-RUN
SET HTMLFORMTYPE='XLS'
-RUN
-HTMLFORM BEGIN
<HTML>
<BODY>
!IBI.FIL.EXL1;
</BODY>
</HTML>
-HTMLFORM END
Ram If you do it this way I wonder if you still are able to ad the sum to that column, since it now is a string that looks like a value In excel I am rather sure it won't give you a god result.
The template is the better solution
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006