Discussion:
PrinterOptionInfo and ReportPrintInfo variables
(too old to reply)
Tony McGuire
2009-01-22 18:33:10 UTC
Permalink
if printerSetOptions(prnOptions) then
thisbuy.print(repInfo)
else
errorShow ("Could not set printer options.")
endIf
That is pretty much what I have, but I believe I only need to do both in one
place. Been a while since I revisited this, though, so not certain.

Long and short, it FEELS familiar and right.


---------------
Tony McGuire
Jim Giner
2009-01-22 20:17:42 UTC
Permalink
I seem to remember having troulbe getting the correct response from teh call
to printersetoptions - it didn't return false when the options were'nt set.
But that was version 5 and maybe it works better in later versions.
Post by Tony McGuire
if printerSetOptions(prnOptions) then
thisbuy.print(repInfo)
else
errorShow ("Could not set printer options.")
endIf
That is pretty much what I have, but I believe I only need to do both in
one place. Been a while since I revisited this, though, so not certain.
Long and short, it FEELS familiar and right.
---------------
Tony McGuire
Tony McGuire
2009-01-22 20:26:07 UTC
Permalink
Post by Jim Giner
But that was version 5 and maybe it works better in later versions.
Can't help you there. My memory doesn't go back that far.
--
---------------
Tony McGuire
unknown
2009-01-23 00:14:48 UTC
Permalink
Anne,

What version of Paradox are you using? If 10 or greater, ISTR I had some
problems doing this with 10 quite a while back, and with Bertil's help
worked out to set the paper size (A4) using the old syntax, and then set
clip-to-width, orientation etc using the new, dynarray syntax.
Hi all, (and best for 2009)
I had to cure a problem of printing a report, the windows default
printer driver would pop up each time and (on Pdox alone,and only late
this past year) it decided to start with a postcard sized default paper
size. No way to keep the default at A4 and clip-to-width set.
Looking at the pdox examples I saw the PrinterOptionInfo type variable
which allowed to set certain requirements, and the ReportPrintInfo type
which allowed to set others, with some overlap. Neither would set all that
I wanted. Yet the examples shown for each both concluded with
print(varname). Thus I saw an either-or situation.
I did quite easily get it to work, and my basic code structure is here
var
prnOptions PrinterOptionInfo
repInfo ReportPrintInf0
; other var items
endVar
; set printer options showing overlap item and wanted item
prnOptions.Orientation = prnPortrait
prnOptions.PaperSize = prnA4
; set report printing options showing overlap item and wanted item
repInfo.orient = PrintPortrait
repInfo.panelOptions = PrintClipToWidth
; lots of other code follows to generate report thisbuy.rsl
if printerSetOptions(prnOptions) then
thisbuy.print(repInfo)
else
errorShow ("Could not set printer options.")
endIf
; more code
thus I left the printerSetOptions as just set and 'printed' the repInfo
ones. I didn't try it the other way around, but this seemed the 'right'
thing to try.
Well it works fine, but any comments welcome on this small matter. Is
this the best approach, are the two variable each typically used under specific
circumstances?
regards
Anne
--
Tom Krieg

---------------
http://www.krieg.com.au
Please use the contact page to contact me via email
Anders
2009-01-23 07:05:37 UTC
Permalink
Well it works fine, but any comments welcome on this small matter. Is
this the best approach, are the two variable each typically used under
specific
circumstances?
I think the version of Paradox is essential to the answer. In my experience
there are som important differences how printing is handled in P7, P8 and
P10 (the versions I have experience from). What works in one version might
fail in another.

I use P10 and the syntax with an array and it seems to work for me.

Anders
Anne Wainwright
2009-01-23 20:03:35 UTC
Permalink
Anders, hello,

see below
Post by Anders
Well it works fine, but any comments welcome on this small matter. Is
this the best approach, are the two variable each typically used under
specific
circumstances?
I think the version of Paradox is essential to the answer. In my experience
there are som important differences how printing is handled in P7, P8 and
P10 (the versions I have experience from). What works in one version might
fail in another.
I use P10 and the syntax with an array and it seems to work for me.
Just to be awkward I am running version 9 ;)

Anne
Post by Anders
Anders
Anders
2009-01-26 08:44:58 UTC
Permalink
Post by Anne Wainwright
Just to be awkward I am running version 9 ;)
As I'm not using P9 I'm not sure, but I think P9 handles printing
differently than P10. The syntax with the dynamic array was added in P10.
But I could be wrong.

Anders

Loading...