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] Format issue in HTMTABLE

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Format issue in HTMTABLE
 Login/Join
 
Gold member
posted
HI,

Please find teh code below :

 

-*query file 

TABLE FILE SQLOUT
PRINT
*
ON TABLE HOLD AS HLD_NC
END

DEFINE FILE HLD_NC
CHK/A100 = 'Generic+Branded Non-Cash volume';
BLANK/A10 = '' ;
FSTMON/A20 = 'JAN';
LSTMON/A20 = 'FEB';
GPI1/A20 = '&|nbsp;'|GPI;
NDC1/A20 = '&|nbsp;'|EDIT(NDC, '99999999999');
END


TABLE FILE HLD_NC
PRINT
GB
GPI1 AS 'GPI'
NDC1 AS 'NDC'
DRUG_NAME
ACROSS CHK AS ''
FOOTING BOTTOM
"GRAND TOTAL<+0>"
ON TABLE SET PAGE-NUM OFF
ON TABLE HOLD AS HLD_NC1 FORMAT HTMTABLE
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=REPORT,WRAP=OFF,$
TYPE=ACROSSVALUE,SIZE=10,BACKCOLOR='GRAY',STYLE=BOLD,JUSTIFY=CENTER,FONT='ARIAL',$
END
-RUN


TABLE FILE HLD_NC
SUM
COMPUTE SALES_BY_UNIT_TOT/D12.2MCB = (SALES_I/FILL_QTY_I); NOPRINT
COMPUTE COST_BY_UNIT_TOT/D12.2MCB = (COST_I/FILL_QTY_I); NOPRINT
COMPUTE RETAIL_BY_UNIT_TOT/D12.2MCB = (RETAIL_PRC_I/FILL_QTY_I); NOPRINT
COMPUTE PMU_TOT/D12.2% = 1-(COST_I/SALES_I); NOPRINT
COMPUTE SALES_RETAIL_TOT/D12.2% = (SALES_I/RETAIL_PRC_I); NOPRINT
PRINT
FILL_QTY_I/D12.2 AS 'Fill_Qty'
SALES_I/D12.2MCB AS 'Sales'
COST_I/D12.2MCB  AS 'Cost'
RETAIL_PRC_I/D12.2MCB AS 'Retail_Pr'
AWP_I/D12.2MCB  AS 'AWP'
BASE_COST_I/D12.2MCB  AS 'Base_Cost'
SALES_BY_UNIT_I/D12.2MCB  AS 'Sales/Unit'
COST_BY_UNIT_I/D12.2MCB  AS 'Cost/Unit'
RETAIL_BY_UNIT_I/D12.2MCB  AS 'Retail/Unit'
PMU_I/D12.2% AS 'PMU'
SALES_RETAIL_I/D12.2% AS 'Sales/Retail'
ACROSS FSTMON AS ''
FOOTING BOTTOM
"<TOT.FILL_QTY_I<+0><+0><TOT.SALES_I<+0><TOT.COST_I<+0><TOT.RETAIL_PRC_I<+0><TOT.AWP_I<+0><TOT.BASE_COST_I<+0><SALES_BY_UNIT_TOT<+0><COST_BY_UNIT_TOT<+0><RETAIL_BY_UNIT_TOT<+0><PMU_TOT<+0><SALES_RETAIL_TOT"
ON TABLE SET PAGE-NUM OFF
ON TABLE HOLD AS HLD_NC2 FORMAT HTMTABLE
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=ACROSSVALUE,SIZE=10,BACKCOLOR='GRAY',STYLE=BOLD,JUSTIFY=CENTER,FONT='ARIAL',$
END
-RUN

TABLE FILE HLD_NC
SUM
COMPUTE SALES_BY_UNIT_TOT1/D12.2MCB = (SALES_II/FILL_QTY_II); NOPRINT
COMPUTE COST_BY_UNIT_TOT1/D12.2MCB = (COST_II/FILL_QTY_II); NOPRINT
COMPUTE RETAIL_BY_UNIT_TOT1/D12.2MCB = (RETAIL_PRC_II/FILL_QTY_II); NOPRINT
COMPUTE PMU_TOT1/D12.2% = 1-(COST_II/SALES_II); NOPRINT
COMPUTE SALES_RETAIL_TOT1/D12.2% = (SALES_II/RETAIL_PRC_II); NOPRINT
PRINT
FILL_QTY_II/D12.2 AS 'Fill_Qty'
SALES_II/D12.2MCB AS 'Sales'
COST_II/D12.2MCB AS 'Cost'
RETAIL_PRC_II/D12.2MCB AS 'Retail_Pr'
AWP_II/D12.2MCB AS 'AWP'
BASE_COST_II/D12.2MCB AS 'Base_Cost'
SALES_BY_UNIT_II/D12.2MCB AS 'Sales/Unit'
COST_BY_UNIT_II/D12.2MCB AS 'Cost/Unit'
RETAIL_BY_UNIT_II/D12.2MCB AS 'Retail/Unit'
PMU_II/D12.2% AS 'PMU'
SALES_RETAIL_II/D12.2% AS 'Sales/Retail'
ACROSS LSTMON AS ''
FOOTING BOTTOM
"<TOT.FILL_QTY_II<+0><+0><TOT.SALES_II<+0><TOT.COST_II<+0><TOT.RETAIL_PRC_II<+0><TOT.AWP_II<+0><TOT.BASE_COST_II<+0><SALES_BY_UNIT_TOT1<+0><COST_BY_UNIT_TOT1<+0><RETAIL_BY_UNIT_TOT1<+0><PMU_TOT1<+0><SALES_RETAIL_TOT1"
ON TABLE SET PAGE-NUM OFF
ON TABLE HOLD AS HLD_NC3 FORMAT HTMTABLE
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=ACROSSVALUE,SIZE=10,BACKCOLOR='GRAY',STYLE=BOLD,JUSTIFY=CENTER,FONT='ARIAL',$
END
-RUN

