【问题标题】:Does SSRS SDK support SQL Server 2008 (i mean non-express edition)?SSRS SDK 是否支持 SQL Server 2008(我的意思是非速成版)?
【发布时间】:2012-04-30 10:06:39
【问题描述】:

我已经参与部署 SSRS SDK (http://ssrsphp.codeplex.com) 以访问 Reporting Services 有一段时间了。但无论我遵循的任何教程、博客、工作示例都表明使用“SQL Server 2008 Express with Advanced Services edition”。是否只有该版本支持此 SDK。

目前我使用的是 SQL Server 2008(不是速成版)。到目前为止,我得到的只是:-

Failed to connect to Reporting Service
Make sure that the url (http://localhost:80/reportServer/) and credentials are correct!

代码:-

<?php require_once 'SSRSReport.php';
try{
    $ssrs_report = new SSRSReport(new Credentials(UID, PASWD), SERVICE_URL);
}catch (SSRSReportException $serviceException){
    echo $serviceException->GetErrorMessage();
}?>   

虽然我已经在我的机器中正确设置了报告服务器,而且我的凭据也是正确的;但我无处可去。

【问题讨论】:

    标签: php sql-server-2008 reporting-services ssrs-2008


    【解决方案1】:

    您还可以输入位于“:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\ReportServer”中的 rsreportserver.config 文件的身份验证类型。

    <Authentication>
        <AuthenticationTypes>
            <RSWindowsNTLM/>
            <RSWindowsBasic/>
        <AuthenticationTypes>
    <Authentication>
    

    reference

    【讨论】:

    • 感谢您的建议。将 放在配置中是必须的,因为这个库 SSRSPHP 使用基本 HTTP 身份验证。
    • @MrigeshRajShrestha 您可以将其标记为正确,以便每个人都可以看到它
    • 真正的原因是 SSRSPHP 库本身的问题。所以这是相关的,但不是正确的答案
    【解决方案2】:

    可能会发生一些事情。

    您可以通过 URL 直接访问http://localhost:80/reportServer/ 吗?它会提示您输入用户\密码吗?您的 SSRS 实例是否称为默认实例?

    【讨论】:

    • 我已经获得了 SSRS 的工作版本。已经存在稳定的 Aspx 项目来提取报告;但这里的问题是 SQL Server 2008(非快速版)是否允许让 SSRS SDK 使用它。在我看来,这是不允许的;还没有具体的理由;所以向社区提出了这个问题。感谢回复
    • 顺便说一句,我可以通过 URL 直接访问localhost:80/reportServer;当然会出现密码提示;因为我对 SSRS 使用了 Windows 身份验证
    • 为什么说SDK?如果您使用的是 php,那么通过代码与 SSRS 交互的唯一选项是 URL 访问或 SOAP。你能更具体地说明你是如何做到的吗?
    • SSRS SDK 是一个开源项目的名称ssrsphp.codeplex.com 请检查一下;我也在问题上指定了它......
    【解决方案3】:

    发现在企业版中完全可以使用SSRSPHP。当代码尝试查看 Web 服务 URL 是否正常时,此库一直抛出异常。从第 195 行开始,请参阅 SSRSReport.php 上的以下行:

    $context = stream_context_create($stream_conext_params);
    $content = @file_get_contents($executionServiceUrl, false, $context); 
    if ($content === FALSE)
        {
            throw new SSRSReportException("",
                        "Failed to connect to Reporting Service  <br/> Make sure " .
                        "that the url ($this->_BaseUrl) and credentials are correct!");
        }   
    

    您会看到“无法连接到报告服务...”的异常一直出现在我和其他人身上。这是无法修复的错误。我可以解释这一点,但现在不是正确的时间。只要让它像下面这样,工作就完成了。

    $context = stream_context_create($stream_conext_params);
    $content = @file_get_contents($executionServiceUrl, false, $context);
    if ($content === FALSE)
    {
        //throw new SSRSReportException("",
          //          "Failed to connect to Reporting Service  <br/> Make sure " .
           //        "that the url ($this->_BaseUrl) and credentials are correct!");
    }
    

    确实有效!这一直对我有用。我希望你也一样。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多