To view a report that is stored on a report service, you need to configure your MVC application. Complete the following steps to add view page to your application. For more information about using Report Viewer, see Using C1 ReportViewer Template.
Index.cshtml |
Copy Code
|
---|---|
<head> <title>C1 MVC ReportViewer</title> <c1-styles /> <c1-scripts> <c1-flex-viewer-scripts /></c1-scripts> </head> <body> <c1-report-viewer file-path="ReportsRoot/FlexCommonTasks/FlexCommonTasks.flxr" report-name="Simple List" service-url="https://demos.componentone.com/ASPNET/c1webapi/4.0.20171.91/api/report"></c1-report-viewer> </body> |
<DataSources>
<DataSource>
<Name>Main</Name>
<DataProvider>OLEDB</DataProvider>
<ConnectionString>Provider=SQLNCLI11;Integrated Security=SSPI;
Data Source=(localdb)\\v11.0;Initial File Name=|DataDirectory|\\C1Demo.mdf;Persist Security Info=False
</ConnectionString>
<RecordSource>Employees</RecordSource>
</DataSource>
</DataSources>