OK, I've worked out how to do master/detail reports from POCO's by having my master data in one collection and detail records in another, and binding the master data collection to the main report and the detail records to a subreport, and telling Crystal how to link the details records to a master record.
However, that's not how my domain model objects are structured. My objects look more like this:
public class Invoice
{
public string InvoiceNumber { get; set; }
public string CustomerName { get; set; }
public InvoiceLine[] Lines { get; set; }
}
public class InvoiceLine
{
public string Description { get; set; }
public int Quantity { get; set; }
public decimal UnitPrice { get; set; }
}
Is it possible to use this structure as the data for a Crystal report, or do I really have to split the master and detail records into two separate collections?