Click here to Skip to main content
15,867,568 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello friends

I am generating Simple rdlc report with sub report.Without Passing Parameter it works fine but when i pass the parameter it is showing above error.

My Code is...
ReportDataSource rds = new ReportDataSource();
rds.Name = "DataSet3_RegisterFresh";
rds.Value = FetchCustomer();

ReportViewer1.LocalReport.ReportPath = Server.MapPath("Report.rdlc");
ReportViewer1.LocalReport.DataSources.Clear();
ReportViewer1.LocalReport.DataSources.Add(rds);

//ReportViewer1.RefreshReport();



ReportViewer1.LocalReport.EnableExternalImages = true;

ReportParameter rptParam1 = new ReportParameter("@College","555");
//ReportParameter rptParam2 = new ReportParameter("ReportLogo",
// "http://" + Request.Url.Host + "/" + ResolveUrl("aspdotnetcodes.gif"));
ReportViewer1.LocalReport.SetParameters(new ReportParameter[] { rptParam1});
ReportViewer1.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(SubreportProcessingEventHandler);
ReportViewer1.LocalReport.Refresh();
Posted
Comments
Sergey Alexandrovich Kryukov 21-Nov-11 0:44am    
Let's see where is "…showing above error": is it "Hello friends" or "An error occurred during local report processing"? Not very much of error report... :-)
--SA
jagadeesh123qqq 21-Nov-11 0:50am    
An error occurred during local report processing

1 solution

Why did you guys never come with complete details? Here you mentioned only partial error message. Anyway your friend(think so) asked the same question 7-8 months ago, check it

An error occurred during local report processing.....[^]
 
Share this answer
 
Comments
Pranav_ 30-Aug-13 1:39am    
ReportParameter[] p = new ReportParameter[3];
p[0] = new ReportParameter("@fromdate", fdt.ToString(), false);
p[1] = new ReportParameter("@todate", tdt.ToString(), false);
/An error occurred during local report processing./ this.ReportViewer1.LocalReport.SetParameters(new ReportParameter[] { p[0], p[1] });
this.selectusedmodelsTableAdapter.Fill(this.inventoryDbDataSet11.selectusedmodels);
DataTable dt = new DataTable();
ReportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local;
this.ReportViewer1.RefreshReport();
LocalReport localReport = ReportViewer1.LocalReport;
string path = Path.GetDirectoryName(Application.StartupPath);
string reportPath = Path.Combine(path, @"ServiceReport.rdlc");
string originalpath = reportPath.Replace("\\bin", "");
localReport.ReportPath = originalpath;
this.ReportViewer1.Width = 700;
this.ReportViewer1.Height = 300;
ReportDataSource rds = new ReportDataSource();
rds.Name = "Report1";
rds.Value = dt;
//localReport.DataSources.Add(rds);
ReportViewer1.RefreshReport();
Member 10666270 14-Aug-15 8:30am    
Include the report viewer dll... the error will be sorted.

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