private void xrSubreport1_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e) { XRSubreport subReport = sender as XRSubreport; ParentNode parentNode = this.GetCurrentRow() as ParentNode; ChildReport childReport = new ChildReport(); childReport.Parameters["Level"].Value = this.Parameters["Level"].Value; childReport.DataSource = parentNode.Children; subReport.ReportSource = childReport; childReport.ReduceControlSize(subReport, parentNode.Level); }
private void xrSubreport1_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e) { XRSubreport subReport = sender as XRSubreport; ChildReport childReport = new ChildReport(); childReport.Parameters["Level"].Value = this.Parameters["Level"].Value; childReport.DataSource = nodesList; subReport.ReportSource = childReport; parentForm.treeList1.DataSource = helper.ReportDataSource; parentForm.treeList1.ExpandAll(); }