xtrareports-5134-feature-guide-to-devexpress-reports-globalize-and-localize-reports-report-units-of-measurement.md
This article describes the different measurement systems— Imperial , Metric , and Screen coordinates —that can be used in reporting to maintain uniformity in element locations, dimensions, and margins. This help topic includes details on how to assign these measurement units within reports and the properties affected by the chosen system.
Most metrics of report elements can be expressed in units that correspond to one of the following systems of measurement:
Imperial system : hundredths of an inch, inches.
Metric system : tenths of a millimeter, millimeters.
Screen coordinates : pixels.
To assign a system of measurements to a report, use its XtraReport.ReportUnit property.
Alternatively, you can use the Report Designer Options Dialog:
Changing the measurement system converts the corresponding property values and updates the layout of all report elements in the Report Designer. The measurement system determines the minimum increment with which an element’s location and size can be changed, specified by the XtraReport.SnapGridSize property.
When you specify a control’s dimensions in code, make sure that these values agree with the measurement units that are currently assigned to the report.
You can use the UserDesignerOptions.ShowDimensionNotations setting to control whether to display exact element size while resizing. The notation are based on a selected report unit:
| System of Measurement | Displayed Unit | Image |
|---|---|---|
| Imperial system | inches, | |
| hundredths of an inch | ||
| Metric system | millimeters, | |
| tenths of a millimeter | ||
| Screen coordinates | pixels |
Alternatively, use the Dimension Notation option in the View tab to control dimension notations visibility:
For Web Report Designer, use the DimensionNotationsEnabled setting.
To maintain a high standard of printing, the border width of an element is always measured in pixels, which only applies to the XRControl.BorderWidth and XRZipCode.SegmentWidth property values. When publishing a report, these values are converted to its unit of measurement based on the control’s Dpi property value.
The values of the following properties are expressed in the measurement units assigned to the XtraReport.ReportUnit property.
XtraReport.SnapGridSizeSpecifies the dimensions of the report designer snap grid.XRControl.BoundsFSpecifies the location and size of a report element, according to the system of measurement selected for the report.XRControl.SizeFGets or sets the size of the control.XRControl.HeightFSpecifies the control’s height (measured in report units).XRControl.WidthFSpecifies the control’s width (measured in report units).XRControl.LocationFSpecifies the floating-point representation of the coordinates of the control’s upper-left corner.XRControl.BottomFGets the Y-coordinate of the control’s bottom edge (measured in report units).XRControl.LeftFSpecifies the X-coordinate of the control’s left edge (measured in report units).XRControl.RightFGets the X-coordinate of the control’s right edge (measured in report units).XRControl.TopFGets or sets the Y-coordinate of the control’s top edge (measured in report units).XtraReport.PageHeightFSpecifies the height of report pages (measured in report units). Has effect only if the XtraReport.PaperKind property is set to Custom.XtraReport.PageWidthFSpecifies the width of report pages (measured in report units). Applies only if the XtraReport.PaperKind property is set to Custom.XtraReport.MarginsGets or sets the report’s page margins.MultiColumn.ColumnWidthGets or sets the widths of the columns when printing muli-column reports.MultiColumn.ColumnSpacingGets or sets the amount of space between the columns when multi-column reports are printed.XRShape.LineWidthGets or sets the width (in report units) of the line which is used to draw the shape image.XRBarCode.ModuleGets or sets the width of the narrowest bar or space in the current XRBarCode instance (measured in report units).XRCrossBandControl.StartPointFGets or sets the starting point where the cross-band control starts drawing.XRCrossBandControl.EndPointFGets or sets the ending point where the control ends drawing.