TABLE FILE HLD_NC
PRINT
-*RETAL_M1_RETAIL_M2_NC AS '&RETMON1 Retail - &RETMON2 Retailkjsdkfjkdfk'
-*COMPUTE RETAL_M1_RETAIL_M211/D12.2B =
RETAL_M1_RETAIL_M2/D12.2MB AS '&RETMON1 Retail - &RETMON2 Retailkjsdkfjkdfk'
M2_SALES_M1/D12.2MCB AS '&RETMON1 Sales @ &RETMON2'
INCREMENTAL_SALES/D12.2MB AS 'Incremental Sales'
ACROSS BLANK AS ''
FOOTING BOTTOM
"<+0> <+0> <TOT.INCREMENTAL_SALES"
ON TABLE SET PAGE-NUM OFF
ON TABLE SET HTMLCSS ON
ON TABLE HOLD AS HLD_NC4 FORMAT HTMTABLE
ON TABLE SET STYLE *
TYPE=ACROSSVALUE,SIZE=10,BACKCOLOR='GRAY',STYLE=BOLD,JUSTIFY=CENTER,FONT='ARIAL',$
TYPE=FOOTING,LINE=1,FONT='ARIAL',SIZE=8,JUSTIFY=RIGHT,STYLE=BOLD,$

END

-RUN



SET HTMLFORMTYPE=XLS
-HTMLFORM BEGIN
<HTML>
<HEAD>
-INCLUDE rrxcxlst
</HEAD>
<BODY>
-*****************Print the heading and logo*****************
<TABLE WIDTH="210%" BORDER="0">
-*<tr>
-*<td>sdsds </td><td>sdsds </td>
-*</tr>

<TR>
<TD ALIGN="LEFT" colspan="28" >[b]<font size="3" face="Arial">Price Probe Tracking </font>[/b]</TD>
-*<TR>
-*<TR><TD>&|nbsp;</TD></TR>
<TD>
<IMG ALIGN="RIGHT" width="162" height="50" src="&excellogo"  border=0>
</TD>

<TR>
<TD colspan="2" CLASS="normalheading2" ALIGN="LEFT">Report Time Period: &DISP_YR_MON
-*&&Startdate - &&Enddate
</TD>
</TR>
<TR>
<TD colspan="2" CLASS="normalheading2" ALIGN="LEFT"> Report Run Date and Time : !IBI.AMP.DATE; &TOD3  </TD>
</TR>
-*<TR>
-*<TD colspan="4" CLASS="normalheading2" ALIGN="LEFT"> &|nbsp;  </TD>
-*</TR>

<tr>
<td> &|nbsp; </td>
</tr>
</TABLE>
<TABLE>
<tr>
  <td>!IBI.FIL.HLD_NC1;</td>
  <TD>!IBI.FIL.HLD_NC2;</TD>
  <TD>!IBI.FIL.HLD_NC3;</TD>
  <TD>!IBI.FIL.HLD_NC4;</TD>
</tr>
<tr></tr>
<tr></tr>
-*THIS IS ANOTHER SET OF HOLD FILES SIMILAR TO THE PREVIOUS ONE 
<tr>
  <td>!IBI.FIL.HLD_C1;</td>
  <TD>!IBI.FIL.HLD_C2;</TD>
  <TD>!IBI.FIL.HLD_C3;</TD>
  <TD>!IBI.FIL.HLD_C4;</TD>
</tr>
</TABLE>
</BODY>
</HTML>
-HTMLFORM END


I am using Across command and i need the output in excel one below the other. Hence i have used the HTMTABLE method.

I did not go ahead with the compound excel method using ACROSS and MATCH to get the desired output because of this reference line :

Reference: Usage Notes for Match Requests
The ACROSS and WHERE TOTAL phrases, and the COMPUTE command, are not permitted in a MATCH request.

Wanted to make sure whether iam in the right path.

Also since iam using the HTMTABLE method, when i use negative number in brackets , the color becomes red in desired output. How do we elimate this colour. I need it in black. Please find the sample code below :

 

DEFINE FILE CAR
TEST/D12.2MB = -20.2;
END

TABLE FILE CAR
PRINT CAR
TEST
ON TABLE HOLD AS HLD FORMAT HTMTABLE
END


SET HTMLFORMTYPE = XLS
-HTMLFORM BEGIN
<html>
    <body>
!IBI.FIL.HLD;
    </body>
</html>

-HTMLFORM END



Thanks!
Jan

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


WebFOCUS 7.6.9
Windows
Excel, HTML, PDF
 
Posts: 71 | Registered: April 17, 2009Report This Post
Expert
posted Hide Post
Jan,

Check out stylesheet commands, they may or may not help you.

Also, do not forget the search link above, as many of this tyope of question has been asked before - you just have to try a few different search phrases to ensure you get the results you really need (just like any other search engine!).

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
Gold member
posted Hide Post
Hi tony ,

Ofcourse i have searched in the forums and tried ways to achieve it but iam unable to do so.


WebFOCUS 7.6.9
Windows
Excel, HTML, PDF
 
Posts: 71 | Registered: April 17, 2009Report This Post
Expert
posted Hide Post
Jan,

When I run your sample code for the negative number, the results are shown in accountancy format but not in red. From the tools options menu within the MS Excel plugin, I can effect a change of colour as necessary.

If I remember correctly this was raised as a possible bug a while ago but cannot remember when or in what release the fix was provided. It might be a suggestion to raise an InfoResponse call to get the precise detail.

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] Format issue in HTMTABLE

Copyright © 1996-2020 Information Builders