WinForms Reporting: Meet the New Cross Tab Report Control - Early Access Preview (v19.2)

Reporting Team Blog
20 August 2019

We are about two months away from the official v19.2 launch, so we wanted to share our progress and let you test major new functionality before we wrap up another development cycle.

If you are an active Universal or DXperience subscriber and would like to test upcoming v19.2 features prior to the official release, you can download the early access preview build from the DevExpress Download Manager and test the features described in this blog post. Let us know how well the new functionality address your requirements. This might help us fine-tune the implementation before the official release.

If you are using a trial and want to try this feature today, you can purchase a DevExpress Universal or DXperience license online (this will give you access to early builds such as this one). If you own a non-Universal subscription and are ready to upgrade, email us at clientservices@devexpress.com for preferential upgrade pricing.

Introducing our New Cross Tab Report Control

v19.2 includes the launch of our new Cross Tab report control.  As you will soon discover, we’ve done our best to resolve limitations associated with our XRPivotGrid report control and introduce the necessary features to make code-free cross tab reporting a reality.

Cross Tab Report Demo
Requires installation of WinForms Reporting Demos included into this early preview build.

Key Features

Report Wizard: Quickly Create Cross Tab Reports

We've added a new Cross Tab report type to our Report Wizard for both the DevExpress Visual Studio Report Designer and WinForms End-User Report Designer.

In the next page, users can select data source fields for each cross tab region… 

Cross Tab Wizard - Choose Fields

….and generate/compete the report by selecting page and control theme settings:

Cross Tab Wizard Result

Manual Cross Tab Configuration: Drag Fields from the Field List

The new Cross Tab report control allows you to define its layout via drag & drop. The control’s DataSource and DataMember property values are automatically set once you drop a field onto the cross tab:

Drag and Drop from the Field List

Built-in validation prevents you from adding data source fields from another data source. This helps you avoid errors while generating the cross tab layout:

Drag and Drop Validation

In addition, validation prevents you from binding cross tab cells to report parameters:

Parameter Validation

Aggregate and Shape Data: Use Multiple Summary Types, Group Intervals and Sort Options

With our next major release, you’re no longer need to dig within nested properties to change the manner in which data cells calculate data. Use the SummaryType and SummaryDisplayType Data Cell properties to specify the desired summary type and the way in which a calculated value correlates to summary values in other cells:

Summary Types For Data Cells

Use the GroupInterval, SortBySummaryInfo and SortOrder properties of Tab Header Cells to combine column and row fields into groups (and apply the appropriate sort order):

Row and Column Header Expressions

Format Data Using Expressions

Select a cell and navigate to the properties panel to define expressions used for its appearance properties:

Define an Expression

Use data source fields to conditionally format data cells:

Conditional Formatting

Our Expression Editor includes both GroupRowIndex and GroupColumnIndex arguments (specific to Cross Tab control cells). These arguments allow you to format data based on group index. For instance, here’s how you can define the background color for odd and even rows:

Odd And Even Styles

Use Report Styles

The Cross Tab report control offers 4 visual styles: General, Header Area, Data Area and Total Area. Use general style to define common appearance properties for all cross tab cells and then customize the appearance of the other regions using relevant styles:

Cross-Tab Styles

If Header, Data and Total Area styles are not fully defined, the values used by General style will be used automatically. Should you wish to manage appearance settings manually, simple select a cross tab cell and change appearance properties (BackColor, ForeColor, Font, etc.) as needed.

Intuitively Hide Data Cells, Totals and Headers

Select a cell and use RowVisible and ColumnVisible properties to manage row or column visibility. An invisible area is filled with a hatch brush. The same behavior applies to column and row totals:

Cross Tab - How to hide a column or row

Customize Print Layout Using Control Properties

Use the Cross Tab control’s smart tag to quickly customize printed output:

  • Corner Header Display Mode. Remove the blank region at the left top corner of the control -Choose what to print between the Row and Column Field Names or leave that area empty using the third property value:

    Cross Tab - Corner Header Display Mode

  • Data Field Layout. Choose how to display multiple data field values and associated headers. Select between In Row and In Column modes:

    Cross Tab - Data Field Layout

  • Totals Position. Use ColumnTotalsPosition and RowTotalsPosition to specify the way in which totals are printed across columns and rows, before or after data.

    Cross Tab - Column Totals Location

  • Print Layout. Specify the Cross Tab's "growth" and print direction. See the figure below for available options:

  • Repeat Column And Row Headers. Specify whether the Cross Tab control repeats column and row headers across page breaks.
  • Rotate text displayed in cells. All Cross Tab cells provide an Angle property. This allows you to print column and row headers vertically:

    Cross Tab - Vertical Headers

  • Provide text for empty cells. Use the NullValueText property to specify custom text for empty cells.
  • Automatically adjust a column width based on its content. Set the ColumnAutoWidthMode property to a value associated with the AutoSizeMode enumeration to achieve the desired result.

Avoid Use of the Prefilter Property While Filtering Data

You’re no longer required to handle events, obtain filter values and manually construct the filter string at runtime to filter pivot table data. The Cross Tab report control offers both a FilterString and Parameters property. OF note is the latter: this is a collection of internal cross tab parameters. They allow you to provide values outside a cross tab control’s data source. Whether it’s a report parameter or a report’s data source field value, you can now pass it down further to the cross tab control:

