If you became a customer of the Syncfusion� Reporting Platform or the Report Viewer, Report Designer, or Report Writer components before October 2019 and have questions related to those products, you can request support through our forum system. However, please note that this support system is only for existing customers who are still using the Syncfusion� Reporting Platform or its components and not for new customers looking for reporting products from Syncfusion�.

For new customers or those with general reporting questions, we recommend contacting our support team at https://support.boldreports.com/, which is a separate brand created by Syncfusion� for its reporting solutions. Our team will be happy to assist you with any questions you may have.

Thank you for choosing Syncfusion� for your reporting needs.

Bold Reports - load ssrs report from remote server

Hi,


 I am trying to load SSRS report from report server to div.. I changed code in ReportController like this

public void OnInitReportOptions(ReportViewerOptions reportOption)

        {

            reportOption.ReportModel.ReportServerUrl = @"http://192.168.10.36:5001/Reports_SSRS";

            reportOption.ReportModel.ProcessingMode = ProcessingMode.Remote;

            reportOption.ReportModel.ReportServerCredential = new              System.Net.NetworkCredential("MSSQLSERVER/user1", "password!");

            string basePath = _hostingEnvironment.WebRootPath;

            // Here, we have loaded the sales-order-detail.rdl report from the application folder wwwroot\Resources. sales-order-detail.rdl should be in the wwwroot\Resources application folder.

            System.IO.FileStream inputStream = new System.IO.FileStream(reportOption.ReportModel.ReportServerUrl + reportOption.ReportModel.ReportPath + ".rdl", System.IO.FileMode.Open, System.IO.FileAccess.Read);

            MemoryStream reportStream = new MemoryStream();

            inputStream.CopyTo(reportStream);

            reportStream.Position = 0;

            inputStream.Close();

            reportOption.ReportModel.Stream = reportStream;

        }


// This code in razor component

<div id="report-viewer" style="width: 100%;height:800px" />

 public async void RenderReportViewer()

    {

        viewerOptions.ReportName = "/ARMS_Reports/truck_report";

        viewerOptions.ServiceURL = "/api/BoldReportsAPI";

        BoldReports.Web.ReportParameter par1 = new (){Name = "branch",Values = new List<string>(){"CBE"}};

        BoldReports.Web.ReportParameter par2 = new (){Name = "br",Values = new List<string>(){"1"}};

        BoldReports.Web.ReportParameter par3 = new (){Name = "ason",Values = new List<string>(){"20220810"}};

        BoldReports.Web.ReportParameter par4 = new (){Name = "ev",Values = new List<string>(){"1"}};

        viewerOptions.Parameters = new[] { par1, par2, par3, par4 };


        await JSRuntime.InvokeVoidAsync("BoldReports.RenderViewer", "report-viewer", viewerOptions);

    }

But an error hit at here     System.IO.FileStream inputStream = new System.IO.FileStream(reportOption.ReportModel.ReportServerUrl + reportOption.ReportModel.ReportPath + ".rdl", System.IO.FileMode.Open, System.IO.FileAccess.Read);

Error : System.IO.IOException: 'The filename, directory name, or volume label syntax is incorrect. : 'C:\Users\RIJASMK\source\repos\ARMS.v2\Views\http:\192.168.10.25:4456\Reports_SSRS.


How to load SSRS report from remote server.


Thank you




3 Replies 1 reply marked as answer

MR Manoranjan Rajendran Syncfusion Team September 19, 2022 02:42 AM UTC

Hi Rijas,


Thanks for contacting Bold Reports support.

 

You don't need to provide the report stream. You have to provide the server URL and report path to load the report from your SSRS. Please refer to the below documentation.

https://help.boldreports.com/embedded-reporting/aspnet-core-reporting/report-viewer/ssrs-report/ 


We have attached the sample for your reference. Please check this sample with your server URL.




Regards,

Manoranjan R




Attachment: ASP.NET_Core_Report_Viewer_b0b4b03.zip


RI Rijas September 22, 2022 07:00 AM UTC

Thank you for the reply sir, I tried to run the sample project you provided . But it throws an error. Failed to retrieve the report 'New-Kyle_EmployeeList' stream from the provided server details 'http://synclapn-18443/reports'

I changed the server name and report path . But  I get same error  with my report server name.



MR Manoranjan Rajendran Syncfusion Team September 22, 2022 08:49 AM UTC

Hi Rijas,


Thanks for the update.


Please ensure whether you have provided the below permission to access the SSRS server and ensure that you have provided the correct credentials details to access the report server ?
https://help.boldreports.com/embedded-reporting/faq/ssrs-enable-permission/



We have prepared the test sample to check the issue. Could you please add your report server credentials details in the attached sample and share the details?

Sample Details:

Add your server credentials in the Homecontroller.cs file.

  NetworkCredential reportServerCredential = new System.Net.NetworkCredential("User name", "password");

            string reportPath = "<<Report path>>";

            string reportServerURL = "<<Report server URL>>";



Regards,

Manoranjan R


Attachment: SSRSTestApp_New_a49a9384.zip

Marked as answer
Loader.
Up arrow icon