MindFusion.Wpf Pack Programmer's Guide
Report Class
Remarks See Also
 





Provides methods to generate, preview and print reports of Schedule objects.

Namespace: MindFusion.Scheduling.Reporting
Assembly: MindFusion.Scheduling.Wpf.Reporting

 Syntax

C#  Copy Code

public class Report : IDocumentPaginatorSource

Visual Basic  Copy Code

Public Class Report
    Implements IDocumentPaginatorSource

 Remarks

In order to create reports, you need to instantiate an object from this class. Then you need to specify the columns to display in the report by invoking the CreateColumn method and setting the appropriate properties of the returned ReportColumn object. Finally, you need to invoke the Print or PrintPreview methods of the Report object in order to print or preview the report accordingly.

For additional information, check Creating and Printing Reports.

 Note

The Excel export relies on the Ionic.Zip library, which is based on JZlib. The following copyright noticecopyright noticeReport is used.

 Example

The following example demonstrates how to create a simple report, containing three columns. The columns display the appointment's HeaderText, StartTime and EndTime values respectively and are sorted by the StartTime of the appointments. The example assumes that calendar is a variable identifying existing Calendar control.

C#  Copy Code

Report report = new Report(calendar.Schedule);

ReportColumn headerTextColumn = report.CreateColumn();
headerTextColumn.Property = "HeaderText";
headerTextColumn.Width = 100;

ReportColumn startTimeColumn = report.CreateColumn();
startTimeColumn.Property = "StartTime";
startTimeColumn.Sort = Sort.Ascending;
startTimeColumn.Width = 50;

ReportColumn endTimeColumn = report.CreateColumn();
endTimeColumn.Property = "EndTime";
endTimeColumn.Width = 50;

report.Print(DateTime.MinValue, DateTime.MaxValue);

Visual Basic  Copy Code

Dim report As New Report(calendar.Schedule)

Dim headerTextColumn As ReportColumn = report.CreateColumn()
headerTextColumn.Property = "HeaderText"
headerTextColumn.Width = 100

Dim startTimeColumn As ReportColumn = report.CreateColumn()
startTimeColumn.Property = "StartTime"
startTimeColumn.Sort = Sort.Ascending
startTimeColumn.Width = 50

Dim endTimeColumn As ReportColumn = report.CreateColumn()
endTimeColumn.Property = "EndTime"
endTimeColumn.Width = 50

report.Print(DateTime.MinValue, DateTime.MaxValue)

 Inheritance Hierarchy

System.Object
    MindFusion.Scheduling.Reporting.Report

 See Also

Report Members
MindFusion.Scheduling.Reporting Namespace