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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Report server authentication

Thread ID:

Created:

Updated:

Platform:

Replies:

140880 Nov 12,2018 11:25 PM UTC Nov 14,2018 12:45 PM UTC PHP 3
loading
Tags: ReportViewer
Ben Becker
Asked On November 12, 2018 11:25 PM UTC

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?

Mahendran Shanmugam [Syncfusion]
Replied On 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. 
 


Ben Becker
Replied On 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?

Mageshyadav M [Syncfusion]
Replied On 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 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;