5
如何使用POCO /自定義業務對象創建具有父 - 子 - 孫 - 子關係的報表?報告服務:帶有父 - 子孫的業務對象數據源
public class Invoice
{
public List<Account> Accounts { get; set; }
}
public class Account
{
public List<LineItem> LineItems { get; set; }
}
public void GenerateReport()
{
var localReport = new LocalReport();
localReport.LoadReportDefinition(GetEmbeddedResource("Invoice.rdlc"));
localReport.DataSources.Add(new ReportDataSource("InvoiceDataset", new List<Invoice> { invoices }));
}
最好在子報表上使用表格和列表控件。具有本地處理功能的Reporting Services v10(.rdlc文件)。