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 Xamarin UI Controls

Deliver high-impact native mobile apps with our feature-rich Data Grid, Scheduler, Chart, TabView, Editors, and utility controls. Reserve your free copy today!
Stephen Winstanley_2
Stephen Winstanley_2
Does this mean any existing .REPX files in visual studio need to be converted or renamed to .VSREPX ?
7 December 2020
Dmitry Tok (DevExpress Support)
Dmitry Tok (DevExpress Support)
Hi Stephen,

You are not required to modify existing REPX files: we do not prohibit report restoration from REPX files at runtime or opening these files within the End-User Report Designers (so as not to break existing functionality). We'll keep this behavior intact at least in the context of v20.2 and we'll make another announcement once a conversion is required.

Moreover, this change will not affect you in any way if you've been instantiating new report objects at runtime.

7 December 2020
Can anyone help me on how to do Scripts on the design layout of reports?
11 December 2020
Dmitry Tok (DevExpress Support)
Dmitry Tok (DevExpress Support)


The following help topic describes various aspects of working with scripts in the DevExpress Report Designer: Scripts Overview . I've also extracted your question into a support center ticket where you can ask our support team members additional technical questions.

11 December 2020
Wilfredo Gutierrez
Wilfredo Gutierrez
Do you have any example setup on how to use DocumentViewer using VS 2019 and ASP.Net Core 3.1 without NPM? Using LIBMAN only.
21 December 2020
Vasily (DevExpress Support)
Vasily (DevExpress Support)

Hello Wilfredo,

I see that you have already posted a ticket with this question to our Support Center web portal: Libman and DevExpress Reporting and DocumentViewer. So, let us post our reply on this question to that ticket.

22 December 2020

Please login or register to post comments.