Hello,
We are trying to add a subreport to a cell in a table. When we click on the three horizontal dots there is an error saying it could not access server reports.
We are using an angular/asp.net core project, is this possible? We'd like to either load an RDL file from a network location or a database
Hi August,
Thanks for contacting Bold Reports supports.
We have validated your reported issue. If you not connected our Bold
Reports server in your application you get this issue in your application.
So, you have to connect server in embedded application.
https://help.boldreports.com/embedded-reporting/angular-reporting/report-designer/server-integration/
We can achieve your requirement in alternative way by adding external server in application itself. We have attached the sample application for your reference. Could you please check and share the details.
Sample details:
|
ExternalReportServer.cs file act as a External Server in your application.
In GetReport method. You can write
your own condition for getting file from your preferred location.
|
Regards,
Manoranjan R
Hi Manoranjan,
We don't want to use the report server, we are using the report service. What are our options with the report service and NOT report server?
Thank you
Hi August,
Thanks for the update.
We have already provided the alternate solution for your requirement and attached the sample application for your reference. Could you please check the attached sample? If you have any queries on that sample. Please create the ticket on the below site. We will schedule a web meeting for your issues.
https://support.boldreports.com/support/tickets/create
Regards,
Manoranjan R
Hi Manoranjan,
My mistake, I looked at your provided solution and the external server does help. However, the GetReport function is never called somehow. I added some content in OnInitReportOptions and OnReportLoaded, which works to get all the reports from the server when clicking on the subreports.
However, when I am previewing the report it says there was an error and the subreport cannot be found. Do you have any ideas?
Hi August,
Thanks for the update.
We suspect the external server was not configured correctly in your application. Please ensure whether you register the below code are added in Report designer controller and Report viewer controller.
Report designer controller:
public ReportDesignerController(Microsoft.Extensions.Caching.Memory.IMemoryCache memoryCache, Microsoft.AspNetCore.Hosting.IWebHostEnvironment hostingEnvironment) { _cache = memoryCache; _hostingEnvironment = hostingEnvironment; ExternalServer externalServer = new ExternalServer(_hostingEnvironment);
this.Server = externalServer; this.ServerURL = "<dummy>"; this.ReportServerCredential = new System.Net.NetworkCredential("dummy", "dummy"); } |
Report Viewer controller:
public ReportViewerController(Microsoft.Extensions.Caching.Memory.IMemoryCache memoryCache, Microsoft.AspNetCore.Hosting.IWebHostEnvironment hostingEnvironment) { _cache = memoryCache; _hostingEnvironment = hostingEnvironment;
ExternalServer externalServer = new ExternalServer(_hostingEnvironment);
this.Server = externalServer; this.ServerURL = "<dummy>"; this.ReportServerCredential = new System.Net.NetworkCredential("dummy", "dummy"); }
public void OnInitReportOptions(ReportViewerOptions reportOption) { reportOption.ReportModel.ReportServerUrl = this.ServerURL; reportOption.ReportModel.ReportServerCredential = this.ReportServerCredential; } |
Could you please confirm whether you reported the issue and the GetReport function not called issue are occurs in our attached sample?
If you have any queries on that sample. Please create the ticket on the below site. We will schedule a web meeting for your issues.
https://support.boldreports.com/support/tickets/create
Regards,
Manoranjan R