Error on Run Reports - DevExpress, UseNativeFormat

 Area:Reports_Output Features

Error Message

When trying to run or preview certain templates using [[Run Reports]], the following error occurs and the report does not run:

Internal Error
Error Message: 1487: 'DevExpress.XtraPrinting.XlsExportOptions' does not
contain a definition for 'UseNativeFormat'
TargetSite: DevExpress.XtraReports.UI.XtraReport Compile(System.String,
DeclaringType: DevExpress.XtraReports.Native.ReportCompiler
Attributes: internal static
MemberType: Method

An similar error also occurs when trying to open the template in [[Report Template Designer]].


This error is caused by the presence of a deprecated ExportOptions.Xls.UseNativeFormat property in the template file.

How To Avoid

If the template was included in a previous version of the software, use the template supplied with your current version of the software. This may mean getting the .rpt file from the data folder installed by the new software or from the [[Default Data folder contents|]] file.

If the template is custom or current versions cannot be obtained, the problem can be fixed with the following method:

  1. Make a backup copy of the problem .rpt file.

  2. Open the .rpt file in Notepad.

  3. Select Edit > Replace.

  4. Find "this.ExportOptions.Xls.UseNativeFormat" and replace with "//this.ExportOptions.Xls.UseNativeFormat"

  5. Click the Replace button until it finds none.

  6. Save the .rpt file.

 Original Author:Matt_P

P/S 92315, 500000102527