Focal Point
Table as HTML

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

April 18, 2005, 06:25 PM
<Ed>
Table as HTML
Hi All,

In a fex file...I am saving a table as
ON TABLE PCHOLD AS DETRPT FORMAT HTML
this table is then included in a html file...
in the following way:
------------------
<div id=Detail name=Detail>
<table cellpadding=0 cellspacing=0 width=100% border=0 >
<tr><td id=logoCell colspan=5 width=100% style="padding-top:10;padding-bottom:8;border-bottom:solid 2px <!--WEBFOCUS VAR &HDRLINECLR> ;"><img src="/approot/Images/Logo.gif" border="0"></td></tr>


<tr><td style='padding:0;' id=DetailReport>
<!--WEBFOCUS TABLE DETRPT>
</td></tr>
</table>
</div>
----------------

logically, the logo should come first on the page and then the report (contents of the table)... but when I run this, the report comes first and the logo comes at the bottom of the screen.


ne idea...why it is happening this way?

thanks

ed
April 18, 2005, 08:52 PM
Boogarweed
I think I know what's happening. The syntax of your report should be as follows:

ON TABLE HOLD AS DETRPT FORMAT HTMTABLE
----------
THEN
----------
<div id=Detail name=Detail>
<table cellpadding=0 cellspacing=0 width=100% border=0 >
<tr><td id=logoCell colspan=5 width=100% style="padding-top:10;padding-bottom:8;border-bottom:solid 2px <!--WEBFOCUS VAR &HDRLINECLR> ;"><img src="/approot/Images/Logo.gif" border="0"></td></tr>


<tr><td style='padding:0;' id=DetailReport>
!IBI.FIL.DETRPT;
</td></tr>
</table>
</div>
-----------
The problem is that the report was displaying before your html because you used PCHOLD instead of HOLD. Then your HTML displayed with the logo in it. Also, I don't think the syntax for including it in the HTML was correct. See my revision.
April 18, 2005, 09:13 PM
susannah
also, in addition to the unneeded PC in your HOLD statment,
this statement might have been giving you trouble
<!--WEBFOCUS TABLE DETRPT>
should have been
<!-- WEBFOCUS TABLE DETRPT -->
The !IBI.FIL.DETRPT; syntax, as BW has suggested you use, is more a modern version.
So your HTML form was never getting your table, it was coming out first, before the HTML form had a chance to execute
April 19, 2005, 01:08 PM
<Ed>
thanks sussanah and bogerweed.
something very strange is happening here.

if i use HOLD instead of PCHOLD...then on the IE window, the fex runs for a couple of mins (which is the normal time for this fex to get the output)...but as soon as it is ready to give the output... it just closes all the IE windows associated with it.
So, basically..the BID window...the window that gave the inputs to run the report and the window where the report was to be displayed...all get closed.

ne idea why this is happening?

thanks

Ed
April 19, 2005, 01:10 PM
<Ed>
I am using HOLD as HTML.
HTMTABLE works fine....but cant use it...as the DRILLMENUITEM dont work, if I use HTMTABLE.

thanks

Ed.
April 20, 2005, 02:13 PM
susannah
try it with the CAR file
if it fails, then we'll know its something within your -HTMLFORM command set
Make sure no line in your htmlform set of commands goes too wide.
i've had problems like that before. And you can drop your &VAR right in to your table directly.
Work backwards ... get your table out then start adding -HTMLFORM features till you find what breaks it.

-HTMLFORM BEGIN





style="padding-top:10;padding-bottom:8;border-bottom:solid 2px >
&HDRLINECLR


!IBI.FIL.filename;


-HTMLFORM END

This message has been edited. Last edited by: <Mabel>,
Sussanah,

my HTMLFORM line contains just the name of the HTML file that has the code that was mentioned in my post.

The HTML file onload calls a function named addPageBreaks() which looks something like this:

function addPageBreaks()
{
var content = document.body.innerHTML;
var keycode = new String("CRU:");
var keyexpr = new RegExp(keycode, "g");
var pagebrk = new String("<div class=pgbk style='height:0;visibility:hidden;'></div>");

content = content.replace(keycode, "");
content = content.replace(keyexpr, pagebrk);
document.body.innerHTML = content;
}

-----------

if I comment out the last line in this function... then the report runs fine...if i uncomment it, thats when everything closes.

any idea whats wrong with this?

thanks

Ed.