Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Collapse]Scheduler
   [Expand]Product Information
   [Expand]Getting Started
   [Expand]Fundamentals
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Collapse]Examples
    [Expand]Appearance
    [Expand]Data Binding
    [Expand]Data Exchange
    [Expand]DateTime
    [Expand]DateNavigator
    [Expand]Forms
    [Expand]Gantt View
    [Expand]Initialization
    [Expand]Labels and Statuses
    [Expand]Layout
    [Expand]Menu
    [Collapse]Printing and Reporting
      How to: Print a Scheduler and Show its Print Preview
      How to: Modify the Print Style and Hide the Mini-calendar from the Page Header
      How to: Export a Scheduler in PDF format
      How to: Print a Scheduler Using a Report Preview (Step-by-Step Guide)
      How to: Create an XtraSchedulerReport at Runtime
      How to: Create a Report without Visible Scheduler Control
    [Expand]Protection
    [Expand]Range Control
    [Expand]Recurrence
    [Expand]Reminders
    [Expand]Selection
   [Expand]End-User Capabilities
   [Expand]Member Tables
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Create a Report without Visible Scheduler Control

Sometimes, all you need to do is print the schedules based on the data obtained from a data source. In this case, the visible form containing the Scheduler control and the editing capability provided by the Report Designer are unnecessary. Suppose your application works on the server and the end-user can only specify the report's template and the time interval.

To accomplish this task the stand-alone SchedulerStorage is created. It is bound to data, and can play the role of the data source for the report's print adapter.

A new XtraSchedulerReport object is created. The ready-made report layout is already available. It is contained in the report template which has been constructed using the Report Designer. Use the XtraReport.LoadLayout method to load the report's template and the SchedulerControlPrintAdapter.SetSourceObject method to specify the previously created SchedulerStorage as the data source for the report.

The SchedulerPrintAdapter.TimeInterval, SchedulerPrintAdapter.FirstDayOfWeek, XtraSchedulerReport.PrintColorSchema and other options can be used to customize the report. For advanced customizations, a set of Validate* events, such as the SchedulerPrintAdapter.ValidateAppointments, SchedulerPrintAdapter.ValidateResources, SchedulerPrintAdapter.ValidateTimeIntervals, or SchedulerPrintAdapter.ValidateWorkTime can be helpful. For example, use the ValidateAppointments event to filter appointments and display only recurring ones.

The following code illustrates the technique described above:

Show Me

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

Expanded See Also

How would you rate this topic?​​​​​​​