Help - Search - Members - Calendar
Full Version: Move objects in report
Fast Reports forum > Fast Reports Products > FastReport Studio
MSC
Hi,

i want to move objects before printing a report.
I tried out with the TOP property of the object like a label.

I ve taken the before print property. The result is that the label is positioned near the top line. That is not the desired position.

Here the code:

procedure Pag1OnBeforePrint(Sender: TfrxComponent);
begin
if Engine.FinalPass then
BEGIN
if Edit1.text = 'TEST' then
Edit1.top:= 10;
END;
END;

Have you an idea how to use it correct ?
HERBERTS
Hi,

Hope I have understood you clearly. top:=10, is actually near the top. So you can try to use a bigger number instead of 10.Try maybe 20 or 30 and see where it takes you.
MSC
QUOTE(HERBERTS @ Jun 4 2009, 04:53 PM) *
Hi,

Hope I have understood you clearly. top:=10, is actually near the top. So you can try to use a bigger number instead of 10.Try maybe 20 or 30 and see where it takes you.


Hi,

you have understood right: the top property need to have a higher value. In this case 450. But i don't understand the reason: in the object inspector is a value of 6.8 in the top property of the object placed in the middle of the report. Now, i have to use much higher values.

Why ?

regards
OlegK
Hi,
QUOTE
In this case 450. But i don't understand the reason: in the object inspector is a value of 6.8 in the top property of the object placed in the middle of the report. Now, i have to use much higher values.
Why ?

450 - value in pixels.
6.8 - value in centimeters.
The object inspector shows value in centimeters.
Script uses values in pixels. Use following code to set value in centimeters from script:
CODE
Edit1.Top := 10 * fr1cm;
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.