How to display a report that contains a subreport by using the ReportViewer control in Visual Studio

S

Sheena Abraham

Hi Guys,

I am sure all of you in this thread have found a solution for this
problem.

I have tried the following:
in the button click as I have a parameter to select the Main report
data.

Buttonclick event :
--------------------
{
Code here....

RvMemberInfo.LocalReport.DataSources.Add(new
ReportDataSource("MembersInformationDataSet_GetMemberByID",
this.ShowMemberDetails.ID));
RvMemberInfo.LocalReport.SubreportProcessing += new
SubreportProcessingEventHandler(SetSubDataSource);
RvMemberInfo.LocalReport.Refresh();
}

public void SetSubDataSource(Object sender ,
SubreportProcessingEventArgs e )
{
e.DataSources.Add(new
ReportDataSource("MemberInformationDataSet_GetMemberActivitiesByMemberID
",
this.ShowMemberActivities.ID));
}

Any help or suggestions will be really helpful.

Sheena
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top