SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Parent - Child - Grandchild report

Parent - Child - Grandchild report

Frank Cazabon
Frank Cazabon
SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)

Group: General Forum Members
Points: 1986 Visits: 185
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[0].Values[0]);
SamaanSystems.IBC.WPF.DataSets.ReceiptsByPeriodTableAdapters.ReceiptDetailsSelectByReceiptPKForReceiptReportTableAdapter receiptDetailTableAdapter
= new SamaanSystems.IBC.WPF.DataSets.ReceiptsByPeriodTableAdapters.ReceiptDetailsSelectByReceiptPKForReceiptReportTableAdapter();

receiptDetailTableAdapter.Fill(dataset.ReceiptDetailsSelectByReceiptPKForReceiptReport, rct_PK);
e.DataSources.Add(new ReportDataSource("dsReceiptDetails", dataset.Tables[1]));


How would I handle a similar subreport processing for the grandchild?


You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum