- 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.
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).
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|
|End-User Report Designer for ASP.NET|
|Print Preview for WinForms|
|Print Preview for ASP.NET|
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.
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 layout can be enabled by setting the following two properties to DefaultBoolean.True.