void LL_AutoDefineNewLine(object sender, AutoDefineNewLineEventArgs e)
{
// Switch to next record if necessary
// GetCurrentFieldValue is function of your application
// which returns the content of a data field.
(sender as ListLabel).Fields.Add("AdditionalData.AdditionalField", GetCurrentFieldValue());
}
// ...
using (ListLabel LL = new ListLabel())
{
// Define/Assign data source
LL.DataSource = CreateDataSet();
// Define additional data fields
LL.Variables.Add("AdditionalData.UserName", GetCurrentUserName());
LL.Variables.Add("AdditionalData.ProjectName ", GetCurrentProjectName());
// ...
// Add event handling for own fields
LL.AutoDefineNewLine += new AutoDefineNewLineHandler(LL_AutoDefineNewLine);
// Call the Designer
LL.Design();
// Print
LL.Print();
}
Private Sub LL_AutoDefineNewLine(sender As Object, e As AutoDefineElementEventArgs) Handles LL.AutoDefineNewLine
' Switch to next record if necessary
' GetCurrentFieldValue is function of your application
' which returns the content of a data field.
TryCast(sender, ListLabel).Fields.Add("AdditionalData.AdditionalField", GetCurrentFieldValue())
End Sub
// ...
Using LL As New ListLabel()
' Define/Assign data source
LL.DataSource = CreateDataSet()
' Define additional data fields
LL.Variables.Add("AdditionalData.UserName", GetCurrentUserName())
LL.Variables.Add("AdditionalData.ProjectName ", GetCurrentProjectName())
' ...
' Call the Designer
LL.Design()
' Print
LL.Print()
End Using