Focal Point
using htmtable without the table...

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4621092172

February 12, 2008, 03:55 PM
funsutton
using htmtable without the table...
Is there a way to strip just the value out of a report saved as htmtable? I normally get this:

 !--Olap Javascript-->
<TABLE BORDER CELLPADDING=1>
<TR>
<TD ALIGN=RIGHT>
$62,420,380.98</TD>
</TR>
</TABLE> 


All I want is $62,420,380.98

Thanks.


-Brian

Webfocus v7.6.1 on Windows XP
February 12, 2008, 04:03 PM
Tony A
Brian,

You just want the value shown on the screen? Use FORMAT HTML ...

Otherwise, a little more explanation please.

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 
February 12, 2008, 04:11 PM
wf1998
quote:
$62,420,380.98

Use ALPHA Format




Env Prod:WebFOCUS 7702 ,Windows xp on 64, SQL Server 2008, IRF Tool
Env 1 Local: DevStudio 7702 - MS Windows XP SP2 - Apache Tomcat 5.0.28
Output: HTML, Excel and PDF
February 12, 2008, 04:56 PM
funsutton
Okay, here's more explanation. The report is below (just the important part).

What I want is for the 2 reports to sit side by side in the table cell, however since the output of "htmtable" puts them inside a table it puts one table on top of the other. Now, my goal would be to get just the value of the report in the output without the table around it. This table is much larger than I am showing here, just fyi.

  
TABLE FILE RORSTAT
SUM RORSTAT_GRS_NEED/D12CM AS ''
BY RORSTAT_AIDY_CODE NOPRINT
WHERE RORSTAT_AIDY_CODE EQ '&AID_YEAR2'
WHERE RORSTAT_BGRP_CODE LIKE '&LEVL'
WHERE RORSTAT_GRS_NEED GT RORSTAT_UNMET_NEED
WHERE RORSTAT_GRS_NEED GT '0'
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE HOLD AS RPRT2_1 FORMAT HTMTABLE
END

TABLE FILE RORSTAT
SUM RORSTAT_PIDM AS ''
BY RORSTAT_AIDY_CODE NOPRINT
WHERE RORSTAT_AIDY_CODE EQ '&AID_YEAR2'
WHERE RORSTAT_BGRP_CODE LIKE '&LEVL'
WHERE RORSTAT_GRS_NEED GT RORSTAT_UNMET_NEED
WHERE RORSTAT_GRS_NEED GT '0'
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE HOLD AS CNT2_1 FORMAT HTMTABLE
END

-HTMLFORM BEGIN
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0">
<TR>
<TH ALIGN="RIGHT">DOCUMENTED NEED: </TH>
<TD>!IBI.FIL.RPRT2_1; !IBI.FIL.CNT2_1;</TD> <----------------This is the problem line with two reports side by side.
</TR>
</table>
-HTMLFORM END



-Brian

Webfocus v7.6.1 on Windows XP
February 12, 2008, 05:21 PM
Tony A
Brian,

If you want them side by side then just change your HTML to -

-HTMLFORM BEGIN
......
<TD>!IBI.FIL.RPRT2_1;</TD>
<TD>!IBI.FIL.CNT2_1;</TD>
......
-HTMLFORM END

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 
February 12, 2008, 05:37 PM
funsutton
I wish it were that simple Tony, however I really need them in the same table cell.

So, I guess there's no way to just get the value without the formatting/table?


-Brian

Webfocus v7.6.1 on Windows XP
February 13, 2008, 02:29 AM
Tony A
quote:
I really need them in the same table cell
I don't really understand why you need this and they will never appear in the same cell either. It's just how the output is created. One data item - one cell.

If you just want the value then why not READ it into a variable and use it by saving the tabled output prior to your -READ?

If that's not an option then please expand on how you need your output with, perhaps, a hand cranked example?

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 
February 13, 2008, 03:27 AM
GamP
Brian,
Like Tony, it eludes me why you would want to have the data of both reports in one cell. That way you'll not get them side by side, but one on top of the other.
The only way to get them side by side is to put them into seperate table cells.
And if you don't want the htm tags around your data, then hold your data as format ALPHA. You'll just get the data then, but remember that HTML ignores white spave as well as returns. So in order to display the data correctly if you're not having html tags, put it between the pre and /pre tags, as in the example below:
TABLE FILE CAR
PRINT COUNTRY
ON TABLE HOLD AS RPRT2_1 FORMAT ALPHA
END

TABLE FILE CAR
PRINT CAR
ON TABLE HOLD AS CNT2_1 FORMAT ALPHA
END

-HTMLFORM BEGIN
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0">
<TR>
<TH ALIGN="RIGHT">DOCUMENTED NEED: </TH>
<TD><PRE>!IBI.FIL.RPRT2_1; !IBI.FIL.CNT2_1;</PRE></TD>
</TR>
</table>
-HTMLFORM END

Hope this helps ...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
February 13, 2008, 06:56 AM
Alan B
Does this help?:
SET HOLDLIST=PRINTONLY
SET PAGE=NOPAGE
TABLE FILE CAR
SUM RCOST/D12.2M AS ''
ON TABLE SAVE AS file1 FORMAT DOC
END

TABLE FILE CAR
SUM DCOST/D12.2M AS ''
ON TABLE SAVE AS file2 FORMAT DOC
END

-HTMLFORM BEGIN
<html>
<head>
</head>
<body>
<table>
 <tr>
  <th scope="row">DOCUMENTED NEED: </th>
   <td><span style="float:left;">!IBI.FIL.file1;</span>
       <span style="float:left;">&|nbsp;-&|nbsp;</span>
       <span style="float:right;"> !IBI.FIL.file2;</span></td>
 </tr>
</table>
</body>
</html>
-HTMLFORM END



Alan.
WF 7.705/8.007
February 13, 2008, 08:19 AM
funsutton
Thanks guys for the help. The reason I need them in the same table cell is more about the look and feel I am going for, as the numbers are related to each other.

Alan, what you did worked like a charm.

Thank you.


-Brian

Webfocus v7.6.1 on Windows XP