Files to look at:
- HomeController.cs (VB: HomeController.vb)
- Category.cs (VB: Category.vb)
- DataHelper.cs (VB: DataHelper.vb)
- Index.cshtml
- ReportProvider.cs (VB: ReportProvider.vb)
This example illustrates how to create a DevExpress Report in code and preview it on a web page in an ASP.NET MVC application.
To create a report at runtime, create a report instance and add report bands and report controls. Specify expression bindings for report controls. Bind the report to data.
Use the Web Document Viewer to preview a report on a web page. In this example, the viewer uses IReportProvider to load a report by its name. The name of a report is passed to the Bind method of WebDocumentViewerExtension. You can also bind the viewer to a report instance, a model, or the report associated with the specified CachedReportSourceWeb object. For more information, see WebDocumentViewerExtension.Bind method overloads.