ActiveReports Developer 7
Change Ruler Measurements
See Also Support Forum
ActiveReports Developer 7 > ActiveReports Developer Guide > How To > Section Report How To > Change Ruler Measurements

Glossary Item Box

In a section layout, you can change ruler measurements from inches to centimeters and centimeters to inches. Use the following instructions to modify ruler measurements at design- time and run-time.

To change ruler measurements at design-time

At design time, you can change the ruler measurements from the Report Settings Dialog.

  1. In the Report Explorer, double-click the Settings node.
  2. In the Report Settings dialog that appears, click Global Settings.
  3. From the Ruler Units dropdown select Centimeters or Inches.

To call a measurement conversion at run-time

Call the CmToInch method or InchToCm method at run-time to change measurements. For example, you can use the following code when you are working in centimeters and need to convert a Label's position measurements from centimeters to inches at run-time.

  1. On the design surface select the section containing a control like a Label.
  2. In the Properties Window, click the Events button to get a list of report events.
  3. Select the Format event and double-click to create an event-handling method.
  4. Add code like the following to the handler to set the size of the control using centimeters to inches.

    ShowTo write the code in Visual Basic.NET

    Visual Basic.NET code. Paste inside the Format event. Copy Code
    Me.Label1.Left = SectionReport1.CmToInch(2)
    Me.Label1.Top = SectionReport1.CmToInch(2)

    ShowTo write the code in C#

    C# code. Paste inside the Format event. Copy Code
    this.label1.Left = SectionReport1.CmToInch(2);
    this.label1.Top = SectionReport1.CmToInch(2);

See Also

Concepts
Rulers

©2014. ComponentOne, a division of GrapeCity. All rights reserved.