Has this never been done before?
I'm not sure if this is the right forum, so please tell me which one I should post in if this is not relevant here.
I am designing a report using the Report Designer in Visual Studio 2010 and creating an RDLC report layout. I thne display the report using the ReportViewer control on a XAML form.
My problem is that I need to have a subreport with its own subreport added to my main report. I've got the data displaying for the child subreport in the main report fine, but I am unsure how to hook the grandchild's subreport into the processing loop so I can fill the dataset based on the child's data. This is my code to get the Child data:
In my ReportViewer_Load() I have this:
// Add a handler for the SubreportProcessing event
_reportViewer.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(LocalReport_SubreportProcessing);
And that code refers to this:
private void LocalReport_SubreportProcessing(object sender, SubreportProcessingEventArgs e)
Guid rct_PK = new Guid(e.Parameters.Values);
= new SamaanSystems.IBC.WPF.DataSets.ReceiptsByPeriodTableAdapters.ReceiptDetailsSelectByReceiptPKForReceiptReportTableAdapter();
e.DataSources.Add(new ReportDataSource("dsReceiptDetails", dataset.Tables));
How would I handle a similar subreport processing for the grandchild?