Focal Point
PAGE-BREAK ISSUE

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

March 17, 2006, 11:22 AM
chelsea
PAGE-BREAK ISSUE
Hi,
i am trying to create a html report in which i need to display only 5 locations per page. that is my sort field is location and i need to display only 5 locations per page. i tried page-break but somehow i could'nt get that.
any suggestions
Thanks
March 17, 2006, 11:34 AM
Kamesh
Define the counter to find the number of locations. If the number of location is 5 then give Page-Break.

Ex:

DEFINE FILE TEST
CNT/I1=IF LOCATION THEN CNT + 1 ELSE CNT;
CNT1/A1=IF CNT EQ 5 OR 10 OR 15 OR 20 OR 25 OR 30 THEN 'Y' ELSE 'N';
END

TABLE FILE TEST
PRINT XXX
XXX
BY YYY
ON YYY SUBFOOT PAGE-BREAK
WHEN CNT1 EQ 'Y'
END
-EXIT


WFConsultant

WF 8105M on Win7/Tomcat
March 17, 2006, 11:59 AM
susannah
Chelsea
i control my page breaking by letting my users' browser tell the printer when to break.
so your question doesn't say if you want pagebreak on screen because you want to repeat heaeder, or if you want pagebreaks on the printer, and you need to edit your profile so that your signature tells us what version and platform.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
March 23, 2006, 05:48 PM
chelsea
Hi sussanah/kamesh,
Kamesh i tried your code but it did not work for me may be i am missing something.
sussanah i want the page break on the screen to repeat the header and not while printing.
sorry for the late reply and thanks for your suggestions
March 24, 2006, 08:54 AM
Kamesh
Try this,

DEFINE FILE TEST
PGBK1/I11=IF LOCATION EQ LAST LOCATION THEN PGBK1 ELSE (PGBK1 + 1);
PGBK2/I11 = IF PGBK1 EQ LAST PGBK1 THEN PGBK2 ELSE (PGBK2 + 1);
PGBK3/A2 = IF PGBK2 EQ 2 OR 4 OR 6 OR 8 OR 10 OR 12 OR 14 OR 16 OR 18 OR 20 OR 22 OR 24 OR 26 OR 28 OR 30 OR 32 THEN 'PB' ELSE ' ';
END

TABLE FILE TEST
PRINT XXX
XXX
BY PGBK1 NOPRINT
BY LOCATION
ON LOCATION PAGE-BREAK WHEN PGBK3 EQ 'PB'
END
-EXIT

Hope this will work.


WFConsultant

WF 8105M on Win7/Tomcat
April 11, 2006, 04:52 PM
Mike Johnson
I came across this code on this forum.

It allows you to set the number of lines per page and also displays Page 1 of #. I think you should be able to modify it to meet your needs.

-SET &LNE = 3;
DEFINE FILE CAR
COUNTER/I5 WITH BODYTYPE = IF COUNTRY NE LAST COUNTRY THEN 1 ELSE
IF COUNTER GE &LNE THEN 1 ELSE COUNTER + 1;
PAGENO/I5 WITH BODYTYPE = IF COUNTRY NE LAST COUNTRY THEN 1 ELSE
IF COUNTER EQ 1 THEN PAGENO + 1 ELSE PAGENO;
END
TABLE FILE CAR
HEADING
"THIS IS PAGE <TABPAGENO OF <MAX.PAGENO "
SUM MAX.PAGENO
BY COUNTRY
PRINT RCOST
COUNTER
BY COUNTRY PAGE-BREAK REPAGE
BY PAGENO  PAGE-BREAK
BY CAR
BY MODEL
BY BODYTYPE
END
-RUN

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