Variables and Fields With Databinding

Consider the case of a 1:n linked data structure such as "InvoiceHeader” or "InvoiceItems”. The header data should usually be declared as variables whereas the actual invoice items should be declared as fields. The properties DataMember and AutoMasterMode can be used to achieve this:

ListLabel LL = new ListLabel();
LL.DataSource = CreateDataSet();

 

// Order data as variables

LL.DataMember = "InvoiceHeader";

LL.AutoMasterMode = LlAutoMasterMode.AsVariables;


LL.Design();
LL.Dispose();

At print time a merge print is automatically generated, if e.g. an invoice form has been designed, a single invoice with its own page numbering, aggregation, etc. is created for each record from the invoice head table.

variable-felder-en

Effect of the option AutoMasterMode. Left: “AsVariables”, right: “AsFields”.