LlDbAddTableSortOrderEx

Syntax:

INT LlDbAddTableSortOrderEx(HLLJOB hJob, LPCTSTR pszTableID, LPCTSTR pszSortOrderID, LPCTSTR pszSortOrderDisplayName, LPCTSTR pszField);

Task:

Defines available sort orders for the tables added via LlDbAddTable(). Each sorting has its unique ID that can be queried using LlPrintDbGetCurrentTableSortOrder() at print time. Additionally the fields that are relevant for the sorting can be passed separated by tabs for further use in the function LlGetUsedIdentifiers().

Parameter:

hJob: List & Label job handle

pszTableID: Table ID to which this sort order applies. Must be identical to the ID passed in LlDbAddTable().

pszSortOrderID: Unique ID of the table sort order. It is returned by LlPrintDbGetCurrentTableSortOrder() at print time.

pszSortOrderDisplayName: Name of the table sort order as displayed in the Designer. If no name is given, the display name and the unique name are identical.

pszField: List of fields that are relevant for the sorting (separated by tabs) if they should be regarded in the function LlGetUsedIdentifiers().

Return Value:

Error code

Hints:

See the hints in chapter Printing Relational Data. Before using the call, the table must be passed with LlDbAddTable().

Example:

HLLJOB hJob;
hJob = LlJobOpen(0);

LlDbAddTable(hJob, "Orders", NULL);
LlDbAddTableSortOrderEx(hJob, "Orders", "Name ASC", "Name [+]",
   "Orders.Name");
<... etc ...>
LlJobClose(hJob);

See also:

LlDbAddTableSortOrder, LlDbAddTable, LlDbAddTableRelation, LlPrintDbGet­Current­Table, LlPrint­DbGet­CurrentTableSortOrder, LlPrintDbGet­Current­Table­Relation