In ActiveReports, ruler measurements can be changed from inches to centimeters and centimeters to inches at both design time and run time.
Call the CmToInch method or InchToCm method whenever needed. For example, if you were working in centimeters and needed to convert a label's position measurements from centimeters to inches at run time, you would use the following code.
To write the code in Visual Basic.NET
Visual Basic.NET code. Paste INSIDE the Format event. |
Copy Code |
---|---|
Me.lblMyLabel.Left = ActiveReport.CmToInch(2) Me.lblMyLabel.Top = ActiveReport.CmToInch(2) |
To write the code in C#
C# code. Paste INSIDE the Format event. |
Copy Code |
---|---|
this.lblMyLabel.Left = ActiveReport.CmToInch(2); this.lblMyLabel.Top = ActiveReport.CmToInch(2); |