Help - Search - Members - Calendar
Full Version: how to set variable in report's scripts
Fast Reports forum > Fast Reports Products > FastReport 3.0
yzsind
i have define a variable in my report, name is "var1",

i can get the var1's value

but i can't set the var1's value

////////this is my code

procedure Page1OnBeforePrint(Sender: TfrxComponent);
var
newvar:string;
begin
newvar:=<var1>;
<var1>:='08';
end;

//////////////////////////////
<var1>:='08'; is error

yzsind
i have found the key.


Get('my variable')
Set('my variable', 10);
gurkal
It must be like this
Report.Variables.Variables['VAR_NAME']:=#39+Edit1.Text+#39;

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.