NTPSortAddSortOrder

 

NTPSortAddSortOrder ( <ReportHandle>, <FieldName>, <SortDirection> ) -> <ErrorCode>

 

 

Description

 

This command can reset the sort order of a report. The data sort in a report is normally defined in NotesToPaper-Setup. By clearing the sort order through use of the NTPSortClearSortOrder and then setting the order by using NTPSortAddSortOrder the data sort can be set at run-time. Every function call sets an additional sort field, thus enabling a multi-level sort. The parameter <SortDirection> allows the definition if the filed is to be sorted in ascending or descending order.

 

 

Note: The change in the data sort does not effect the report definition.

 

 

Declaration for Lotus Script

 

Declare Function NTPSortAddSortOrder Lib "NTP.DLL" ( ByVal ReportHandle As Long, ByVal FieldName As String, ByVal SortDirection As Long ) As Long

 

 

Parameter

 

<ReportHandle> (LONG)

Report handle, returned by calling NTPInit or NTPInitFromDatabase.

 

<FieldName> (STRING)

Name of the field to be used for the data sort.

 

<SortDirection> (STRING)

Defines the sort "direction":

0 =        descending

1 =        ascending

 

 

Return value

<ErrorCode> (LONG)

Number of the error encountered (0 = no error)