Closed anchovy closed 8 years ago
Used the following to overcome this issue:
$ssrs = new \SSRS\Report(env('SSRS_ADDRESS'), array('username' => env('SSRS_USER'), 'password' => env('SSRS_PASSWORD')));
$result = $ssrs->loadReport(env('SSRS_REPORT'));
$ssrs->setSessionId($result->data['ExecutionID']);
$reportParameters = array(
'param_1' => '1'
,'param_2'=> '1'
);
$parameters = $ssrs->setExecutionParameters($reportParameters);
$output = $ssrs->render('HTML4.0'); // PDF | XML | CSV
echo $output;
i got message Call to undefined function env()
Hi @widiramadhan, you would need to install a library to extract your environment variables to use this example. You could try https://packagist.org/packages/rb-cohen/php-env if you aren't using a framework.
Alternatively, just replace the env() bits in the example above for your actual values.
Hi
I've managed to connect to our remote reports server - but specifying parameters is throwing the following error:
FatalErrorException in tempRoutesController.php - Class 'App\Http\Controllers\SSRS_Object_ExecutionParameters' not found"
Current code is:
`
`
Searching through the library - I can't see any class named SSRS_Object_ExecutionParameters, any ideas where I'm going wrong?
Regards Ben