Focal Point
Page Breaks & default orientation/margins??

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

December 14, 2005, 04:29 PM
Moogle
Page Breaks & default orientation/margins??
Hi,

I have a bunch of procedures in one .fex file, where I show a report (tabular data) a graph, another report, another graph, ect. Is there a way to add a page break between some of the procedures, so I see a report and a graph on one page and then a report an a graph on a second page. Right now, I am trying to use the header and footers to have it naturally print on different pages, due to the spacing.

On a related issue, I have taken these reports and graphs and laid them out with the HTML Layout Page (aka Resource Layout Page). Is there a way to add page breaks to the html code that will page break between sections where I have added reports and graphs?

Finally, when I run a HTM file, I always have to switch to landscape mode manually. Is there a way to default it to landscape and to set default margin sizes as well?

Thank you,

Joey
December 14, 2005, 07:13 PM
susannah
1. yep
-HTMLFORM BEGIN
<HEAD>
<STYLE TYPE="text/css">
P.breakhere {page-break-before: always}
</STYLE> 
</HEAD>
<TABLE>
<TR><TD>
!IBI.FIL.MYTAB1;
</td>
<TD>
!IBI.FIL.MYTAB2;
</td></tr>
</TABLE>
<P CLASS="breakhere"><HR>
<TABLE>
<TR><TD>
!IBI.FIL.MYTAB3;
</td>
</TR>
</TABLE>

-HTMLFORM END
(edited...put in my closing td tags..gotta keep T happy Wink
2. i'm looking for the same thing, but as far as i know, landscape is still a user-function

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




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
December 15, 2005, 03:57 AM
Tony A
Ah Susannah, the old td close tags!! Smiler

As for landscape, there is no "real" concept of landscape in HTM, although when you print you can set a page layout of portrait or landscape. However, this normally has to be set by the client browser machine settings (e.g. each and every user).

There is an activeX object (produced by MeadCo and called ScriptX) that you can use on each report so that when a user clicks a button or link the print dialogue will be launched with the page already set-up to landscape etc. The button can be hidden when launching the diaogue and shown again after the dialogue has been closed.

I have used it in a couple of Client sites and the only problem I have received is a question of running an unknown script on the Clients system. You can either download the object in a zip file or reference it direct from their site (providing your users have access to the internet).

One word of warning though - You will spend a lot of time formatting your HTML output to get it displaying nicely in a page. If this thought worries you at all then go for the more controllable(?) option of only printing output from PDF reports.

For those of you that want to try it out for yourselves, here is a sample -

-* File landscape_print.fex
TABLE FILE CAR
SUM RCOST
    DCOST
    SALES
BY COUNTRY
BY CAR
BY MODEL
HEADING
"Landscape printing using Mead Co's ScriptX"
ON TABLE SET PAGE-NUM OFF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
ENDSTYLE
ON TABLE HOLD AS MYREPORT FORMAT HTML
END
-HTMLFORM BEGIN
<html>
<head>
<title></title>
<script language=javascript>
function printReport()
{
  self.PrintButton.style.visibility = 'hidden';
  factory.printing.header = "";
  factory.printing.footer = "";
  factory.printing.bottomMargin = 6;
  factory.printing.topMargin = 5;
  factory.printing.leftMargin = 5;
  factory.printing.rightMargin = 5;
  factory.printing.portrait = false;
  factory.printing.Print(true);
  self.PrintButton.style.visibility = 'visible';
}
</script>
</head>
<body>
<div id="PrintButton" style="position:absolute; visibility:visible; top:13; left:600; width:40;
     cursor:hand; z-index:1;" valign="middle" align="center">
  <font size=-1>Print</font>
  <img src="/approot/baseapp/printer.gif" width="20" height="20" alt="Click here to print"
     onclick="printReport();">
</div>
!IBI.FIL.MYREPORT;
<object id="factory" style="display:none" viewastext
        classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814"
        codebase="http://www.meadroid.com/scriptx/ScriptX.cab#Version=6,0,0,421">
</object>
</body>
</html>
-HTMLFORM END


Enjoy

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