Printer Selection – Enable Printer Selection |
This Previewer extension requires that the Enable printer selection (Global) Extension has been added to the application.
Printer dialog header
This is a string constant that is used as the caption of the Printer Dialog that is called to select the printer to print to. If you would rather like to use a variable use the option below "Variable for header" This defaults to "Select printer"
Variable for header
This is a string/cstring variable that is used as the caption of the Printer Dialog that is called to select the printer to print to. If you would rather like to use a constant use the option above "Printer dialog header" This is empty by default.
Local page Queue
This is the label of the local queue that is assigned from the passed image queue (pImageQueue) in the MoveQueueToLocal and MoveQueueFromLocal routines. I.e. this is the queue of pages that is used in the Previewer procedure. This is set to ITP:PageQueue by default.
Page variable
This is the label of the variable in the local page queue that contains the name of the generated .WMF file from the report engine, assigned from the passed queue (pImageQueue). This is set to ITP:PQ:WmfFile by default.
Print variable
This is the label of the variable in the local queue that determines if the page should be printed or not. This is set to either True or False (1 or 0) when pages are tagged for printing. This is set to ITP:PQ:PrintPage by default.
Queue parameter
This is the label of the image queue that is passed to the Icetips Previewer, i.e. the first parameter in the parameter list of the Previewer procedure. This is set to pImageQueue by default.
Free Queues
This determines if the queues (image queues) should be freed after the report has been printed to the selected printer. If this is set to True, both the local and the passed queues are freed when the printing to the selected printer is done. At this point the previewer should close as there is nothing to print. Normally this should be set to False.
With version 2.4 this now defaults to False. In prior versions it was set to default to True, which could cause problems if the developer did not make sure that the previewer window closed.
Select Printer first
This determines if the PrinterDialog is called automatically before printing to the selected printer or if you want to do that manually by using
Do ITPSelectPrinter
Before you call either the ITPPrintCurrentPageToSelectedPrinter or ITPPrintToSelectedPrinter routines. If this is checked, all you need to do is to call those two routines. If it is unchecked you must call the ITPSelectPrinter before in order for the user to actually select the printer! This is set to default to True.
Example code
This shows automatically updated code that you can use on the Print All and Print One/Print Current page buttons in the previewer to achieve the desired results. As you check or uncheck the "Free Queues" and "Select printer first" options on the template, you will see the code change. You can then copy/paste this code into the Accepted embeds on the buttons in the previewer.
Generate no code
With this option checked, this templates generates no code into the Previewer procedure.