Skip to main content
A newer version of this page is available. .

Right-To-Left Support

  • 2 minutes to read

This document describes support for right-to-left writing systems in reports and reporting applications created with XtraReports.

Right-To-Left Support in XtraReports

The XtraReport class and most of the report controls have been provided with the XtraReport.RightToLeft (XRControl.RightToLeft) property. This property specifies content layout within a control (for most controls, this property affects the direction of their text, and for XRCheckBox, this property also affects the check box position within the control).

By default, all report controls have this property set to Inherit, so enabling it for a report will apply this setting to all its controls.

The following controls support this feature.

For XRPanel and XRTable, this option only affects the controls contained in them.

An XRChart can also be switched to the right-to-left mode by setting the Axis.Reverse property of its X-axis.

When the XtraReport.RightToLeft property of a report is set to RightToLeft.Yes, you can also enable the XtraReport.RightToLeftLayout property that specifies the position of controls within report bands. Enabling the right-to-left layout will also swap the page margins of a document (it will become impossible to place controls outside the right page margin).

right-to-left-layout

The controls’ coordinates will remain unchanged and only the point and direction of reference will change (the X coordinate will be calculated starting with the top right corner). In a report designer (for WinForms and ASP.NET), this will be reflected in the horizontal ruler direction.

The right-to-left layout is preserved when exporting a report to any of the supported formats (e.g., PDF, Excel, or RTF).

Right-To-Left GUI in Reporting Applications

In WinForms and ASP.NET, the Print Preview and End-User Report Designer can be switched to the right-to-left mode.

End-User Report Designer for WinForms
right-to-left-eud-win
End-User Report Designer for ASP.NET
right-to-left-eud-web
Print Preview for WinForms
right-to-left-preview-win
Print Preview for ASP.NET
right-to-left-preview-web

A right-to-left layout is automatically applied to the UI if the application’s culture is set to any of the following cultures: “ar”, “fa”, or “he”. To do this, the following properties must be specified in an application.

  • System.Threading.Thread.CurrentThread.CurrentCulture
  • System.Threading.Thread.CurrentThread.CurrentUICulture

The right-to-left feature can also be enabled in ASP.NET reporting applications by using any of the approaches described in the following document: Right to Left Support.

In WinForms reporting applications, the right-to-left mode can be enabled for a preview form layout by setting the following two properties to DefaultBoolean.True.