asp.net - How to process subreport of a subreport in rdlc? -


i have rdlc report contains few sub reports. processing sub reports localreport_subreportprocessing event. out of these subreports, 1 report again has sub report. not getting idea how process sub report?

for main report, have added event.

viewer.localreport.subreportprocessing += new subreportprocessingeventhandler(localreport_subreportprocessing);     viewer.localreport.refresh(); 

code event

void localreport_subreportprocessing(object sender, subreportprocessingeventargs e) {           if (e.reportpath == "rpt_psruserhoursdetail")     {         //code     }     else if (e.reportpath == "rpt_benchmiscdetails")     {          system.data.datatable dtbenchmiscsubreport =datatable         reportdatasource subrptsource = new reportdatasource("datasource", dtbenchmiscsubreport);         e.datasources.add(subrptsource);          (sender microsoft.reporting.webforms.localreport).subreportprocessing += new subreportprocessingeventhandler(localreport_subreportprocessingbench);          commonhelper.disposeof(dtbenchmiscsubreport);     } } 

code process sub report of sub report below:

void localreport_subreportprocessingbench(object sender, subreportprocessingeventargs e) {     int intprojectid = 0;     int int_userid = 0;      if (e.parameters.count > 0 && e.reportpath=="submiscellaneoustaskreport")     {         //get parameter      }      datetime dtcurrentmonth = clscheckdbnull.todate(string.format("{0}-{1}-{2}", drpyear.selectedvalue, drpmonth.selectedvalue, "01"));     if (e.reportpath == "submiscellaneoustaskreport")     {         system.data.datatable dt = datatable         reportdatasource subrptsource = new reportdatasource("dataset1", dt);         e.datasources.add(subrptsource);     } } 

@chirag fanse: sub report report. when have sub report(say a) of sub report(say b) b become main report , sub report. can check sub report like

if (e.reportpath == "a") 

and rest of things same.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -