Skip to main content

Printing via Reports

  • 3 minutes to read

This document describes a technique of creating an XtraSchedulerReport which can be used to compose a printable document, based on the Scheduler information, or representing one of the Scheduler views.

This approach is aimed at providing extreme flexibility in constructing print styles for the Scheduler data. It utilizes the XtraReports Suite to create a report containing controls specially designed to represent Scheduler entities. This report is an object of the XtraSchedulerReport class, which is a descendant of the XtraReport class, offering many useful features available in XtraReports.

The report retrieves scheduler data via the print adapter. The main purpose of the print adapter is to compose a data set used in the report. In order to filter the Scheduler data, the print adapter provides a set of validation events. There are two print adapter types - the SchedulerStoragePrintAdapter and SchedulerControlPrintAdapter. For example, you can handle the SchedulerPrintAdapter.ValidateAppointments event, to print appointments which meet specific criteria.

The next level of data representation is the report view. It is like the view which exists in the Scheduler, so there are ReportDayView, ReportWeekView and ReportTimelineView components.

The report is a container for report bands with report controls placed inside them. The following picture illustrates the Scheduler Reporting Toolbox.

ReportToolbox

To render scheduling data, two distinct control sets are implemented. The most important set consists of controls representing time cells with appointments. They are listed below:

The auxiliary controls form the following groups:

These controls should be placed in the DetailBand of the report, and are similar to the XtraReport controls, although they have their own peculiarities. A control is linked to a particular View, and some controls are linked to each other, as well.

The basics of building the XtraScheduler Report is essentially the same as for XtraReports. We suggest that you review the XtraReports documentation, e.g. the Introduction to Banded Reports document, to become familiar with reports, if you haven’t already done so.

The customization features available for the XtraScheduler are implemented for the reports. The Formatting Services affect XtraScheduler Reporting. Advanced customizations are possible via the TimeCellsControlBase.AppointmentViewInfoCustomizing, TimeCellsControlBase.InitAppointmentDisplayText, TimeCellsControlBase.InitAppointmentImages events and the CustomDraw* event series of XtraSchedulerReport controls.

Note

If you use NuGet packages, add the DevExpress.Win.SchedulerReporting package to use the reporting functionality in Scheduler.