combit List & Label 30 - .NET Help
Programming Introduction / Examples / General / Database Independent Contents / Suppress Data From a Data Source
Suppress Data From a Data Source

Particular fields or variables that are not needed (e.g. ID fields which aren't required for printing) can be suppressed by using the AutoDefineField and AutoDefineVariable events.

void LL_AutoDefineField(object sender, AutoDefineElementEventArgs e)
{
    if (e.Name.EndsWith("ID"))
        e.Suppress = true;
}

// ...

using (ListLabel LL = new ListLabel())
{
    // Define/Assign data source
    LL.DataSource = CreateDataSet();

    // Add event handling for own fields
    LL.AutoDefineField += new AutoDefineElementHandler(LL_AutoDefineField);

    // Call the Designer
    LL.Design();

    // Print
    LL.Print();
}