Focal Point
How to Embed a Report in an HTML Web Page

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

December 21, 2007, 04:42 AM
Majid Jeddi
How to Embed a Report in an HTML Web Page
Hi,

I create a report "report1"and wanted to embeded it into an HTML Web Page output.htm.
the report is located in:ibisam/procedures
and the html file is : ibisamp/HTML FILES

When I Launch the HTML web page i have the following error:

(FOC36225) UNABLE TO OPEN FILE REPMAJ SPECIFIED BY WEBFOCUS TABLE

The source of the "output.htm" is :

FOCUS Report

<script language='javascript'>
var ibiOptions = new Array("multidrill");
var focexurl = "/ibi_apps/WFServlet?IBIF_webapp=/ibi_apps&IBIC_server=EDASERVE&IBIAPP_app=IBISAMP&";
var fochtmlurl = "/ibi_html";


<script language='javascript' src='/ibi_html/javaassist/nls/js'>
<script language='javascript'src='/ibi_html/javaassist/ibi/html/js/ibigbl.js'>
<script language='javascript'>ibigblloadCss(null);

!IBI.FIL.REPMAJ;

and the source of my report is :

TABLE FILE SHORT
SUM
PROJECTED_RETURN
BY CONTINENT
HEADING
""
FOOTING
""
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE HOLD AS REPMAJ FORMAT HTMTABLE
ON TABLE SET HTMLCSS ON
END
-HTMLFORM output.htm

I am not able to figure out what is wrong.

Regards.


WebFocus 7.6.5
AND WebLogic server as web server
sql2005 as database server
December 21, 2007, 05:57 AM
<JG>
Looks very much to me as if your report is not returning any data.
The effect of that is the required hold file is not created.

add 'SET EMPTYREPORT ON' to the code
December 21, 2007, 08:04 AM
Majid Jeddi
Hi JG,

To verify that I just commented the following lines in my report and I could see that it returns data.

-*ON TABLE HOLD AS REPMAJ FORMAT HTMTABLE
END
-*-HTMLFORM output.htm

Regards.


WebFocus 7.6.5
AND WebLogic server as web server
sql2005 as database server
December 21, 2007, 08:14 AM
<JG>
Majid,

in that case it could be as simple as not having a -RUN after the END statement.
Although this does not make a difference in 764 it might in some releases.

However, Question, are you redirecting EDATEMP or APP HOLD? if you are then the file
will be in the wrong place and you will either have to allocate the file directly using
FILEDEF or use APP MAP to include the folder in the APP PATH.

Also try coding it as

-HTMLFORM BEGIN
!IBI.FIL.output;
-HTMLFORM END

to see if that resolves the issue.
December 21, 2007, 10:46 AM
Majid Jeddi
Hi JG,

Here is what I did:

TABLE FILE SHORT
SUM
PROJECTED_RETURN
BY CONTINENT
HEADING
""
FOOTING
""
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE HOLD AS REPMAJ FORMAT HTMTABLE
ON TABLE SET HTMLCSS ON
END
-*-HTMLFORM output.htm
-HTMLFORM BEGIN
!IBI.FIL.output;
-HTMLFORM END

And I got the following error:

0 NUMBER OF RECORDS IN TABLE= 526 LINES= 30 HTML FILE SAVED ...(FOC36225) UNABLE TO OPEN FILE output SPECIFIED BY WEBFOCUS TABLEWebFOCUS Version 7.6.2 compiled and linked on Tue Aug 28 11:57:30 EDT 2007 (Gen branch762_hotfix:9)

It seems that the file was generated but the HTML file is not able to open/find it

Thanks.

Majid.


WebFocus 7.6.5
AND WebLogic server as web server
sql2005 as database server
December 21, 2007, 10:58 AM
<JG>
Majid,

Add
? PATH
? FILEDEF
-EXIT

Just before the TABLE FILE SHORT

