none
Microsoft.Reporting.WebForms.LocalProcessingException was unhandled by user code RRS feed

  • Question

  • CODE:

    using System;

    using System.Collections;

    using System.Configuration;

    using System.Data;

    using System.Linq;

    using System.Web;

    using System.Web.Security;

    using System.Web.UI;

    using System.Web.UI.HtmlControls;

    using System.Web.UI.WebControls;

    using System.Web.UI.WebControls.WebParts;

    using System.Xml.Linq;

    using Microsoft.Reporting.WebForms;





    public partial class ReportsTest_SQLReportViewer : System.Web.UI.Page

    {

    protected void Page_Load(object sender, EventArgs e)

    {

    if (Request.QueryString["ReportStartDate"] != null && Request.QueryString["ReportEndDate"] != null && Request.QueryString["Company"] != null)

    {

    string ReportStartDate = Request.QueryString["ReportStartDate"];

    ReportParameter p1 = new ReportParameter("ReportStartDate", ReportStartDate);

    string ReportEndDate = Request.QueryString["ReportEndDate"];

    ReportParameter p2 = new ReportParameter("ReportEndDate", ReportEndDate);

    string Company = Request.QueryString["Company"];

    ReportParameter p3 = new ReportParameter("Company", Company);

    ReportViewer1.LocalReport.SetParameters(new ReportParameter[] { p1, p2, p3 });}

    }

    }

    ****It stops at the reportviewer1.localreport.setpxxxx
    Error message: 

    Microsoft.Reporting.WebForms.LocalProcessingException was unhandled by user code
      Message="An error occurred during local report processing."
      Source="Microsoft.ReportViewer.WebForms"
      StackTrace:
           at Microsoft.Reporting.WebForms.LocalReport.SetParameters(IEnumerable`1 parameters)
           at ReportsTest_SQLReportViewer.Page_Load(Object sender, EventArgs e) in c:\Documents and Settings\Jill Swift\My Documents\Visual Studio 2008\WebSites\Pinnergyltd\Reports\ReportViewer5.aspx.cs:line 33
           at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
           at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
           at System.Web.UI.Control.OnLoad(EventArgs e)
           at System.Web.UI.Control.LoadRecursive()
           at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
      InnerException: Microsoft.ReportingServices.Diagnostics.Utilities.UnknownReportParameterException
           Message="An attempt was made to set a report parameter 'Company' that is not defined in this report."
           Source="Microsoft.ReportViewer.Common"
           ExceptionLevelHelpLink="http://go.microsoft.com/fwlink/?LinkId=20476&EvtSrc=Microsoft.ReportingServices.Diagnostics.Utilities.ErrorStrings&EvtID=rsUnknownReportParameter&ProdName=Microsoft%20SQL%20Server%20Reporting%20Services&ProdVer=9.0.21022.8"
           SkipTopLevelMessage=false
           StackTrace:
                at Microsoft.ReportingServices.ReportProcessing.ParameterInfoCollection.Combine(ParameterInfoCollection oldParameters, ParameterInfoCollection newParameters, Boolean checkReadOnly, Boolean ignoreNewQueryParams, Boolean isParameterDefinitionUpdate, CultureInfo culture)
                at Microsoft.ReportingServices.ReportProcessing.ParameterInfoCollection.Combine(ParameterInfoCollection oldParameters, ParameterInfoCollection newParameters, Boolean checkReadOnly, Boolean ignoreNewQueryParams, Boolean isParameterDefinitionUpdate)
                at Microsoft.Reporting.LocalService.GetReportParameters(CatalogItemContext reportContext, NameValueCollection userSpecifiedValues, ParameterInfoCollection baseLineParameters, DatasourceCredentialsCollection credentials, ReportRuntimeSetup reportRuntimeSetup)
                at Microsoft.Reporting.WebForms.LocalReport.SetParameters(IEnumerable`1 parameters)


           InnerException:
    Tuesday, October 28, 2008 8:32 PM

Answers

  •  

    Your not actually providing the .rdl or .rdlc to be used.  You need to provide the reportpath, or reportdefiniton first, then you can provide the parameters.
    Living my life at 123mph in 11.15 seconds
    • Marked as answer by jpeevey Monday, April 20, 2009 3:25 PM
    Tuesday, October 28, 2008 9:45 PM

All replies

  • Based on the text in the StackTrace it looks like the Report doesn't have a Parameter named Company. If you have the RDL for the report check it to make sure that a parameter with the name Company is defined.


     This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, October 28, 2008 8:54 PM
  •  

    Your not actually providing the .rdl or .rdlc to be used.  You need to provide the reportpath, or reportdefiniton first, then you can provide the parameters.
    Living my life at 123mph in 11.15 seconds
    • Marked as answer by jpeevey Monday, April 20, 2009 3:25 PM
    Tuesday, October 28, 2008 9:45 PM
  • hello:

    at Microsoft.Reporting.WebForms.LocalReport.SetParameters(IEnumerable`1 parameters)

       you are probably passing an parameter value no correct. you must revised the format date if effectively is a date value.  I had the same problem with a parameter date with format string. ej. over my case:

       varDate.Value.ToString()  !=  varDate.Value.ToShortDateString()

    the report needed format "dd/mm/yyyy"  and the value passed was "dd/mm/yyyy hh:mi:ss " format. the error was:

    SetParameters(IEnumerable`1 parameters)

     

    Monday, June 4, 2012 11:58 PM
  • Just had the same problem.  Took me 10 minutes to figure it out.  Doh!

    Check the properties of your parameters in the report.  (Right click on the report pane, select Parameters.)

    UNCHECK    -internal-

    Now it runs.

    Saturday, January 4, 2014 12:33 AM