Script error: undeclared identifier
Anybody has meet the similar error:
Scrip error at 3:14: Undeclared identifier:'Memo22'
Memo22 is a text field which placed in report title
Script do some checking on before print:
procedure Memo22OnBeforePrint(Sender: TfrxComponent);
begin
with Memo22, Engine do
begin
...
end
The error doesn't happen every time, only sometime will appear.
Scrip error at 3:14: Undeclared identifier:'Memo22'
Memo22 is a text field which placed in report title
Script do some checking on before print:
procedure Memo22OnBeforePrint(Sender: TfrxComponent);
begin
with Memo22, Engine do
begin
...
end
The error doesn't happen every time, only sometime will appear.
Comments
the error is directing you to line3 character14 as the best bet as to where the error is.
i suspect your error is in the code in the begin end block that you did not show
Begin
if <Query1."REPRINT"> = 1 then Memo22.Visible := true
else Memo22.Visible := false
End;
procedure Memo22OnBeforePrint(Sender: TfrxComponent);
begin
memo22.visible :=(<Query1."REPRINT"> = 1);
end;
the empty Begin End. block at the bottom of the code page can be used to initialize variables, create arrays etc.. it is the first to run in the script.