Syntax:
INT LlDbAddTableEx(HLLJOB hJob, LPCTSTR pszTableID, LPCTSTR pszDisplayName, UINT nOptions);
Task:
Adds a table or schema for designing and printing and supports additional options. This table is available in the Designer and List & Label can request it at print time.
Parameter:
hJob: List & Label job handle
pszTableID: Unique name of the table. It is returned by the LlPrintDbGetCurrentTable() function at print time. If you pass an empty string or NULL, the table buffer will be deleted.
pszDisplayName: Name of the table as displayed in the Designer. If no name is given, the display name and the unique name are identical.
nOptions: a combination of one of the following flags:
Value |
Meaning |
LL_ADDTABLEOPT_SUPPORTSSTACKEDSORTORDERS |
Support stacked sort orders in the designer. If the user chooses multiple stacked sortings, these are returned tab separated in LlPrintDbGetCurrentTableSortOrder() |
LL_ADDTABLEOPT_-SUPPORTSADVANCEDFILTERING |
Support the translation of filter expressions to native syntax. See the documentation for the LL_QUERY_EXPR2HOSTEXPRESSION callback and LlPrintDbGetCurrentTableFilter() |
Return Value:
Error code
Hints:
If a table name contains a "." a schema will be used.
See the hints in chapter Printing Relational Data.
Example:
HLLJOB hJob;
hJob = LlJobOpen(0);
LlDbAddTable(hJob,
"", NULL);
LlDbAddTable(hJob, "Orders", NULL);
LlDbAddTable(hJob,
"OrderDetails", NULL);
LlDbAddTable(hJob, " HumanResources.Employee", NULL);
// schema info
<... etc ...>
LlJobClose(hJob);
See also:
LlDbAddTableSortOrder, LlDbAddTableRelation, LlPrintDbGetCurrentTable, LlPrintDbGetCurrentTableSortOrder, LlPrintDbGetCurrentTableRelation