I tried to open a SQL Server 2005 Reporting Service report in ASP.Net 2.0 using ReportViewer. The following is my code.Dim param(2) As Microsoft.Reporting.WebForms.ReportParameterparam(0) = New Microsoft.Reporting.WebForms.ReportParameter("ProjectID", Me.cboProject.SelectedValue)param(1) = New Microsoft.Reporting.WebForms.ReportParameter("RunBy", Session("strEmployeeName"))Me.ReportViewer1.ServerReport.SetParameters(param)Me.ReportViewer1.ServerReport.ReportServerCredentials = New _clsReportServerCredential(System.Configuration.ConfigurationManager.AppSettings("strReportViewUser"), _System.Configuration.ConfigurationManager.AppSettings("strReportViewPassword") Me.ReportViewer1.ServerReport.ReportServerUrl = New Uri(http://SQL2005/ReportServer/)Me.ReportViewer1.ServerReport.ReportPath = "/nsPortalReports/rptIssuesByRole"Me.ReportViewer1.ServerReport.Refresh()
I need help with passing multiple parameters. I got an erron on the second parameter (parm(1)). The error was"Overload resolution failed because no accessible 'New' can be called without a narrowing conversion: 'Public Sub New(name As String, values() As String)': Argument matching parameter 'values' narrows from 'Object' to '1-dimensional array of String'. 'Public sub New(name As String, value As String)': Argument matching parameter 'value' narrow from 'Object' to 'String' "
How can I pass the parameters? Thanks.DanYeung