RpReport:SetIndex() Method
<< Click to Display Table of Contents >> RpReport:SetIndex() Method |
![]() ![]() ![]() |
Purpose
Use this method to set an index for the primary rpRDDTable object.
Syntax
<oRpReport>:SetIndex(cFileName, cTagName) NIL
Arguments
cFileName | The file name of the index. |
cTagName | This is a string specifying the tag name to select from the index file. This parameter has meaning for RDDs that support compound indexes such as DBFCDX. If you are specifying an index from a compound index file, you must specify this parameter; otherwise, it is not required. |
Description
If an index is specified via this method it does not override the sort order of the report; you must clear the sort order for the index to take precedence. Note: It is faster to use an existing index since the report engine does not have to create an index to support the sort order.
Example
// Set the index to be used for the report sort order
oRpReport:SetIndex ( "C:\RP2\BIT.CDX", "BIT" )
Note: | This method maps directly to the first table object in the primary section. It only applies if the first table object is a rpRDDTable. It may be necessary to call RpReport:Connect2Source() before using this method. See the discussion under Connect2Source() for more information. |