NTPDesignerSetPrinterName

 

NTPDesignerSetPrinterName ( <ReportName>, <ServerName>, <DatabaseName>, <PrinterName>, <PrinterValue> ) -> <ErrorCode>

 

 

Description

 

This command sets a certain printer as the standard printer for a set report. When executing the report the program will automatically attempt to access this printer. Should this printer not be available, NotesToPaper will use the default printer instead.

 

NotesToPaper offers to types of pre-set printers: For the first page (NTPPRINTER_FIRST_PAGE_PRINTER ) and for the following pages (NTPPRINTER_FOLLOWING_PAGE_PRINTER) of a report. The parameter <PrinterValue> defines this setting.

 

If no printer name is set for <PrinterName> a printer selection dialogue will appear.

 

 

Declaration for Lotus Script

 

Declare Function NTPDesignerSetPrinterName Lib "NTP.DLL" ( ByVal ReportName As String, ByVal ServerName As String, ByVal DatabaseName As String, ByVal PrinterName As String, ByVal PrinterValue As Long ) As Long

 

 

Parameters

 

<ReportName> (STRING)

The name of the report that was assigned in NotesToPaper Setup when the report was first created.

 

<ServerName> (STRING)

Name of the server the database <DatabaseName> that contains the report is located on. If an empty string is passed, the database is assumed to be local.

 

<DatabaseName> (STRING)

The name of the database from which the report is to be read and which is found on <ServerName>.

 

<PrinterName> (STRING)

The name of the printer that is to be used to output the report. The name of the printer can be found by using NTPPrinterGetPrinterName (see the NotesToPaper online help). If an empty string is passed, a printer selection dialogue will be shown.

 

<PrinterValue> (LONG)

This option defines if the printer is to be set for a "first page" or any other page.

NTPPRINTER_FIRST_PAGE_PRINTER

NTPPRINTER_FOLLOWING_PAGE_PRINTER

 

 

Return value

 

<ErrorCode> (LONG)

Number of the error encountered (0 = no error)