Reporting for WPF - How to Register a Custom Page in the Report Wizard for the End-User Report Designer
This example demonstrates how to extend the Report Wizard in the End-User Report Designer with a custom page that allows you to edit the report page settings. This page is displayed after selecting the report type (for empty and data-bound reports).
To accomplish this task, perform the following steps:
- Create the
Presenter
class as the DevExpress.Data.WizardFramework.WizardPageBase<TView, TModel> class descendant. Implement the logic to pass data between a Model and View, specify the next wizard page type, and define which page buttons should be available. - Declare an interface that identifies the wizard page View.
- Create the
ViewModel
class as the DevExpress.Xpf.DataAccess.DataSourceWizard.WizardPageBase class descendant that implements the interface declared above. This ViewModel class processes data to display it in the User Interface. - Write an XAML template with the
ViewModel
type referenced by aKey
to define the page's visual appearance and layout. The specifiedKey
is used to automatically locate the corresponding template. 5. Create an XtraReportModel class descendant. Add custom fields to store the report page settings and override theEquals
method to take into account the added fields. - Override the existing ChooseReportTypePage to set the next page to your custom one.
- Implement the IWizardCustomizationService interface, which provides four methods for wizard customization. In this implementation, register the previously created
Presenters
,ViewModel
, andModel
, and write the logic to build a report.
- CustomReportModel.cs (VB:CustomReportModel.vb)
- ChoosePageSettingsPage.cs (VB:ChoosePageSettingsPage.vb)
- CustomChooseReportTypePage.cs (VB:CustomChooseReportTypePage.vb)
- WizardCustomizationService.cs (VB:WizardCustomizationService.vb)
(you will be redirected to DevExpress.com to submit your response)