You can configure the ActiveReports service locally in an ASP.NET Core MVC application to view ActiveReports in FlexViewer. To view ActiveReports in the FlexViewer control using the ActiveReports Web Service, follow the steps given below.
Note: Make sure that the latest version of ActiveReports is installed on your system, before implementing the steps mentioned below. In our case, we are using ActiveReports 13.
C1.AspNetCore.Mvc.FlexViewer
NuGet package and the following TagHelper in the _ViewImports.cshtml file.
@addTagHelper *, C1.AspNetCore.Mvc
@addTagHelper *, C1.AspNetCore.Mvc.FlexViewer
C1.Web.Mvc.FlexViewer.dll
reference and the following markup in <namespace></namespace> tags below C1.Web.Mvc
markup.
<add namespace="C1.Web.Mvc.Viewer" />
<add namespace="C1.Web.Mvc.Viewer.Fluent" />
C# |
Copy Code
|
---|---|
routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.IgnoreRoute("{*allActiveReport}", new { allActiveReport = @".*\.ar12(/.*)?" }); |
C# |
Copy Code
|
---|---|
<ActiveReports13> <WebService reportsFolder="~/Reports" assemblyFolder="~/" /> </ActiveReports13> |
Index.cshtml |
Copy Code
|
---|---|
@(Html.C1().ReportViewer() .ServiceUrl(@"~/ActiveReports.ReportService.asmx") .FilePath("BillingInvoice.rdlx")) |
Index.cshtml |
Copy Code
|
---|---|
<c1-report-viewer file-path="BillingInvoice.rdlx" service-url=@"~/ActiveReports.ReportService.asmx"> </c1-report-viewer> |