Reference to report objects |
Top Previous Next |
For referring to report objects (for example, "Text" object) use the name of the object. The following example returns the height of Text1 object:
float height = Text1.Height;
Note that report's native unit of measurement is screen pixels. Keep it in mind when using such object's properties like Left, Top, Width, and Height. To convert pixels into centimeters and back, use the constants, defined in the "Units" class:
float heightInPixels = Text1.Height; float heightInCM = heightInPixels / Units.Centimeters; Text1.Height = Units.Centimeters * 5; // 5см
|