Click here to Skip to main content
15,848,904 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am having a strange problem with my code. I have report having sub report in it. The code for sub report is working fine locally. But the same is not after deploying on Production Server. Below is my code for loading report.

Error I am getting is

Data retrieval failed for the subreport, 'ItinerarySummary', located at: E:\Publish\V 1.0\Reports\Sales\ItinerarySummary.rdlc. Please check the log files for more information.

Any help would be greatly appreciated.

protected void LoadReport(ReportDataSource rptSource, string ReportFileName, List<ReportParameter> Param = null)
        if (ReportViewer1.LocalReport.DataSources.Count > 0)

        ReportViewer1.LocalReport.ReportPath = Server.MapPath(ReportFileName);

        if (Param != null)
        ReportViewer1.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(localReport_SubreportProcessing);

void localReport_SubreportProcessing(object sender, SubreportProcessingEventArgs e)
            e.DataSources.Add(new ReportDataSource("PricingHeader", TourPricingDAL.getTourPricingDetails(null, TourLaunchDetailsID)));
Updated 30-Oct-13 20:23pm
bluesathish 31-Oct-13 3:17am    
what is the runtime value you're getting ReportFileName variable?
Madhu Nair 31-Oct-13 3:28am    
The code is working while running directly from code. But once published the same is not working and getting the above error.

1 solution

I have solved this issue by adding multiple datasets in the the same report instead of having multiple sub reports!!!!
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900