SchedulerReportConfigurator.Configure(ISchedulerPrintingSettings) Method

Configures a report provided by the specified object.

Namespace: DevExpress.Xpf.Scheduler.Reporting

Assembly: DevExpress.Xpf.Scheduler.v20.1.dll


public virtual void Configure(
    ISchedulerPrintingSettings settings
Public Overridable Sub Configure(
    settings As ISchedulerPrintingSettings


Name Type Description
settings ISchedulerPrintingSettings

An object that implements the ISchedulerPrintingSettings interface.



You are viewing documentation for the legacy WPF Scheduler control. If you're starting a new project, we strongly recommend that you use a new control declared in the DevExpress.Xpf.Scheduling namespace. If you decide to upgrade an existing project in order to switch to the updated scheduler control, see the Migration Guidelines document.

The Configure method configures the scheduler report specified by the ISchedulerPrintingSettings.ReportInstance property of the passed object. This object's SchedulerPrintingSettings.ReportTemplatePath and BaseSchedulerPrintingSettings.SchedulerPrintAdapter properties are used to set the scheduler report layout template and print adapter. After a scheduler report has been configured, it can be passed to the PrintHelper.ShowPrintPreview or PrintHelper.ShowPrintPreviewDialog method to show the scheduler print preview.


This example demonstrates how to invoke the Print Preview dialog for SchedulerControl via the PrintHelper.ShowPrintPreviewDialog method.

  1. Drop the SchedulerControl item onto the form from the DX.20.1.WPF: Scheduling toolbox tab. Bind the scheduler to data.
  2. Drop the DXSchedulerControlPrintAdapter print adapter onto the form from the DX.20.1.WPF: Scheduling toolbox tab. Set its DXSchedulerControlPrintAdapter.SchedulerControl property to the previously created SchedulerControl instance as the data source for the print adapter.
  3. Set the DXSchedulerPrintAdapter.TimeInterval and DXSchedulerPrintAdapter.FirstDayOfWeek properties of the created print adapter.
  4. Create an instance of the SchedulerPrintingSettings class. Specify its BaseSchedulerPrintingSettings.ReportInstance, BaseSchedulerPrintingSettings.SchedulerPrintAdapter and SchedulerPrintingSettings.ReportTemplatePath properties.
  5. Add the Button button onto the form. On its Click event handler, create the SchedulerReportConfigurator class instance and call its SchedulerReportConfigurator.Configure method with the previously specified SchedulerPrintingSettings object passed as a parameter. This will configure the scheduler report (BaseSchedulerPrintingSettings.ReportInstance) by setting its report template and scheduler print adapter to the SchedulerPrintingSettings.ReportTemplatePath and BaseSchedulerPrintingSettings.SchedulerPrintAdapter values respectively.

    Finally, call the PrintHelper.ShowPrintPreviewDialog method with the dialog owner and configured BaseSchedulerPrintingSettings.ReportInstance scheduler report passed as parameters.


To print and preview the SchedulerControl, you need to manually add references to the following libraries:

  • DevExpress.Charts.v20.1.Core
  • DevExpress.PivotGrid.v20.1.Core
  • DevExpress.Sparkline.v20.1.Core
  • DevExpress.XtraCharts.v20.1
  • DevExpress.XtraReports.v20.1
  • DevExpress.XtraScheduler.v20.1
  • DevExpress.XtraScheduler.Reporting.v20.1

Normally, when adding references to these assemblies, you should choose them from the Global Assembly Cache (GAC). However, if you prefer to copy them locally, or need to include them later into your product's installation, you can find copies of them in the following directory:

C:\Program Files (x86)\DevExpress 20.1\Components\Bin\Framework\

To determine assemblies required to deploy the application, use the Assembly Deployment Tool.

using System;
using System.Windows;
using DevExpress.Xpf.Printing;
using DevExpress.XtraScheduler;
using DevExpress.XtraScheduler.Reporting;
using DevExpress.Xpf.Scheduler.Reporting;

namespace SchedulerPrintPreviewSample {
    public partial class MainWindow : Window {

        SchedulerPrintingSettings printingSettings = new SchedulerPrintingSettings();

        public MainWindow() {

            // Bind the scheduler to data.
            CarsDBDataSet dataSet = new CarsDBDataSet();

            scheduler.Storage.AppointmentStorage.DataSource = dataSet.CarScheduling;
            CarsDBDataSetTableAdapters.CarSchedulingTableAdapter tableAdapter = 
                                            new CarsDBDataSetTableAdapters.CarSchedulingTableAdapter();

            scheduler.Storage.ResourceStorage.DataSource = dataSet.Cars;
            CarsDBDataSetTableAdapters.CarsTableAdapter carsAdapter = 
                                            new CarsDBDataSetTableAdapters.CarsTableAdapter();

            // Set the scheduler start date.
            scheduler.Start = new System.DateTime(2010, 7, 15, 0, 0, 0, 0);

            // Specify the time inteval and start day of week used by the print adapter to create a report.
            printAdapter.TimeInterval =
                                new TimeInterval(new DateTime(2010, 7, 15), new DateTime(2010, 7, 30));
            printAdapter.FirstDayOfWeek = FirstDayOfWeek.Wednesday;

            // Specify required printing settings to be passed 
            // to the SchedulerPrintHelper.ShowPrintPreview method that is called on a button click.
            printingSettings.ReportInstance = new XtraSchedulerReport();
            printingSettings.SchedulerPrintAdapter = printAdapter;
            printingSettings.ReportTemplatePath = "WeeklyStyle.schrepx";


        private void bthPreview_Click(object sender, RoutedEventArgs e) {
            // Preview the report.
            SchedulerReportConfigurator configurator = new SchedulerReportConfigurator();
            PrintHelper.ShowPrintPreviewDialog(this, printingSettings.ReportInstance);
See Also