Focal Point
[CLOSED] Printable HTML Page

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

September 17, 2015, 03:55 PM
Luke Forster
[CLOSED] Printable HTML Page
I have created an HTML page which combines about 10 different reports together on one screen with the goal of providing a one page report for the team. Unfortunately I am running into issues where when they try to print the report the formating is not holding and it is printing on multiple pages. Has anyone on here been able to figure out a way to build something that allows you to combine multiple different reports together onto a printable document?

Thank you in advance for any help you can provide.

-Luke

This message has been edited. Last edited by: <Kathryn Henning>,


Web Focus 8105
Windows 7
September 17, 2015, 04:06 PM
GavinL
Ah, the age old question, which is such a pain...

Here is what I did, which may be right and may be wrong, but it works.

I created a print.fex that has an -INCLUDE for each of the reports, one right after another.

-HTMLFORM BEGIN

<head>
<style>
body {
    background-color: white;
}

p {
    font-family: "Times New Roman";
    font-size: 20px;
    text-align: center;
}
</style>
</head>
<body onload="javascript:window.print()">
-HTMLFORM END
-SET &WFFMT = 'HTML';
-INCLUDE IBFS:/WFC/Repository/Internal/by_state.fex
-SET &WFFMT = 'PDF';
-INCLUDE IBFS:/WFC/Repository/Internal/by_state_cnt_bg.fex
-SET &WFFMT = 'PDF';
-INCLUDE IBFS:/WFC/Repository/Internal/by_state_amt_bg.fex
-SET &WFFMT = 'HTML';
-INCLUDE IBFS:/WFC/Repository/Internal/delinquency_by_state.fex
-SET &WFFMT = 'PDF';
-INCLUDE IBFS:/WFC/Repository/Internal/delinquency_by_state_bg.fex
-HTMLFORM BEGIN
</body>
-HTMLFORM END

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



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
September 17, 2015, 06:03 PM
Waz
Another option is to have a drill out to a fex that returns the reports in PDF format.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

September 21, 2015, 01:44 PM
Luke Forster
quote:
Originally posted by GavinL:
Ah, the age old question, which is such a pain...

Here is what I did, which may be right and may be wrong, but it works.

I created a print.fex that has an -INCLUDE for each of the reports, one right after another.

-HTMLFORM BEGIN

<head>
<style>
body {
    background-color: white;
}

p {
    font-family: "Times New Roman";
    font-size: 20px;
    text-align: center;
}
</style>
</head>
<body onload="javascript:window.print()">
-HTMLFORM END
-SET &WFFMT = 'HTML';
-INCLUDE IBFS:/WFC/Repository/Internal/by_state.fex
-SET &WFFMT = 'PDF';
-INCLUDE IBFS:/WFC/Repository/Internal/by_state_cnt_bg.fex
-SET &WFFMT = 'PDF';
-INCLUDE IBFS:/WFC/Repository/Internal/by_state_amt_bg.fex
-SET &WFFMT = 'HTML';
-INCLUDE IBFS:/WFC/Repository/Internal/delinquency_by_state.fex
-SET &WFFMT = 'PDF';
-INCLUDE IBFS:/WFC/Repository/Internal/delinquency_by_state_bg.fex
-HTMLFORM BEGIN
</body>
-HTMLFORM END


Thank you GavinL, this works with one caviot. Currently im my html form i have 2 instances of reports that are side by side in order to best utilize space. If needed i could rework the reports to join together as they will always be the same number of rows (they are top 2 lists so they will always be 2 records). That said if there is a way to handle that within the above code it would probably be easier to handle that way.

Thanks,

-Luke


Web Focus 8105
Windows 7
September 22, 2015, 08:12 AM
GavinL
Sure. You can create a new fex, that houses your other two fexes side by side within iframes. Then include this new fex in your report.

Example
-HTMLFORM BEGIN
<HTML>
<HEAD>
<BODY>
<IFRAME id=report1 src="/ibi_apps/rs/ibfs/WFC/Repository/Public/tests/aa.fex?IBIRS_action=run" style="OVERFLOW: auto; HEIGHT: 280px; WIDTH: 490px; POSITION: absolute; LEFT: 10px; Z-INDEX: 1; TOP: 20px" autoExecute="true" name="report1"></IFRAME>
<IFRAME id=report2 src="/ibi_apps/rs/ibfs/WFC/Repository/Public/tests/bb.fex?IBIRS_action=run" style="OVERFLOW: auto; HEIGHT: 282px; WIDTH: 492px; POSITION: absolute; LEFT: 540px; Z-INDEX: 2; TOP: 20px" autoExecute="true" name="report2"></IFRAME>
</BODY>
</HTML>
-HTMLFORM END




- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
September 22, 2015, 05:00 PM
susannah
In html , use a table construct
-HTMLFORM BEGIN
<HTML>
<TABLE>
<TR>
<TD>!IBI.FIL.MYREPORT1; </TD>
<TD>!IBI.FIL.MYREPORT2; </TD>
</TR>
<TR >
<TD COLSPAN=2>!IBI.FIL.MYREPORT3; <TD>
</TR>
</TABLE>
</HTML>
-HTMLFORM END

where each component is made by a fex
EG: table file car sum sales by country on table hold as myreport1 format htmtable
end
...
IN PDF, you'll do something a bit different.
its essentially a compound pdf, with some tricks.
I'll post an example for you tomorrow.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID