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

Printing in Landscape - problems

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
I have been programming for several years with Foxpro 2.6a Dos and use to print all reports on a dot matrix, now
I want to print all the reports on HP laser 6P, some of my reports are too large so I have to print in a landscape
mode and change manually the Pitch from 10 by default to 16 or higher to fit into my reports. How can I control
my printer to that automatically?
I have used to send the ESC code to the printer before using Report Form , but it's still not working

Here is the command that I am using:

SET PRINTER TO LPT1
??? CHR(27)+''&l0O'' && PRINT IN LANDSCAPE MODE
REPORT FORM MYREPORT TO PRINTER
??? CHR(27)+''E'' && PRINTER RESET

 
You are setting the printer to portrait
landscape is
??? CHR(27)+''&l01''
Charlie Huff
CJ's Homecenter
From the Star Trek Generation
 
SORRY ABOUT THAT
??? CHR(27)+"&l1O" Charlie Huff
CJ's Homecenter
From the Star Trek Generation
 
There is an alternative way to the above.

Create a new Printer Driver through Printer Driver Setup.
Choose New and give it a name - say LandRep. At the top of the screen you will see a number of option buttons. Under orientation there is either Landscape or Portrait. Choose Landscape. Select any other options you wish such as Stroke or Page Size and save your changes.

How before running your report issue the command:-

_PDSETUP = 'LandRep'
Then run your command as before:-

REPO FORM MYREPORT TO PRINTER

With a little more development to the above you could create
many different printer setups for the user. You could offer
the user all of these printer setups through a user defined screen for them to choose. All you would have to do is set the value of the variable _PDSETUP to the correct Printer Driver SetUp Name which you called it.

Hope this helps.
 
HELLO THERE

I HAVE TRIED BOTH OF THE ABOVE SAID METHODS TO PRINT A REPORT IN LANDSCAPE ON DOT MATRIX PRINTER BUT OF NO USE PLEASE GIVE ME SOME ADVISE
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top