Skip to main content

BaseSchedulerPrintingSettings.ReportInstance Property

Gets or sets a report to preview and print scheduler information.

Namespace: DevExpress.Xpf.Scheduler.Reporting

Assembly: DevExpress.Xpf.Scheduler.v22.2.dll

NuGet Package: DevExpress.Wpf.Scheduler


public ISchedulerReport ReportInstance { get; set; }

Property Value

Type Description

A report object that implements the ISchedulerReport 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.

To specify a print adapter and layout template for the ReportInstance scheduler report, configure it by calling the SchedulerReportConfigurator.Configure method. After the report has been configured, pass it to the PrintHelper.ShowPrintPreview or PrintHelper.ShowPrintPreviewDialog method to show scheduler 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.22.2.WPF: Scheduling toolbox tab. Bind the scheduler to data.
  2. Drop the DXSchedulerControlPrintAdapter print adapter onto the form from the DX.22.2.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.v22.2.Core
  • DevExpress.PivotGrid.v22.2.Core
  • DevExpress.Sparkline.v22.2.Core
  • DevExpress.XtraCharts.v22.2
  • DevExpress.XtraReports.v22.2
  • DevExpress.XtraScheduler.v22.2
  • DevExpress.XtraScheduler.Reporting.v22.2

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\DevExpress 22.2\Components\Bin\Framework\

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

View Example

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);

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ReportInstance property.


The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.


See Also