All Projects → maximcus → Simplewpfreporting

maximcus / Simplewpfreporting

Licence: mit
Reporting in WPF (XAML) made easy

Projects that are alternatives of or similar to Simplewpfreporting

Adaptivecards
A new way for developers to exchange card content in a common and consistent way.
Stars: ✭ 950 (+991.95%)
Mutual labels:  wpf, xaml
Xamlviewer
XAML Viewer is a lightweight XAML editor.
Stars: ✭ 87 (+0%)
Mutual labels:  wpf, xaml
Mahapps.metro
A framework that allows developers to cobble together a better UI for their own WPF applications with minimal effort.
Stars: ✭ 8,023 (+9121.84%)
Mutual labels:  wpf, xaml
Reactivehistory
Reactive undo/redo framework for .NET.
Stars: ✭ 82 (-5.75%)
Mutual labels:  wpf, xaml
Xamarin Forms Gtk Movies Sample
The Movie DB Xamarin.Forms Sample
Stars: ✭ 83 (-4.6%)
Mutual labels:  wpf, xaml
Adonis Ui
Lightweight UI toolkit for WPF applications offering classic but enhanced windows visuals
Stars: ✭ 878 (+909.2%)
Mutual labels:  wpf, xaml
Thinreports Php
An implementation of the Thinreports Generator in PHP. It provides easy and simple way for generating a PDF on pure PHP.
Stars: ✭ 51 (-41.38%)
Mutual labels:  reporting, pdf
Pagedown
Paginate the HTML Output of R Markdown with CSS for Print
Stars: ✭ 619 (+611.49%)
Mutual labels:  pdf, printing
Wpfbindingerrors
💥 Turn WPF Binding errors into exception
Stars: ✭ 73 (-16.09%)
Mutual labels:  wpf, xaml
Mahapps.metro.iconpacks
Awesome icon packs for WPF and UWP in one library
Stars: ✭ 1,157 (+1229.89%)
Mutual labels:  wpf, xaml
Mapbox Gl Print Export For Port
Print/Export for Mapbox GL
Stars: ✭ 14 (-83.91%)
Mutual labels:  pdf, printing
Pyreportjasper
Python Reporting with JasperReports
Stars: ✭ 77 (-11.49%)
Mutual labels:  reporting, pdf
Formswpflive
Live XAML development for Xamarin Forms Apps using WPF Backend.
Stars: ✭ 14 (-83.91%)
Mutual labels:  wpf, xaml
Fluentwpf
Fluent Design System for WPF.
Stars: ✭ 912 (+948.28%)
Mutual labels:  wpf, xaml
Jsreport
javascript based business reporting platform 🚀
Stars: ✭ 798 (+817.24%)
Mutual labels:  reporting, pdf
Modernwpfcommunitytoolkit
The ModernWpf Community Toolkit is a collection of helper functions and custom controls for the ModernWpf library.
Stars: ✭ 35 (-59.77%)
Mutual labels:  wpf, xaml
Granular
WPF for JavaScript
Stars: ✭ 569 (+554.02%)
Mutual labels:  wpf, xaml
Reactiveproperty
ReactiveProperty provides MVVM and asynchronous support features under Reactive Extensions. Target framework is .NET Standard 2.0.
Stars: ✭ 603 (+593.1%)
Mutual labels:  wpf, xaml
Orc.filterbuilder
WPF UI to help users build collection filters
Stars: ✭ 56 (-35.63%)
Mutual labels:  wpf, xaml
Markdownmonster
An extensible Markdown Editor, Viewer and Weblog Publisher for Windows
Stars: ✭ 1,203 (+1282.76%)
Mutual labels:  pdf, wpf

SimpleWPFReporting

Reporting in WPF (XAML) made easy

How to get it

SimpleWPFReporting package is available on NuGet

You can use Package Manager Console to get it:

PM> Install-Package SimpleWPFReporting

How does it work

This project gives you the ability to create any report with the full power of WPF XAML. SimpleWPFReporting will take care of exporting it as a PDF or printing it. The important point is that SimpleWPFReporting will not rasterize your report before exporting or printing it.

In order to be able to divide any report into pages this project expects that you will use a vertical StackPanel as your report body. You should put your report elements into this StackPanel. SimpleWPFReporting accepts StackPanel as a parameter and automatically divides report elements into pages.

How to use it

The main API of SimpleWPFReporting consists of Report static class, ExportReportAsPdf method, and PrintReport method. Both of the methods accept the same arguments.

Required arguments

StackPanel reportContainer is your report body containing report elements.

object dataContext is the data context of your report.

Thickness margin is the margin applied to every report page. Both of the methods have overloads without the margin argument. They use Thickness(25) as a default margin.

ReportOrientation orientation is the orientation (Portrait or Landscape) of your report.

Optional arguments

ResourceDictionary resourceDictionary provides all the resources used in the report.

Brush backgroundBrush is the background brush of the report.

DataTemplate reportHeaderDataTemplate is the DataTemplate used to create a header for every page of the report.

bool headerOnlyOnTheFirstPage allows you to use a header only on the first page of the report. (default is false)

DataTemplate reportFooterDataTemplate is the DataTemplate used to create a footer for every page of the report.

bool footerStartsFromTheSecondPage allows you to not use a footer on the first page of the report. (default is false)

Page number

Every header and footer will be supplied with the PageNumber dynamic resource. You can use it as you wish. For example, this is the simplest possible footer DataTemplate:

<DataTemplate x:Key="ReportFooterDataTemplate">
    <TextBlock Text="{DynamicResource PageNumber}" HorizontalAlignment="Right"/>
</DataTemplate>

Example

Report view:

Alt text

Output PDF:

Alt text Alt text

As you can see there is no difference between input (XAML) and output (PDF) except for paging. The subtle difference in the font weight and the width of the lines is due to artifacts of scaling of the screenshots. PDF is not rasterized, as you can see for yourself: pdf.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].