none
Parameter passing problem in SSRS 2008 RRS feed

  • Question

  • Hi I am passing the 2 parameters("StudentID","examid") to the ssrs using following code. When I run the report getting exception  'examid' parametermissing a value.

    I am using the following code in asp.net. In .rdl file I declared these parameter with type int, then change to text but not worked

     try
                {
                    string str = "";
                    string ExamID = string.Empty;
                    ExamID = ddlTestList.SelectedValue;
                    if (this.Session["UserID"] != null)
                        str = Convert.ToString(this.Session["UserID"]);
                    this.rptViewer.ServerReport.ReportServerUrl = new Uri(ConfigurationManager.AppSettings["ReportServerURL"]);
                    this.rptViewer.ServerReport.ReportPath = "/" + ConfigurationManager.AppSettings["ReportServerFolder"] + "/StudentComparisonFreeTest";
                    this.rptViewer.ProcessingMode = ProcessingMode.Remote;
                    ReportParameter[] reportParameterArray = new ReportParameter[2] { new ReportParameter("StudentID", str), new ReportParameter("ExamID", ExamID) };

                    this.rptViewer.ShowParameterPrompts = false;
                    this.rptViewer.ServerReport.SetParameters((IEnumerable<ReportParameter>)reportParameterArray);
                    this.rptViewer.ServerReport.Refresh();
                }
                catch (Exception ex)
                {
                    this.PageMessage = ex.ToString();//"Some Problem Occured in running the report,Please try again";
                }


    Thursday, May 3, 2012 5:42 AM

Answers