Reporting - Important Change and Tips & Tricks (November 2020)

Reporting Team Blog
04 December 2020

In this post, I will highlight an important change related to DevExpress Reports and its use within an ASP.NET Core project.

I’ll also share links to a few interesting technical support tickets we’ve received recently. I hope the information herein will be valuable to those of you using DevExpress Reports or considering it for an upcoming project. As always, should you have any questions, feel free to post your comments below.

.VSREPX - New Report File Format

Both our Visual Studio Report Designer and our End-User Report Designer generate .REPX files. While this might create the impression that these files can be used interchangeably, there are important differences between the two:

  • .REPX files generated by our Visual Studio Report Designer may include event handlers for components and report controls.
  • .REPX files created in our Visual Studio Report Designer do not automatically serialize subreport source types and report data sources.
  • .REPX files generated in our Visual Studio Report Designer must include report class definitions in order to correctly restore report layouts from these files.
  • Restoring a report from a .REPX file generated in the VS Report Designer may throw an exception at runtime.

Because of these differences, a Visual Studio-generated .REPX file may cause unexpected behavior and/or discrepancies in the generated document if opened in the End-User Report Designer or passed as an argument to the XtraReport.LoadLayout / LoadLayoutFromXml method.

To address this issue, we introduce a new XML-based .VSREPX file format. With our v20.2.4 update, this file is generated when you add a new report to a Visual Studio project instead of the former .REPX file.

To avoid breaking changes to your application, we do not prevent the runtime loading of .REPX files that were generated with older versions of DevExpress Reports. However, if you try to load a report from the new .VSREPX file format, the following InvalidOperationException is thrown:

You cannot use the LoadLayoutFromXml method to open a VS Report Designer’s internal working file. Use the Save command in the Visual Studio Report Designer to create a standard report template (REPX) file.

To eliminate the exception, convert the file to .REPX before you pass it to LoadLayoutFromXml. At design time, open the .VSREPX file in the Visual Studio Report Designer and save the report to .REPX. At runtime, call XtraReport.SaveLayoutToXml to produce a .REPX file.

Interesting Support Tickets

Reporting – Multiple Supported Platforms (WinForms, WPF, ASP.NET, .NET Core)

Reports for ASP.NET Core

Reports for ASP.NET MVC

Reports for ASP.NET Web Forms

Reports for Blazor

Reports for WPF

Your Feedback Matters

As always, we welcome your thoughts. Please comment below and let us know what you think about our new .VSREPX file format. Should you have technical questions, feel free to contact us via the DevExpress Support Center.

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.
No Comments

Please login or register to post comments.