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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

second page or two reports in one print job 1

Status
Not open for further replies.

ZeroFox

Programmer
Jan 24, 2022
3
DE
Hello Community :)

This is my first Post. Iam looking for a method how to print two reports in one print job. If this is not possible Im looking for a solution to split a report in any position. Is there a command to split the report to print the following data in a second page?

Thank you guys!
 
Hello and welcome to the forum.

This is quite a familiar requirement. The solution is to print the first report with NOPAGEEJECT in the REPORT FORM command. Then print the second report without that option.

In general, NOPAGEEJECT allows you to chain any number of reports into a single print job. You add the clause to every REPORT FORM, except the last.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
You also asked if it is possible to do a page break at any point within the report. This is not the same as printing several different reports in the same print job. So chances are that using NOPAGEEJECT will be the better option for you. However, for future reference:

You can force a page break by adding grouping to the report (if it doesn't already have it), then in the group's properties, select "Group starts on ... new page". You can also apply that setting to the detail band. But keep in mind that this will force the page break for every instance of the group or the detail band - as opposed to you saying that you want a page break if a certain condition is true.

You can also force a page break immediately after the title band. You do that in Report Properties / Optional Bands. I've used this when I've needed to print a big chunk of explanatory text on its own page at the start of the report.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Hello Mike, thank you so much for ur help. I still couldnt fix my problem. I try to explain the problem better. We have a new customer and now he want to get one report on both sides of a paper--> duplex print.
I dont know how to do it.

I hope its possible to understand my english...sorry^^.

Greetings from Germany.
 
Ah, duplex printing is a completely different question.

To achieve that, you need to set your printer properties for duplex printing. How you do that depends on the make and model of printer. With my HP Laserjet 400, for example, you would go to Printer Preferences > Finishing, and tick the box, "Print on both sides".

But once you have done that, the setting will apply to all output from that printer, which is probably not what you want. So the solution is to install a second copy of the printer driver. Set one copy for duplex and the other for normal printing. Give the drivers names that you will tell you which printer is duplex and which is not.

Of course, not all printers support duplex printing. (But I'm sure you know that already.)

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Ah, now Im close at the end i think. Theres only one problem. the report contains exactly one page. In the print preview there are always 2 pages. the second page is blank. I dont know why its always add an empty page...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top