Note: From List & Label in Version 29 the 1:n relations are now also displayed in the field/variable list in addition to the 1:1 relations in the Designer for Windows desktop. Further details can be found at article Enhanced Drag & Drop Support in the Designer.
Problem
Do you handover one or more relations between different tables via your application, then pass them to List & Label, but you don’t see the relation in the field/variable list of the Designer? This article describes why this is the case.
Solution
Basically, it is important to understand that by default the field/variable list in the Designer does not contain any information about the passed data structure per se, but only maps the data field structure information of all tables found in the data source and passed to List & Label.
The actual data structure can be seen in the data source selection dialog when a new element is created within a report container object, for example a table or a chart:
Can you see the difference in the Customers
table between the first screenshot? It has a relation to the sub-table Orders
, which itself has a relation to the table Order Details
.
But why is that? The background is that each table can be placed separately. So the table Order Details
can either be placed individually as a “root” element (it is also available for selection individually). Likewise, this table Order Details
can also be selected as a sub-element via the relation to Customers
.
So the field/variable list only shows the available tables with their contents (the table fields). However, since each table can now appear at different levels in the hierarchy (this depends on the relations passed), it is only added once in the tree structure.
There is only one exception from this rule: the 1:1 related identifiers of parent tables (the 1:1 relation to parent item: 1 customer can have several orders, but each order is assigned to exactly one customer). To stay with the example of the parent Customers
and child Orders
: so it may well be necessary to print customer data that refers to an order line in the Orders
table:
You can then see the relationship, albeit in reverse order.