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

Printer Selection

Status
Not open for further replies.

TuzMwaura

Programmer
Feb 3, 2011
27
KE
How can I return the printer selected using the PRINTERDIALOG?
I have a need to store the Printer names in a printers table then I can have users use look-up for choose a printer from the table

 
Hi Tuz,

IF PRINTERDIALOG('Choose a Prinnter')
MyChosenPrinter = PRINTER{PROPPRINT:Device}
END

Read more on PRINTERDIALOG & PRINTERDIALOGA in the help.

Regards
 
Hello
Can we assign this code to work from inside the preview screen.
I tried to assign to a button inside the preview screen but it worked after colsing the report and run it again.

Regards

 
Hi!

When a report is generated it creates WMF files (with an extension of TMP in the Windows Temp folder) for all the pages of the report. The WMF file contains formatting specific to the printer that was chosen before generating the report. To change the printer at the preview stage will not work. What 3rd party previewers that offer this feature do is create a new preview using the earlier WMFs as images and is a bit tricky to do. You may need to invest in a 3rd party tool like IceTips Previewer from
If you want to insert code to choose a printer i.e. call PRINTERDIALOG(), do that in the OpenReport method - before parent call.

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top