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!

Still strugling with page setup..

Status
Not open for further replies.

CleoMan

Programmer
Jun 18, 2003
110
ZA
I use the following code to set the printers page size and layout. But this code does not seem to work!

prnOptions.paperwidth = 11907
prnOptions.paperlength = 11623
prnOptions.Orientation =prnPortrait

printerSetOptions(prnOptions,true)
repHolder.print(strReportName)

I want to set the printers page size to work correctly with a dot matrix printer. The report itself is fine, I just want to set the damned printer's page setup

What am i doing wrong?
 
CleoMan,

Have you tried changing the PageSize property like I showed in my previous post?

While it's tempting to use the printer driver, that can be very problematic. By doing so, you're hoping that your printer driver follows the standard API's. There's a large printer vendor (think Don Rickles) known for their very non-standard drivers.

By changing the report itself, you ensure that the rectangle drawn on the Windows canvas that's eventually sent to the printer driver already starts at the right margins. Using the driver can, in some cases, shift that rectangle. However, this only works on some printer drivers, not all.

Hope this helps...

-- Lance
 
Remeber the problem I had some time ago with the dot matrix paper being to wider than it's height which resulted in it being changed to landscape when i needed it potrait?

Well the way i found around it was setting the margins like you told me, till I almost got what i wanted. The problem is that the paper needs to stop at a exact point.

I could'nt change the report sizes, so I found that when setting the custom page size in the printer properties, I got the effect where the paper stopped exactely where I wanted it to?

The code you showed me seemed to change the report, but I just needed to change the printer setting.

Am I being clear?

So please Lance, this problem is critical, so any help, please..
 
Have you tried setting up some error trapping on the printerSetOptions command - just to see what Paradox has to say about it?

I.E.

if not printerSetOptions(prnOptions,true)
then errorShow()
endif

Mac :)

"There are only 10 kinds of people in this world... those who understand binary and those who don't"

langley_mckelvy@cd4.co.harris.tx.us
 
CleoMan,

I can't really help, but what version of Paradox are you using? I have found that the printer / printer setup commands do not behave the same in Paradox 7, Paradox 8, and Paradox 9 (I think 9 and 10 behave the same).

It might shed some light for those more knowledgeable than I to know what version you are using (and what Service Pack).

Lynn
 
I am currently using Paradox 9, as for the service pack I am unsure.

The code I use in the first post is basically overwritten by the report's page settings. I am also using a old Seikosha dot matrix printer.

Anything else?
 
Sorry I haven't added anything over the past few days. I moved over the weekend and am still trying to get my home network online.

I'll chime in when I can, but I still feel your best bet is to control the PageSize of the report, not the printer drivers. However, one this that I have seen is that if you change the printer driver settings, it's best to have your report open in a hidden window when you apply the settings, as reports repond to the messages Windows transmits as a result.

Having said that, I should point out that this was far more necessary using the older versions than it is using recent versions.

I'll fiddle with this at home (when my network's back online) and see if I can't provide more specifics.

-- Lance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top