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!

Page Setup of a Report

Status
Not open for further replies.

ChrisAgius

Programmer
Sep 27, 2000
51
MT
Still Working on my Printing Form I succeded to select different printers(..thanks to those who helped me)
But now I am Trying to deal with another problem.
The two printers have different page setups and there isn't the right size of my printer paper on the preferences. So if i print my report on a printer everything is Ok! but when I try a printer with a different paper size the footer of the reports results on the second page.

Any Suggestions....THNKS [sig][/sig]
 
ChrisAgius

* One simple way would be to have a report for each printer

lcPrinterName = GETPRINTER()
IF lcPrinterName = [Brother HL760]
[tab]REPORT FORM report1.frx NEXT 1 TO PRINTER NOCONSOLE
ELSE
[tab]REPORT FORM report2.frx NEXT 1 TO PRINTER NOCONSOLE
ENDIF

Chris
[sig][/sig]
 
ChrisAgius

On thing I did not make clear is that you need to check the page setup for each version of the report and select the correct printer before saving.

It would also avoid problems if you cleaned out the printer information in each report before printing, so you might consider including the following code somewhere.

lcAlias = ALIAS()
* Open the report as a table
USE report1.frx IN 0 ALIAS TEMPREPO
SELE TEMPREPO
LOCATE FOR TEMPREPO.Objtype = 1 AND TEMPREPO.Objcode = 53 && find the record that holds the printer information.
REPLACE TEMPREPO.Expr WITH [ORIENTATION=0],;
[tab]TEMPREPO.tag WITH [],;
[tab]TEMPREPO.tag2 WITH [] && Orientation = 0 - Portrait, 1 = Landscape

USE

SELE (lcAlias)

Chris

[sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top