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





Represents a report, which can be previewed, printed or exported.

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

 Syntax

C#  Copy Code

public class Report : FrameworkElement

Visual Basic  Copy Code

Public Class Report
    Inherits FrameworkElement

 Remarks

You can create new reports by instantiating from this class. New pages can be added to the report by creating Page objects and adding them to the report's Pages collection. Items are added to the Report indirectly by adding them to one of the pages contained in the report.

Creating reports in XAML

MindFusion reports can be created declaratively, in XAML. The code of a very simple report is displayed below:

XAML  Copy Code

<r:Report x:Name="myReport">
  <r:Page>
    <r:DataRange Repeat="10" Size="100,20" Background="#f1faff" BorderBrush="Black" BorderThickness="1">
      <r:DataRange.ItemTemplate>
        <DataTemplate>
          <r:ItemContainer>
            <r:Label Size="100,20" Text="Item #[RangeItemCurrent()]" Padding="1" />
          </r:ItemContainer>
        </DataTemplate>
      </r:DataRange.ItemTemplate>
    </r:DataRange>
  </r:Page>
</r:Report>

In the above example the r namespace is declared as follows:

XAML  Copy Code

xmlns:r="http://mindfusion.eu/reporting/wpf"

Running the report

Once the report is initialized, you need to process it by calling its Run method. After the report has been processed it is ready to be used in various scenarios.

The report can be printed or previewed by using a ReportPrinter object. For details, check Printing and Print Previewing.

The report can be displayed in a Window by rendering it using a FixedDocumentRenderTarget and displaying the resulting document using a DocumentViewer.

The report can be exported by implementing the IRenderTarget interface. For more information, check Exporting Reports.

 Inheritance Hierarchy

System.Object
    System.Windows.Threading.DispatcherObject
        System.Windows.DependencyObject
            System.Windows.Media.Visual
                System.Windows.UIElement
                    System.Windows.FrameworkElement
                        MindFusion.Reporting.Wpf.Report

 See Also

Report Members
MindFusion.Reporting.Wpf Namespace