Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
randheer
Starting Member
15 Posts |
Posted - 2010-08-23 : 08:33:35
|
I have 4 parameters in which 3 are passed in report and 1 is passed through report viewer. I have made a parameter in SSRS called CandidateId to which I want to pass the value. The code for report viewer is:int intReportID = Convert.ToInt32(Request.QueryString["ReportID"]);string CandId = Convert.ToString(Session["CandidateId"]);lblReportName.Text = dtReport.Rows[0]["ReportName"].ToString();SSRSReportViewer.ShowCredentialPrompts = false;SSRSReportViewer.ServerReport.ReportServerCredentials = new ReportCredentials();SSRSReportViewer.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;SSRSReportViewer.ServerReport.ReportServerUrl = new System.Uri(dtReport.Rows[0]["ReportServerUrl"].ToString());SSRSReportViewer.ServerReport.ReportPath = dtReport.Rows[0]["ReportPath"].ToString();Microsoft.Reporting.WebForms.ReportParameter[] theparams = new Microsoft.Reporting.WebForms.ReportParameter[1];theparams[0] = new Microsoft.Reporting.WebForms.ReportParameter("CandidateId", CandId);theparams[0].Visible = false; SSRSReportViewer.ServerReport.SetParameters(theparams);SSRSReportViewer.ServerReport.Refresh(); After selecting the 3 parameters in report when I run the report its says "The 'CandidateId' parameter is missing a value". Please tell me what is the problem. |
|
|
|
|