所以我要做的是:
Dim rview As New ReportViewer()
Dim reportServerAddress As String = "http://server/Reports_client"
rview.ServerReport.ReportServerUrl = New Uri(reportServerAddress)
Dim paramList As New List(Of Microsoft.Reporting.WinForms.ReportParameter)
paramList.Add(New Microsoft.Reporting.WinForms.ReportParameter("param1", t.Value))
paramList.Add(New Microsoft.Reporting.WinForms.ReportParameter("CurrentDate", Date.Now))
Dim reportsDirectory As String = "AppName.Reports"
Dim reportPath As String = String.Format("/{0}/{1}", reportsDirectory, reportName)
rview.ServerReport.ReportPath = reportPath
rview.ServerReport.SetParameters(paramList) 'This is where I get the exception
Dim mimeType, encoding, extension, deviceInfo As String
Dim streamids As String()
Dim warnings As Microsoft.Reporting.WinForms.Warning()
deviceInfo = "<DeviceInfo><SimplePageHeaders>True</SimplePageHeaders></DeviceInfo>"
Dim format As String = "PDF"
Dim bytes As Byte() = rview.ServerReport.Render(format, deviceInfo, mimeType, encoding, extension, streamids, warnings)
在调试这个代码时,我可以看到它抛出了一个
MissingEndpointException
SetParameters(paramList)
通过此消息:
服务器失败。检查你的连接
报表服务器
在服务器的日志文件中,我可以看到:
用户界面!报表管理器\u 0-8!878!06/02/2010-11:34:36::
'/Reports\u client/ReportExecution2005.asmx'
虚拟路径)
allowCrossApp,布尔值
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext
上下文,VirtualPath VirtualPath,
布尔noBuild,Boolean
System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext
上下文,VirtualPath VirtualPath,
布尔noBuild,Boolean
allowCrossApp,布尔值
上下文,VirtualPath(VirtualPath)
在
inputFile,HttpContext)位于
上下文,字符串动词,字符串url,
字符串(文件路径)
上下文,字符串请求类型,
虚拟路径,字符串
路径转换,布尔值(useAppConfig)
System.Web.HttpApplication.ExecuteStep(IExecutionStep)
我在网上找不到任何适合我的问题的资源。有人有线索吗?我能够从web应用程序查看报告,因此我确信服务器正在运行。