Boa Tarde Pessoal
Estou tentando fazer que uma página Web monte um arquivo Excel a partir de report no Sql Reporting Services. Vendo por outros sites estou utilizando o ServerReport.Render. Só que quando vou executar, aparece o seguinte erro:
The attempt to connect to the report server failed. Check your connection information and that the report server is a compatible version.
Algém poderia me ajudar para corrigir este problema. Estou utilizando o Visual Studio 2010 e SQL Server 2008. Abaixo código que estou montando.
Dim obj1 As New ReportViewer()
Dim stb As New StringBuilder()
Dim data As New DateTime
data = DateTime.Now
obj1.ProcessingMode = ProcessingMode.Remote
obj1.ServerReport.ReportPath = "/Teste_City/Report1.rdl"
obj1.ServerReport.ReportServerUrl = New System.Uri("http://ev101f74ea4a15/Reports_SQLSERVER_FELIPE", System.UriKind.Absolute)
obj1.RefreshReport()
Dim tipo As String = String.Empty
Dim encoding As String = String.Empty
Dim extensao As String = "xls"
Dim streams As String()
Dim warnings As Warning()
Dim bytePDF As Byte()
bytePDF = obj1.ServerReport.Render("Excel", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing)
Dim file As New FileStream("Caminho da Rede", FileMode.Create)
file.Write(bytePDF, 0, bytePDF.Length)
file.Close()