Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting a page break in a report

Status
Not open for further replies.

on5ex

Programmer
Apr 30, 2003
6
BE
This must sound dumb, but I have been browsing all possible help files: I need to insert (force) a page break at a specific position in a report. How should I handle this from within the report designer?
Tnx a zillion,
Johan
 
What comes to mind is to use data grouping.

Somehow create (or fudge) all the data prior to the page break as being in group 1, and the rest in group 2. Then use the "Start each group on a new page" feature.

Jim
 
If the page break needs to be at a particular place in the page, create a label with character 12 as the text.
What I mean is, click on the the label icon, then click on the report where the eject needs to be, then hold down the Alt key while pressing 012 on the numeric keypad of the keyboard, then release the Alt key. It will place an ASCII formfeed character on the report.


-Dave S.-
[cheers]
Even more Fox stuff at:
 
Another way:

- Create a function (i.e., EJ) that contains the command EJECT PAGE.

- Make sure function is accessible to report (in MAIN.prg or via SET PROC TO)

- Place field in desired spot in report and insert EJ() there.
 
While both the above solutions (inserting CHR(12) and issuing EJECT) will have the desired effect, you need to be careful. The report writer will not be aware that you have thrown a new page, and will lose track of the pagination. This might mean that the page numbers are wrong, or that further page breaks occur in unwanted places.

Mike


Mike Lewis
Edinburgh, Scotland
 
Solved (I preferred the data grouping suggestion)! Thanks to all.

Johan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top