| REM Read the environment
|
| Set session =New NotesSession
|
| Set db = session.CurrentDatabase
|
| Set collection = db.UnprocessedDocuments
|
| REM Read the settings of the current database
|
| DatabaseName = db.FilePath
|
| ServerName = db.Server
|
| REM Initialize the buffer for the report name
|
| StrBuffer = Space(254)
|
| REM Display the report list ( the report name is returned in "StrBuffer" )
|
| If NTPReportListFromDatabase ( StrBuffer, ServerName, DatabaseName ) >= 0 Then
|
| StrBuffer = Trim ( StrBuffer )
|
| REM Determine the number of fields in the report
|
| FieldCount = NTPGetFieldCountFromDatabase ( StrBuffer, ServerName, DatabaseName )
|
| If ( FieldCount >= 0 ) Then
|
| REM Read all field names from the report and store them in a list
|
| For Counter = 1 To FieldCount
|
| FieldBuffer = Space(254)
|
| Status = NTPGetFieldNameFromDatabase ( StrBuffer, ServerName, DatabaseName, Counter, FieldBuffer )
|
| FieldBuffer = Trim ( FieldBuffer )
|
| FieldList( Counter ) = FieldBuffer
|
| Next Counter
|
| REM Initialize a new report
|
| ReportID = 0
|
| ReportID = NTPInitFromDatabase ( StrBuffer, ServerName, DatabaseName, 0)
|
| If ReportID >= 0 Then
|