Syntax:
INT LlDbAddTableRelationEx(HLLJOB hJob, LPCTSTR pszTableID, LPCTSTR pszParentTableID, LPCTSTR pszRelationID, LPCTSTR pszRelationDisplayName, LPCTSTR pszKeyField, LPCTSTR pszParentKeyField);
Task:
This method can be used to define a relation between two tables added via LlDbAddTable(), especially for drilldown support. List & Label does not directly distinguish between different relation types. You simply pass a relation and its ID, and you can query the current relation later at print time using LlPrintDbGetCurrentTableRelation().
Parameter:
hJob: List & Label job handle
pszTableID: ID of the child table. Must be identical to the ID passed in LlDbAddTable().
pszParentTableID: ID of the parent table. Must be identical to the ID passed in LlDbAddTable().
pszRelationID: ID of the table relation. It is returned by LlPrintDbGetCurrentTableRelation() at print time. Must be unique within a print.
pszRelationDisplayName: Name of the table relation as displayed in the Designer and it is not saved to the project file. If no name is given, the display name and the unique name are identical.
pszKeyField: Key field of the child table, multiple key fields can be added as tab separated list
pszParentKeyField: Key field of the parent table, multiple key fields can be added as tab separated list
Return Value:
Error code
Hints:
See the hints in chapter Printing Relational Data. Before using the call, the parent and child table must be passed with LlDbAddTable().
Example:
See chapter Direct Print and Export From the Designer.
See also:
LlDbAddTable, LlDbAddTableSortOrder, LlPrintDbGetCurrentTable, LlPrintÂDbGetÂCurrentTableSortOrder, LlPrintDbGetCurrentTableRelation