NTPInitFromDatabase

 

NTPInitFromDatabase ( <ReportName>, <ServerName>, <DatabaseName>, <ShowHideMessages> ) -> <ErrorCode>

 

 

Description

 

Initialization of a new report. The function delivers a handle (report handle) as the return value, which is used by all other functions to access this new report. Most of the NotesToPaper functions expect this report handle as the first parameter. This report handle is valid until the report is either cancelled by using NTPCancel or executed by using NTPProcessReport.... This command can only initialize a report where the reports layout is saved in a Notes database. If a report layout saved on the file system is to be used, use the command NTPInit instead.

 

 

Declaration for Lotus Script

 

Declare Function NTPInitFromDatabase Lib "NTP.DLL" ( ByVal ReportName As String, ByVal ServerName As String, ByVal DatabaseName As String, ByVal ShowHideMessages As Long ) As Long

 

 

Parameter

 

<ReportName> (STRING)

The name of the report to be printed. The name can either be "hardcoded" or set by the end-user, using the commands NTPReportList or NTPReportListFromDatabase. The name used here, is the name under which the report was created in NotesToPaper Setup.

 

<ServerName> (STRING)

Name of the server the database is located on. If an empty string is passed, the database is assumed to be local. The server name should be passed in the form passed by the "NotesDatabase" class.

 

<DataBaseName> (STRING)

Name of the database containing the report definition. The database name may contain sub-directories and must be given relative to the Notes data directory (e.g. "Demo\Ntp.Nsf").

 

<ShowHideMessages> (LONG)

Mode for the output of error messages. Possible values:

NTPPROCESS_SHOWMESSAGES

NTPPROCESS_HIDEMESSAGES

 

 

Return value

 

<ErrorCode> (LONG)

If the <ErrorCode> is negative, an error was encountered. A return value >=0 is the report handle for the additional commands like NTPSendField for example.