Solved

An error occurred during local report processing

Posted on 2012-03-21
3
4,664 Views
Last Modified: 2012-03-23
HI,

I am trying to add parameters to a reportviewer control in c# 2010 windows application using the following code but I get an error that

{"An error occurred during local report processing."}         

{"An attempt was made to set a report parameter '@id' that is not defined in this report."}

code:
this.qReportTableAdapter.Fill (this.dsReport.qReport);
          reportViewer1.LocalReport.ReportPath = "Report5.rdlc";
          List<ReportParameter> paramList=new List<ReportParameter> ();
          paramList.Add (new ReportParameter ("@id", nInt.ToString()));
                 this.reportViewer1.LocalReport.DataSources.Clear();
          this.reportViewer1.LocalReport.SetParameters (paramList);
          this.reportViewer1.RefreshReport ();

please help me to fix the problem?

thanks

ayha
0
Comment
Question by:ayha1999
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 16

Accepted Solution

by:
Easwaran Paramasivam earned 500 total points
ID: 37751131
Whether the report file have option to accept the parameter @id?  The @ symbol may not require. Please do refer http://forums.asp.net/t/1240076.aspx/1 and http://www.codeease.com/pass-parameter-to-a-rdlc-report-file.html
0
 
LVL 7

Author Comment

by:ayha1999
ID: 37751647
the code gives no error but the result is not as pe query.


          string nInt ="28";

          this.qReportTableAdapter.Fill (this.dsReport.qReport);
 = "Report5.rdlc";
            ReportParameter rp = new ReportParameter("Id", nInt);
            this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { rp });
            this.reportViewer1.RefreshReport();


I provided Id =28 but it always bring the first record.
0
 
LVL 7

Author Closing Comment

by:ayha1999
ID: 37760067
Thanks
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question