Reporting for Web (ASP.NET MVC, ASP.NET Core and Angular) - How to Customize the DevExpress Report Wizard Customization and Hide Data Source Actions within our Report Designer
For more information on the capabilities outlined in this example (or if you are new to DevExpress Reports), please review the following blog post for important background information: DevExpress Web Report Designer — Custom Report Templates within the Report Wizard, Data Source UI Enhancements (v22.2)
DevExpress Reports ships with an easy-to-use/flexible Report Wizard. You can use the Report Wizard to generate reports yourself or make it available to end users (minimize development costs/maximize productivity). This example will show you how to add a custom report template to the Report Wizard and make modifications to a wizard-generated report. Our sample project includes separate projects for ASP.NET MVC, ASP.NET Core, and Angular client application with an ASP.NET Core backend.
To customize the DevExpress Report Wizard and add new wizard report templates (this example adds Instant Report and Custom Label Report templates to our default template list), you must:
- Implement a descendant of the ReportWizardCustomizationService class and register it as a service.
- Handle the Report Designer
CustomizeWizard
event to register a custom wizard page. (thereportWizardCustomization.js
file contains JavaScript code required for registration).
By customizing our wizard’s default template set, you can address a variety of usage scenarios. To see what’s possible, execute the app, invoke the Report Wizard, and select a custom template included with this demo (Instant Report
and Custom Label Report
).
To hide data source action from our Report Designer’s Field List panel, you must:
- Use the following class: ReportDesignerDataSourceSettings.
Note To help illustrate available options, the Report Designer was configured to hide data source actions. As such, users cannot add, modify, or delete the data source used for this report.
Once you generate a wizard-based report, switch to the Field List panel. Notice that data source actions have been hidden (via ReportDesignerDataSourceSettings).
- ASP.NET MVC: Global.asax.cs
- ASP.NET Core: Startup.cs
- ASP.NET MVC: Designer.cshtml
- ASP.NET Core: Designer.cshtml
- Angular: report-designer.html andreport-designer.ts
- reportWizardCustomization.js
- LabelReport.cs
- ASP.NET MVC: Designer.cshtml
- ASP.NET Core: HomeController.cs
- Angular: report-designer.html
- ReportWizardCustomizationService
- ReportDesignerDataSourceSettings
- Customize the Report/Data Source Wizard (ASP.NET MVC)
- Customize the Report Wizard and Data Source Wizard (ASP.NET Core)
(you will be redirected to DevExpress.com to submit your response)