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
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
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
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.