Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Parent - Child - Grandchild report Expand / Collapse
Author
Message
Posted Tuesday, April 30, 2013 7:29 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, August 14, 2014 12:26 PM
Points: 68, Visits: 127
Has this never been done before?

Hi,

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?
Post #1448025
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse