Php-SSRS数据源凭证

I'm using a third-party extension in Symfony to connect to SSRS: https://github.com/ChartBlocks/php-ssrs

I need to keep my SSRS datasource as "prompt for credentials" since we are also using another solution that requires that, but I'm unsure how to set the DataSourceCredentials in my solution. I get the error: System.Web.Services.Protocols.SoapException: One or more data source credentials required to run the report have not been specified.

Here's my code in my controller:

$options = [
    'username' => $this->getParameter('ssrs_user'),
    'password' => $this->getParameter('ssrs_password')
];

$ssrs = new SSRS\Report($this->getParameter('ssrs_server'), $options);
$result = $ssrs->loadReport($this->getParameter('ssrs_base').'/'.$request->get('report'));

$ssrs->setSessionId($result->executionInfo->ExecutionID);
$parameters = json_decode($request->get('parameters'),true);
$ssrs->setExecutionParameters(new SSRS\Object\ExecutionParameters($parameters));

$output = $ssrs->render('HTML4.0'); // PDF | XML | CSV | HTML4.0 | Excel
return $output;

Anyone know what I need to add to pass the DataSourceCredentials?

查看全部
dongtuoji5396
dongtuoji5396
2018/07/18 19:17
  • php
  • symfony
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

1个回复