The remote name could not be resolved- Report Viewer/Report Parameters
I am trying to display a report in the reportviewer.But I keep getting this error message "The remote name could not be reolved: rpt01"
When I put the url directly in the reportviewer I am able to access the report. But I need to access it through the code behind.This is what I am doing:
On the button click event:
Dim table1 As Table = DirectCast(ph_Param.FindControl("Table1"), Table)
Dim temp As String
Dim temp1 As String
Dim i As Integer = 0
Dim tbox As TextBox
Dim radbox As Telerik.Web.UI.RadDatePicker
Dim param As New ArrayList
'Dim param_1 As Microsoft.Reporting.WebForms.ReportParameter
Dim path As String
Dim irsc As ReportCredential = New ReportCredential("RepServicesUser", "reportThis!", "http://testrpt/reportserver")
path = Request.QueryString("ReportID")
Dim param_1 As Microsoft.Reporting.WebForms.ReportParameter() = New
Microsoft.Reporting.WebForms.ReportParameter(param.Count - 1) {}
For x As Integer = 0 To param.Count - 1
'Dim param_1 As New Microsoft.Reporting.WebForms.ReportParameter
'Dim val As String = param(x).ToString()
param_1(x) = New Microsoft.Reporting.WebForms.ReportParameter(param(x))
'Response.Write(val)
Next
rptViewer.ServerReport.ReportServerCredentials = irsc
rptViewer.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote
rptViewer.ServerReport.ReportServerUrl = New System.Uri("http://aitrpt04/reportserver")
rptViewer.ServerReport.ReportPath = path
'rptViewer.ServerReport.SetParameters(param_1(0))
'rptViewer.ServerReport.SetParameters(param_1(1))
rptViewer.ServerReport.SetParameters(param_1)
rptViewer.ServerReport.Refresh()
It stops at the rptViewer.ServerReport.SetParameters(param_1) and throws the above stated error.
I don't know what I need to change to ge this to work. Any help would be appreciated at this point.............RJ
May 18th, 2012 4:07pm
Report server URL should reference to webservice.
In your case try this
....
.....
rptViewer.ServerReport.ReportServerUrl
= New System.Uri(http://aitrpt04/reportserver/reportservice.asmx)
.....
....
Free Windows Admin Tool Kit Click here and download it now
May 18th, 2012 4:28pm
Report server URL should reference to webservice.
In your case try this
....
.....
rptViewer.ServerReport.ReportServerUrl
= New System.Uri(http://aitrpt04/reportserver/reportservice.asmx)
.....
....
May 18th, 2012 4:32pm
That does not work either.RJ
Free Windows Admin Tool Kit Click here and download it now
June 4th, 2012 3:00pm