repead databand for dataset objects

hey

i load some dataobject (list<t> to a dataset.

i have customer and some contracts.

i want to repeat the contracts data-band for each contract in the dataset but it shows only the first

how can i do that?

Comments

  • Hello!

    If only the first contract from the nested Contracts collection (List<Contract>) is displayed for a customer, the reason is that:

    When RegisterData is called, the specified nesting depth is insufficient (maxNestingLevel must be >= 2, for example, 3).

    The internal (detailed) DataBand is not directly bound to the nested source “Customers.Contracts” and/or the source is not enabled (Enabled = true)!

    Please note: a nested collection in the FastReport dictionary is registered under the compound name “Customers.Contracts” (not just “Contracts”):

    report.RegisterData(customers, “Customers”, maxNestingLevel: 3);
    var dsCust = report.GetDataSource(“Customers”);
    var dsContracts = report.GetDataSource(“Customers.Contracts”);
    dsCust.Enabled = true;
    dsContracts.Enabled = true;
    
    // Bind the nested DataBand inside the parent to dsContracts specifically:
    detailBand.DataSource = dsContracts;
    
This discussion has been closed.