SSRS SDK是否支持SQL Server 2008(我的意思是非快递版)?

时间:2012-04-30 10:06:39

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

我参与部署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();
}?>   

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

3 个答案:

答案 0 :(得分:1)

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

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

reference

答案 1 :(得分:0)

可能会发生一些事情。

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

答案 2 :(得分:0)

发现在企业版中使用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!");
    }   

您看到“无法连接到Reporting Service ...”的例外,对我和其他人来说也是一直出现的。这是无法修复的错误。我可以解释一下,但现在不是时候。让它像下面这样,完成工作。

$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!");
}

真有效!这一直在为我工作。我希望你也能这样做。