Focal Point
page alignment problem

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

February 26, 2007, 03:24 AM
Aditya
page alignment problem
Hi,
I am generating a report page-wise in HTML.On the page which has sufficient data to fill the entire page , the report prints properly with header and footer,but for the page where there are only few lines of data to display the page becomes small and dosent fit the screen and hence when i try to print the report using a printer i get multiple pages(Page 1 ,page 2) on the same print paper.I want each page(page 1 , page 2) to come on seaprate print paper when i print them using the printer.

Regards,
Aditya
February 26, 2007, 04:02 AM
Tony A
Aditya,

Try using PDF for printable reports and HTML for display only

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 26, 2007, 04:08 AM
FrankDutch
A better way to control printing is probably PDF format. The column width can be fixed, undependent from the fieldsize, and so does the pagebreaks.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

February 26, 2007, 04:18 AM
Alan B
Tony is correct, use PDF where possible.

However if you MUST print from HTML, and this is not supported on older browsers.
DEFINE FILE CAR
CNTR/I4 WITH COUNTRY = CNTR + 1;
PAGE_BREAK/A123 WITH COUNTRY = IF CNTR EQ 1 THEN ' ' ELSE
 '<p style="page-break-before:always;"></p>';
END
TABLE FILE CAR
PRINT CAR MODEL
BY COUNTRY
ON COUNTRY SUBHEAD
"<PAGE-BREAK"
END



Alan.
WF 7.705/8.007
February 26, 2007, 03:21 PM
Jason K.
You may also do what you need with the OVER keyword.


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
February 27, 2007, 01:54 AM
Aditya
Hi all,

Thanks for your help,but i am still facing minor problems.I tried using the
PAGE_BREAK(<p style="page-break-before:always;"></p>)
.I have done the following -

TABLE FILE SQLOUT
COMPUTE P_BREAK/A123 = '<p style="page-break-before:always;"></p>';

PRINT
...
..
BY field1 NOPRINT by field2 NOPRINT PAGE-BREAK SUBHEAD
".."
".."

ON field2 SUBFOOT
".."
".."
"<P_BREAK" 

HEADING
".."
".."

FOOTING BOTTOM
".."
".."


Atleast some pages are showing up properly in print-preview(i.e All pages that come before <P_BREAK is encountered).But when the Page breaks["<P_BREAK") from that page onwards my footer [FOOTING BOTTOM) gets displaced onto the next page and this happens for every subsequent page.In HTML it displays properly without any problem.

February 27, 2007, 02:20 AM
susannah
Aditya, can you take your last sentence (starting with Atleast...
and put it outside of your closing code tag, so we can read it better.
i want to know to do this , too, so i'm really interested in how you're doing.
i had thought that page-break only worked in between tables...but thanks to Alan's tip, i've got a whole new idea now.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
February 27, 2007, 02:35 AM
Alan B
I know this solution is not perfect, and does require some playing around.

In your case, the field P_BREAK may be better as the last item in your FOOTING, using the other option
<p style="page-break-after:always;"></p>

Please remember that HTML itslef has no idea of the concept of a paper page, so you will have to try different options to get it work as you want.

FOOTING BOTTOM will have no effect in HTML, and neither will using PAGE-BREAK.

This message has been edited. Last edited by: Alan B,


Alan.
WF 7.705/8.007
February 27, 2007, 03:04 AM
Alan B
I just referred back to some old code that uses this technique. In fact I use a span tag rather than a p tag, to do with the fact that p is a block item and span an in-line item within HTML.

When the going got really bad - that company would not allow me to use PDF - I had to SAVE the table request and then use a DM loop with HTMLFORM BEGIN/END, READ the SAVE file and manually create the HTML, counting the lines and page breaking at the appropriate moment. So no, this technique is not perfect for everything.


Alan.
WF 7.705/8.007
February 27, 2007, 09:50 AM
Danny-SRL
Aditya,

Did you try using ON TABLE SET STYLEMODE PAGED?
It should have each output page started on a new physical sheet in the printer.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

February 27, 2007, 10:12 AM
Aditya
Thankyou very much Danny-SRL.Its working now.I was working from yesterday on this and couldn't find anything.Thanks once again.

Regards,
Aditya
February 27, 2007, 11:02 AM
susannah
quote:
ON TABLE SET STYLEMODE PAGED

holy cow! Danny, what version is that in?
I tried it in 7 and 5, didn't work.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
February 27, 2007, 11:15 AM
Prarie
Just read about it on IB site. Learn something new everyday.

http://documentation.informationbuilders.com/masterinde...43/wf_rpt/09cr11.htm


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
Susannah

Definitely in 7, though I have never got it to do anything useful, but that maybe the way I am using it

I still go back to the old method of just setting LINES.

I have a feeling that it is more PDF orientated.


Alan.
WF 7.705/8.007
I just tried exactly whats in the doc
SET STYLEMODE=PAGED
SET LINES= 24
TABLE FILE EMPLOYEE
PRINT *
END

in v716
and it didn't work at all.
the doc doesn't actually say that this setting is respected by printers....
Does anyone actually have a working example?

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




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
I checked out the PAGED option with one of our local DB2 tables.

SET STYLEMODE=PAGED
TABLE FILE TBXXXX
PRINT *
END

Works like a charm !! Thx Prairie !!

Sandeep Mamidenna.


-------------------------------------------------------------------------------------------------
Blue Cross & Blue Shield of MS
WF.76-10 on (WS2003 + WebSphere) / EDA on z/OS + DB2 + MS-SQL
MRE, BID, Dev. Studio, Self-Service apps & a dash of fun !! Music
Maybe we're mixed-up as to what to expect with STYLEMODE=PAGED.
quote:
PAGED - In WebFOCUS, displays report output in multiple HTML tables where each table is a separate report page. These smaller HTML files are retrieved from the Web server quicker than a single large file.
STYLEMODE=PAGED creates separate HTML TABLEs for each page of the report, and are downloaded to the web browser one at a time, thus displaying a lot faster than one HTML TABLE for whole report. This will be more evident for a very long report.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server