【问题标题】:ReportingServices 2008 web service LoadReport returns error stating that "report" parameter is missingReportingServices 2008 Web 服务 LoadReport 返回错误,指出缺少“报告”参数
【发布时间】:2011-03-03 01:11:14
【问题描述】:

调用正在调用网络服务的代理的代码是:

ReportExecutionService rs = new ReportExecutionService(); rs.Timeout = System.Threading.Timeout.Infinite; rs.Credentials = System.Net.CredentialCache.DefaultCredentials;

string execURL=ConfigurationSettings.AppSettings["ReportsBasePath"] + @"/ReportExecution2005.asmx"; rs.Url=execURL;

ExecutionInfo execInfo = rs.LoadReport("/Reports/rptSharedRepresentativeReport",null);

请注意LoadReport函数的第一个参数是:Report

错误:

未指定参数“报告”的值。它要么在函数调用中丢失,要么被设置为 null 在 Microsoft.ReportingServices.WebServer.ReportExecution2005Impl.LoadReport(字符串报告、字符串 HistoryID、ExecutionInfo2 和 executionInfo) 在 Microsoft.ReportingServices.WebServer.ReportExecutionService.LoadReport(String Report, String HistoryID, ExecutionInfo& executionInfo)

在 System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage 消息,WebResponse 响应,流 responseStream,布尔 asyncCall) 在 System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(字符串方法名,对象 [] 参数) 在 ReportExecutionService.LoadReport(字符串报告,字符串 HistoryID) 在 Stockamp.Portal.RSData.SAReportServerAccess.GetReportStream(String reportPath, ArrayList parameterValues, String format)

【问题讨论】:

    标签: c# ssrs-2008


    【解决方案1】:

    您是否尝试过允许空值?

    如果这不起作用,请检查 XML。当您更改布局中的项目(例如多值和空白值)时,我经常注意到您认为您已经更改了代码,但实际上并没有改变。

    无论您的报告参数是什么,XML 才是真正重要的。

    在报告上,从您的布局或数据选项卡中单击查看 -> 代码。看到报表的 XML 定义后,搜索多值参数的名称。我认为它应该包含在标签中。检查以确保参数具有以下内容:

    <Nullable>true</Nullable>
    
    <AllowBlank>true</AllowBlank>
    

    【讨论】:

      【解决方案2】:

      我使用 wsdl 为框架 1.1 重新编写了代理文件。这次它有 C# 命名空间。 现在网络服务调用“LoadReport”正在工作。所以不是 100% 但可能有命名空间 解决了我的问题

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2018-07-26
        • 1970-01-01
        • 2013-01-22
        • 2012-03-04
        相关资源
        最近更新 更多