Programmatically adding subreports in SSRS

Hi all,

I have created one master report in asp.net. I am having several subreports as templates.

I have to add these sub reports(25 reports) dynamically to the master report depend on some condition.

Atpresent What I am doing is I have embedded all the subreports in to the table row in the master report and hiding those are not necessary. but the time that taking for report loading is very long(hardly 10 to 15 min) whic is not fair.Please tell me way to add that subreports dynamically from Front end coding (C#) so that the necessary will be loaded.

Thanks,

Muthu kumaran.D

[626 byte] By [mkumaran] at [2008-1-10]
# 1
Hi,

I am working on same fonctionnality. The solution is to make your report external and open the report definition (XML) in order to update it before loading it.

XmlDocument xmlReport = new XmlDocument();
xmlReport.Load("Report1.rdlc");

Update / Delete needed subreport and save the XML as tmp.rdlc
Next step is to load the master report (LoadReportDefinition), and relink all subreport (LoadSubreportDefinition).

Hope this can help
Squale at 2008-1-15 > top of Msdn Tech,Visual Studio,Visual Studio Report Controls...

Visual Studio

Site Classified