WinForms Grid Based Reporting (Coming soon in v15.2)

Thinking Out Loud
23 November 2015

A couple of weeks ago, I posted a short blog about our upcoming Grid-based reporting solution for our WPF product line. As is always the case when we announce a new feature for a specific .NET platform, one of the questions on people's minds was whether the same capability will be introduced for WinForms. The good news is that yes, it will. 

Before I describe grid-based reporting for WinForms, let me give you a quick background..

Over the years, we've had great feedback on the grid's ability to print and render its contents (If you've used DevExpress WinForms controls in the past, you'll know that printing support is a long-standing feature). For many, this feature reduces the need to create pre-built custom reports, since end-users are able to customize the display of data within the Grid (sort, group, aggregate, add/remove columns) and then print/export the customized view. Though extremely popular, there has always been an Achilles heel to our Printing System - that being the ability to fully customize the output (be it to paper or exported to file).

Well, with our v15.2 release, we've taken ad-hoc grid-based reporting to a new level and given you a way to quickly create a report (both design and runtime), customize the report (or delegate customization to an end-user) and then send the report to a printer or export it to various formats with just a single button click.

WinForms Grid Based Report Generation
This new report generation engine supports a variety of grid features, including grouping, sorting, filtering, data summaries, appearance settings, etc.

You can generate a report at design time by adding the ReportGenerator component from the Toolbox onto your form, and then selecting the Generate Report command from the component's smart tag.

WinForms Grid Based Report Generator
The Report Generation Wizard that is invoked will allow you to...

  • Select the Grid View against which to generate the report (only the standard Grid View is presently supported).
  • Specify layout, grouping and appearance settings for the report (to simplify setup, changes are immediately reflected in the preview pane).
  • Specify the report's title.

WinForms Grid Based Report Wizard
The new report is automatically added to the current project. You can then customize it using our award-winning Report Designer within the Visual Studio IDE.

WinForms Grid Based Report Designer
The report designer allows you to...

  • Preview, print and export the report
  • Modify report element layout
  • Modify report element appearance 
  • Apply data grouping, sorting and filtering
  • Add totals
  • Add page numbers and system information;
    And so much more...

At runtime, you can either display the report's output within its print preview window or you can delegate report customization to end-users via the DevExpress End-User Report Designer

Note that you can generate a report in code -  with a single call to the GenerateReport static method...

XtraReport report = ReportGenerator.GenerateReport(gridView1);

And to generate the report using report generation options available in our Report Generation Wizard...

ReportGenerationOptions options = new ReportGenerationOptions();
options.PrintGroupFooter = DefaultBoolean.False;
// ...    
XtraReport report = ReportGenerator.GenerateReport(gridView1, options);


We'd love to get your feedback on grid-based reporting. How likely are you to use this feature?

Free DevExpress Products – Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We’ll be happy to follow-up.
Brendon Muck [DevExpress MVP]
Brendon Muck [DevExpress MVP]

I can definitely see myself providing this to users who want to be able to export/print grids but don't need all of the columns in the output.

My one suggestion would be to add a property to GridView that dictates the name that is shown in the "Report Wizard" dialog. Our GridView names won't necessarily mean much to an end-user and I'm not going to rename them all to something more human-friendly just for this one feature.

23 November 2015
Del W
Del W

Nice, I could have used it the other day on a small project. I guess I will just have to update it when 15.2 comes out! ;)

23 November 2015
Emad Alden .
Emad Alden .

Great and easy way to add custom grid report Footer

( no need to normal xtra report any more )

thanks Devexpress

23 November 2015
Roman Kalachik (DevExpress)
Roman Kalachik (DevExpress)

Brendon, would you please describe your suggestion in greater detail? The Report Generation feature was included into the beta binaries and should be available to you for download. Please try it and share your results in a Support Center ticket.

24 November 2015

Brendon, I tend to believe that the gridview's Name will be used only if no ViewCaption is defined.

25 November 2015
Brendon Muck [DevExpress MVP]
Brendon Muck [DevExpress MVP]

I don't really have time to install the BETA, but based on what I've read above, it would seem that if I have a GridControl with a GridView named "gridView1", the Report Wizard screen is going to display "gridView1" in the drop-down list of available GridViews.

My end-users aren't going to know what "gridView1" means and if there are multiple views on a GridControl, displaying a drop-down list of "gridView1", "gridView2" and "gridView3" won't really make it any clearer.

Instead, the GridView control could have a string property called "ReportViewName" in which we can provide an end-user friendly GridView name. Using that, the drop-down in the Report Wizard screen might show "Orders", "Order Details" and "Line Items" instead of the view names, which again, mean nothing to them.

25 November 2015
Mike Falcon (DevExpress)
Mike Falcon (DevExpress)

Brendon, we always open to suggestions ;-). Since it's very new feature we're looking for feedback!

27 November 2015

Please login or register to post comments.