WPF Grid-Based Report Generation (Coming soon in v15.2)

13 November 2015

In our never-ending quest to make reporting easier (and more flexible) for developers and end-users alike, v15.2 will introduce a new WPF Grid-based report generation option. As you can see from the screenshot below, this new option gives your power users a way to customize output and hopefully go a long way to reducing the number of custom reports you'll have to create over the life of your app.

WPF Grid-based Report Generation

With just a few lines of code, you can invoke the DevExpress WPF Report Designer at runtime from the Grid Control and create reports based on its data.

public static void ShowDesigner(IGridViewFactory<ColumnWrapper, RowBaseWrapper> factory)    {
    var report = new XtraReport();
    ReportGenerationExtensions<ColumnWrapper, RowBaseWrapper>.GenerateFrom(report, factory);
    var reportDesigner = new ReportDesigner();
    reportDesigner.Loaded += (s, e) =>    {
    reportDesigner.ShowWindow(factory as FrameworkElement);

To make things as easy as possible, we've added two behaviors that allow you to incorporate Grid-based report generation in your app when using our WPF Ribbon control:

  • DevExpress.Xpf.Reports.UserDesigner.Extensions.ReportManagerBehavior
  • DevExpress.Xpf.Reports.UserDesigner.Extensions.GridReportManagerService.

Here's how it works...first, attach the GridReportManagerService to a TableView:

<dxg:GridControl ... >
        <dxg:TableView ... >
               <dxrudex:GridReportManagerService x:Name="CourseCollectionViewReportService" />

...then attach ReportManagerBehavior to a Ribbon item and bind its Service property to GridReportManagerService:

<dxr:RibbonControl ... >
    <dxb:BarSplitButtonItem ... >
            <dxrudex:ReportManagerBehavior Service="{Binding ElementName=CourseCollectionViewReportService}" />

WPF Grid-based Report Generation


We'd love to hear your thoughts on these new features. Let us know what you think.

5 comment(s)

Things are all good with wpf ,windows forms and asp.net.

How do you consider us DevExtreme users?

13 November, 2015
Alex Boston

Always want such feature, Hope We can see it XAF aslo with grid grouping

14 November, 2015
Alex Boston

Always wanted this feature, Also How about grouping in grid mapped to a grouping in report also.

Can we get it in xaf web and xaf win ?

14 November, 2015
Dennis (DevExpress Support)

@Alex Boston: Thanks for your suggestion. Our team will take it into account.

20 November, 2015
Stefano S.

Very interesting.


23 November, 2015

Please login or register to post comments.