[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Collapse]Scheduler
   [Expand]Getting Started
   [Expand]Appointments
    Resources
    Reminders
   [Expand]Views
   [Expand]Visual Elements
   [Expand]Styles and Templates
   [Expand]Design-Time Features
    Time Zones
   [Expand]Data Binding
    Grouping
    Selecting
    Navigating
    Printing
    End-User Restrictions
   [Expand]Examples
    Migration Guidelines
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Printing

The WPF Scheduler Suite uses DevExpress Reporting to create a printable scheduler report with the SchedulerControl's data, preview it and print or export it to PDF.

Expanded Overview

To print the SchedulerControl, create a scheduler report template, bind it to the scheduler print adapter and show the resulting document in a Document Preview window. The Document Preview window UI commands enable the end-user to print the document, save it to a PDF or image file.

A scheduler report template is an XtraSchedulerReport class object, which is a XtraReport class descendant, offering many useful features available in XtraReports.

XtraScheduler Reports are created similarly to XtraReports. See the Getting Started with DevExpress Reporting document for more information on reports.

Refer to the How to: Print a Scheduler Using Reports from a Document Preview Window document for instructions on how to create a scheduler report.

Expanded Scheduler Reporting Specifics

The report retrieves scheduler data from the print adapter (SchedulerPrintAdapter object) the SchedulerPrintAdapter.AssignToReport method assigns to it.

The scheduler report requires a print adapter to interact with a scheduler control. A print adapter is the SchedulerPrintAdapter object instance accessible using the SchedulerControl.SchedulerPrintAdapter property. To bind a report to a print adapter, call the SchedulerPrintAdapter.AssignToReport method.

The print adapter composes a data set used in the report and allows you to filter the Scheduler data by providing a set of validation events which can change appointment and resource collections before they are passed to a report, or adjust a report's time interval and work time. For example, you can handle the SchedulerPrintAdapter.ValidateAppointments event to print appointments which meet specific criteria.

The base XtraReport class is a report bands container with report controls placed inside them. Scheduler Reporting adds a set of special controls described in the Scheduler Report Controls and Components document.

Expanded Preview, Print, Export

To preview a report, open it in the Document Preview window. The DocumentPreviewControl enables the end-user to print a report or export it to PDF.

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T581109.

This code snippet contains the PrintScheduler method which performs the following tasks:
  • Instantiate the XtraSchedulerReport descendant. The class can be designed in Visual Studio or loaded from a template.
  • Specify the time interval of the report's scheduler data.
  • Connect the SchedulerPrintAdapter to the report instance.
  • Call the PrintHelper.ShowPrintPreview method to create a document and display it using the built-in document preview window.

Expanded Customization

You can change report elements' appearance and content by handling the TimeCellsControlBase.AppointmentViewInfoCustomizing, TimeCellsControlBase.InitAppointmentDisplayText and TimeCellsControlBase.InitAppointmentImages events and the XtraSchedulerReport controls' CustomDraw* event series.

Expanded Scripting

Advanced users can benefit from scripting - they can write code for specific event handlers in the End-User Report Designer. See the Scripting article for more information.

Expanded See Also

Is this topic helpful?​​​​​​​