Current filter:
                                You should refresh the page.
                                  • Hello,

                                    here  is described how to set the PaperKind property of new created reports. But in the meantime this does not work anymore: the PaperKind property is set from the settings on wizard page (see attachment).

                                    How can I access those wizard page to customize the page settings?


                                1 Solution

                                Creation Date Importance Sort by

                                Hello Olaf,

                                Values specified for the XtraReport instance are overridden by parameters from the wizard. The Report Wizard supports changing its parameters through the IWizardCustomizationService interface: Customize the Report Wizard's Pages. In XAF, the easiest way to use this solution is to create a descendant of our IWizardCustomizationService implementor - XafReportWizardCustomizationService. Override the required methods and return this descendant in the WinReportServiceController.CreateWizardCustomizationService method. Here is an example:

                                using DevExpress.DataAccess.UI.Wizard; using DevExpress.ExpressApp; using DevExpress.ExpressApp.ReportsV2; using DevExpress.ExpressApp.ReportsV2.Win; using DevExpress.XtraReports.Wizards; using System.ComponentModel.Design; namespace MainDemo.Module.Win { public class MyXafReportWizardCustomizationService : XafReportWizardCustomizationService { INewReportWizardParameters wizardParameters; public MyXafReportWizardCustomizationService(IDesignerHost host, INewReportWizardParameters wizardParameters, IObjectSpace objectSpace, XafApplication application) : base(host, wizardParameters, objectSpace, application) { } public override void CustomizeReportWizard(IWizardCustomization<XtraReportModel> tool) { base.CustomizeReportWizard(tool); tool.Model.PaperKind = System.Drawing.Printing.PaperKind.A2; } } public class MyReportServiceController : WinReportServiceController { protected override XafReportWizardCustomizationService CreateWizardCustomizationService(IDesignerHost host, INewReportWizardParameters wizardParameters, IObjectSpace objectSpace) { return new MyXafReportWizardCustomizationService(host, wizardParameters, objectSpace, Application); } } }

                                Please do not hesitate to contact us if you need further assistance.