Back to Devexpress

Report File Formats (CS/VB and VSREPX)

xtrareports-404375-report-designer-for-visual-studio-report-file-formats-cs-vb-and-vsrepx.md

latest3.2 KB
Original Source

Report File Formats (CS/VB and VSREPX)

  • Nov 27, 2025
  • 3 minutes to read

When you add a new report to a Visual Studio project, you can choose the DevExpress Report item in the Add New Item dialog:

The CS/VB File Format

If you choose the DevExpress Report item, the designer serializes the report in the following files:

  • ReportName.Designer.cs(.vb) – contains a report definition in the CodeDOM format. The designer generates code in this file automatically while you create a report.
  • ReportName.cs(.vb) – this file is intended for custom code. For example, the file can contain code of report event handlers.
  • ReportName.resx – includes report resources.

The CS/VB file format is the recommended format for report classes in a Visual Studio project.

The VSREPX File Format (Obsolete)

The VSREPX file format is a legacy format that was used for report serialization in the initial development stages of the Report Designer for .NET/.NET Core. You can choose the DevExpress Report (.vsrepx) item if you want to add a new report to the project that already contains reports stored in .vsrepx files. If you choose this item, the designer serializes the report to the following files:

  • ReportName.Designer.cs - contains code that loads a report definition from a *.vsrepx file.
  • ReportName.cs - stores custom code.
  • ReportName.vsrepx - contains a report definition in XML-based format.

The following specifics apply to the .vsrepx file format:

  • The .vsrepx file format is the only format available for report serialization for .NET/.NET Core projects created in Visual Studio 2017.

  • You cannot use report inheritance if you store a report in a *.vsrepx file. Convert your *.vsrepx file to a *.cs file if you want to inherit from a *.vsrepx report. Refer to the following section for instructions: Convert a VSREPX File to a CS File.

  • *.vsrepx files should not be used as *.repx files. If you pass a *.vsrepx file to a report’s LoadLayoutFromXml method, the following exception occurs:

Convert a VSREPX File to a CS File

  1. Open your project in Visual Studio and double-click a *.vsrepx file to invoke the Report Designer.

  2. Save the report to a *.repx file.

  3. Add a new blank *.cs report to your project.

  4. Import the saved *.repx file to the new *.cs report.

  5. If your report stored in a *.vsrepx file contains custom code, copy this code to the new *.cs report.