This will allow us to see the mappings and where the file is being saved to
December 21, 2007, 11:01 AM
Tom Flynn
quote:

ON TABLE HOLD AS REPMAJ FORMAT HTMTABLE
ON TABLE SET HTMLCSS ON
END
-*-HTMLFORM output.htm
-HTMLFORM BEGIN
!IBI.FIL.output;
-HTMLFORM END


It's

!IBI.FIL.REPMAJ;

not

!IBI.FIL.output;


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
December 21, 2007, 11:16 AM
<JG>
No Tom,

Majid has it correct.

output.htm is a static htm page that has REPMAJ.htm embeded in it
December 21, 2007, 11:17 AM
Tom Flynn
My Bad!!

Smiler


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
December 21, 2007, 11:27 AM
Majid Jeddi
Hi All,

Here is the output I got:

BASEAPP = D:\ibi\apps\baseapp;
APPHOLD = D:\ibi\srv76\wfs\edatemp\ts000027;
APPPATH = D:\ibi\apps\ibisamp;
D:\ibi\apps\treasuryforecast;
D:\ibi\apps\cfclive;
D:\ibi\apps\holdfiles;
D:\ibi\apps\cis;
D:\ibi\apps\majid;
D:\ibi\apps\r8test;
D:\ibi\apps\r7_ws_test_cfc;
D:\ibi\apps\r8doc_uni;
D:\ibi\apps\sunssc;
D:\ibi\apps\sunssc;
D:\ibi\apps\necho;
D:\ibi\apps\lux2_live;
D:\ibi\apps\cis;
D:\ibi\apps\cfcviews;
D:\ibi\apps\documents_ge;
D:\ibi\apps\cfcviews;
D:\ibi\apps\ibisamp;
Lname Device Lrecl Recfm Append Filename
============================================================

Regards.


WebFocus 7.6.5
AND WebLogic server as web server
sql2005 as database server
December 21, 2007, 11:39 AM
<JG>
Majid, sorry I should have said after the END for the TABLE FILE SHORT.

That way we can see the attributes for the file being generated.

However having said that APPHOLD is pointing to the standard tscom3
work directory for the session so the output file should be OK.

Do not foreget the -RUN after the END statement
December 21, 2007, 12:54 PM
Majid Jeddi
Hi JG,

Here is it:

0 NUMBER OF RECORDS IN TABLE= 526 LINES= 3
0 HTML FILE SAVED ...
(FOC1517) UNRECOGNIZED COMMAND ?PATH
Lname Device Lrecl Recfm Append Filename
============================================================
REPMAJ DISK 0 V D:\ibi\srv76\wfs\edatemp\ts000
028\repmaj.htm

At this time I am trying to go through the webfocus documentation and I find it hard some time to use the eaxmples.

Thanks.


WebFocus 7.6.5
AND WebLogic server as web server
sql2005 as database server
December 21, 2007, 01:38 PM
wf1998
Hi ran below code from ibisamp dir and my output.html is in ibisamp directory,
and it's working fine, if ibisamp in the app path they should work..

check is there any type eror is there.

TABLE FILE CAR
PRINT
CAR
COUNTRY
BY CAR NOPRINT
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE HOLD AS REPMAJ FORMAT HTMTABLE
ON TABLE SET HTMLCSS ON
END
-RUN
-HTMLFORM output.htm




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
December 21, 2007, 03:37 PM
Majid Jeddi
Hi wf1998,

Thanks for you help.
Unfortunatelly it still did not work. Your report is correct if I ouput to the screen.
As you can see from my previous post the ibisam is in the apppath.

Regards.


WebFocus 7.6.5
AND WebLogic server as web server
sql2005 as database server
December 22, 2007, 06:00 AM
<JG>
The ? FILEDEF gives a possible clue.

? Weblogic ?

Case sensitivity is a possibility.

Try !IBI.FIL.repmaj; instead of !IBI.FIL.REPMAJ; in output.htm.