We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon
Starting in 2019, the Reporting control is no longer included in Essential Studio. If you're experiencing issues with the Syncfusion Reporting Platform, Report Viewer, Report Designer, or Report Writer, we recommend migrating to Bold Reports, our dedicated reporting platform.

Bold Reports offers a comprehensive suite of tools and features for all your reporting needs, and we will help you make a smooth transition from the discontinued control. Our support team at https://support.boldreports.com/ is here to assist you with any questions or difficulties you may encounter during the migration process.

We thank you for choosing Syncfusion and appreciate your understanding.

Report server authentication

I am toying with connecting the PHP ReportViewer to render reports on an SSRS report server.  I am not having much luck getting my simple test report to render because I keep getting unauthorized or not found error messages.  I wonder how you provide authentication to the report server web service, did I miss this in the documentation?

3 Replies

MS Mahendran Shanmugam Syncfusion Team November 13, 2018 12:53 PM UTC

Hi Ben, 

Thanks for your interest in our Syncfusion products.  

In our online PHP documentation contains only specifying the ReportPath and ReportServerUrl for rendering the SSRS Server report. But we need to specify the Credentials for SSRS Report server url. We have missed how to specify the SSRS server credentials in our PHP documentation, we will update our documentation as soon as possible. Please find the below link for how to specify the SSRS server credentials in Controller side. 
 
In our online documentation we were used the online service API for reportServiceUrl to rendering the report in PHP as shown in below code example. 
<?php $reportviewer = new EJ\ReportViewer('territorysales_reportViewer'); echo $reportviewer->reportServiceUrl("http://js.syncfusion.com/ejservices/api/ReportViewer" )->processingMode("Remote")->reportServerUrl("http://mvc.syncfusion.com/reportserver")->reportPath("/SSRSSamples2/Territory Sales new")->render(); ? 

So please run the local service API sample and provide the Service API link as shown in below code example. 
Viewer.php: 
    <div class="cols-sample-area"> 
        <?php 
        $reportviewer = new EJ\ReportViewer('groupingaggregate_reportViewer');                    
        echo $reportviewer->reportServiceUrl("http://localhost:62610/api/ReportApi" )->processingMode("Remote")->reportPath("GroupingAgg.rdl")-> 
                             reportServerUrl("http://syncdeskn6533/ReportServer")->reportPath("/HyperLink")->render(); 
        ?> 
    </div> 

We can able to pass the local reportServiceUrl to rendering the reports from SSRS server with server credentials as shown in below snap. 
ReportApiController.cs 
       public void OnInitReportOptions(ReportViewerOptions reportOption) 
        { 
            //provide the SSRS server login credentials as shown in below line 
            reportOption.ReportModel.ReportServerCredential = new System.Net.NetworkCredential("ssrs", "RDLReport1"); 
 
            //if datasource is shared datasource then please provide datasource credentials as shown in below line 
            reportOption.ReportModel.DataSourceCredentials.Add(new DataSourceCredentials("AdventureWorks", "ssrs1", "RDLReport1")); 
        } 

We have prepared the local service API sample for your reference and it can be downloaded from below location. 

Note: In our service sample we have used our local SSRS server credentials so can you please replace your SSRS credentials. 

Regards, 
Mahendran S. 
 



BB Ben Becker November 13, 2018 01:04 PM UTC

Thank you for the response, this is helpful.  The piece that was not clear in your documentation was that the report server API had to be there.  I was thinking this reportviewer would be able to talk to the SSRS report server without having to have another API running but this makes sense now the way it is configured.  I guess the question I have now is if it is required that the report server API has to have connectivity to the SSRS report server, e.g. be on the same domain or have ability to connect to it?  What I'm getting at is let's say the report server API was on in the cloud and the report server was on a local intranet not accessible to the report server API, this will not work correct?  The report server API has to have connectivity to the SSRS report server correct?


MM Mageshyadav M Syncfusion Team November 14, 2018 12:45 PM UTC

Hi Ben, 
 
What I'm getting at is let's say the report server API was on in the cloud and the report server was on a local intranet not accessible to the report server API, this will not work correct?  The report server API has to have connectivity to the SSRS report server correct? 
Yes, your assumption is correct, We need service API to have connectivity with the SSRS report server to get the report. 
 
 
Regards, 
Mageshyadav.M 


Loader.
Live Chat Icon For mobile
Up arrow icon