Cross Tab - Filtering by Parameters

This feature is useful for those who need to pass report parameter values directly to the Cross Tab control or filter its data based upon a report’s grouping (when the Cross Tab is located in a group band). 

Convert your Pivot Grid to the Cross Tab with One Click

The XRPivotGrid control smart tag now includes a "Convert to Cross Tab" option. As its name implies, this option allows you to convert your XRPivotGrid to our new Cross Tab report control.

Convert Pivot Grid to Cross Tab

Please Note: Should you encounter issues or are unhappy with the conversion process, you can revert back via the "Revert to Original Pivot Grid" smart tag option within the Cross Tab control: 

How to return back XRPivotGrid

Your feedback will help us enhance this conversion process. Please let us know how we can improve our implementation. 

Questions and Answers

Q: What will happen to XRPivotGrid?

A: We don't expect to develop this report control further. Our long-term goal is to enhance and extend our Cross Tab control.   

Q: What will happen to reports that rely on XRPivotGrid?

A: We will not remove  XRPivotGrid from our distribution.  All your reports will continue to render/export without interruption.  And yes, you can use both controls within the same report should you wish to transition to our new control.

v19.2 Release Notes

As you can see, we’ve invested quite a bit of time on our new Cross Tab report control.  This feature affected resource allocation and we were forced to spend less time on capabilities outlined in our v19.2 roadmap. We’ll do our best to make this release as feature rich as possible, but we’re likely to postpone the release of several features detailed in our 2019 roadmap. Please stay tuned for further updates. 

Your Feedback Counts

NOTE: Early Access and CTP builds are provided solely for early testing purposes and are not ready for production use.This build can be installed side by side with other major versions of DevExpress products. Please backup your project and other important data before installing Early Access and CTP builds.
Alexander Krakhotko (Xafari team)
Alexander Krakhotko (Xafari team)
Great solution!
question: will the elements be shifted to the right?

if it’s easy to add a similar example report to the your demo 

20 August, 2019
Vasily (DevExpress Support)
Vasily (DevExpress Support)

Hi Alexander,

Thank you for sharing your blog post with us. It is possible to cover this scenario by using our new Cross Tab control. Feel free to submit a support ticket, so that we will be able to share the implementation details and a sample project that demonstrates how to cover this scenario.

20 August, 2019
Tobias Johansson
Tobias Johansson

Great news!


When will report 19.2 preview for Wpf be available?

This replaces pivotgrid in a report. Will there be a replacement for Wpf pivotgrid too?

20 August, 2019
Dmitry Tok (DevExpress Support)
Dmitry Tok (DevExpress Support)

Hi Tobias,

This preview build contains only one feature that's available in WPF Reporting - the Union Query support in WPF Report DesignerDrop us an email or create a support center ticket if you're looking for some specific feature for WPF Reporting tools.

You're right: this new control will become available in our reporting tools only and as far as I know we have no plans to develop the new version of DXPivotGrid. The cross tab control first comes to Visual Studio Report Designer and WinForms End-User Report Designer since they share almost the same code base. We'll unlikely ship a similar control with all its capabilities for Web and WPF Report Designer components in v19.2.

21 August, 2019
Michael Gibson - PatTrac
Michael Gibson - PatTrac

Will this be available in 19.2 XAF ReportsV2?

21 August, 2019
James Stein
James Stein

Looks like quite an improvement.

Can the text cell format be assigned via an expression? In the PivotGrid control, I had to write a script to handle the same cell sometimes showing in Percent or Decimal format. 

Ticket T259210 has more detail of the issue and solution.  

21 August, 2019
Dennis (DevExpress)
Dennis (DevExpress)

@Michael Gibson: XRCrossTab is available in Toolbox of XAF's End-User Report Designer and also at design time - we fully inherit this functionality from XtraReports.

We have not yet completed XRCrossTab tests in XAF for this EAP. For instance, we will likely add XRCrossTab into XAF's Report Wizard by the release time. Should you have any issues or suggestions, let us know.

22 August, 2019
Dmitry Tok (DevExpress Support)
Dmitry Tok (DevExpress Support)

@James Stein: Thank you for providing the ticket ID. We played with our new Cross Tab control and were able to solve the issue with the following line of code:

xrCrossTabCell2.ExpressionBindings.Add(new ExpressionBinding("BeforePrint", "Text", "FormatString(iif([OrderDate] = 1994, '{0:p2}', '{0:c0}'), [ProductAmount])"));

In essence, you're able to define an expression binding for data cell properties and modify their values based on row and column group header values. We'll provide the capability to define an expression for both TextFormatString and XlsxFormatString properties right in the Report Designer based on your feedback. I would appreciate it if you share any other scenarios to help us fine tune the control implementation before the official release.

22 August, 2019
Tobias Johansson
Tobias Johansson
Will there be "TextFitMode" property?
10 September, 2019
Dmitry Tok (DevExpress Support)
Dmitry Tok (DevExpress Support)

Hi Tobias,

The cross tab will provide a way to auto-adjust a column width using the ColumnAutoWidthMode property. Its values (the AutoSizeMode enumeration) are similar to that provided by the TextFitMode property. 

Please share your perspective with us: which cells you need the TextFitMode property for and what's the overall requirement? 

11 September, 2019

Please login or register to post comments.