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

Does the report viewer support subreports with SSRS?

Hi,

I have the Report Viewer working with SSRS (where reports are hosted in SSRS and are not local .rdl files).

Now I want to use subreports, but I do not see an example anywhere for subreports with SSRS - do you support this?

I have seen the forum posts where an MVC code example loads a subreport file into a stream from a local .rdlc file, but I am using SSRS and all reports are hosted there - there are no local files.


Could you provide some sample code please, or direct me to an example somewhere.


Thanks

Paul


3 Replies 1 reply marked as answer

AM Arumugasami Murugesan Syncfusion Team December 12, 2022 02:50 PM UTC

Hi Paul,


Thanks for contacting Bold Reports support.


Yes, Bold Reports Report Viewer supports the sub reports with SSRS. You have to provide the main report name and ReportServerUrl as shown in the below code snippet. We have prepared and attached the sample application for your reference.

[NonAction]

public void OnInitReportOptions(ReportViewerOptions reportOption)

 {

  reportOption.ReportModel.ReportServerUrl = http://synclapn-24026/ReportServer/;            

  reportOption.ReportModel.ReportPath = "/report/mainreport"; //your main report name

 }


Regards,

Arumugasami M


Attachment: BlazorReportViewer_30a7823c.zip

Marked as answer

PA Paul December 13, 2022 01:23 AM UTC

Ok, thank you.

From my limited testing it appears that subreports work without having to write any special code for them; for example, just setting the data credentials in the main report seems to propagate down to the subreports, so no other code needs to be written I think.


Thanks.

Paul



AM Arumugasami Murugesan Syncfusion Team December 13, 2022 06:45 AM UTC

Paul,


Yes, subreports will work without having to write any other code. So, you can just provide the data credentials in the main report name to propagate down to the subreports.


Loader.
Live Chat Icon For mobile
Up arrow icon