X
xiaobinic
Unregistered / Unconfirmed
GUEST, unregistred user!
我想把form中edit1的值传到rave中去用以下的办法,但老提示没有定义Travepage和Travetext,我是一个菜鸟,请各位高手帮忙!!
procedure TForm.Button1Click(Sender: TObject);
VAR MyPage:TRavePage;
text1: TRaveText;
begin
RvProject1.Open;
with RvProject1.ProjMando
begin
MyPage:=FindRaveComponent(report.Page1',nil) as TRavePage;
text1:=FindRaveComponent('text1',MyPage) as TRaveText;
text1.Text:=edit1.text;
end;
try
RvProject1.ExecuteReport('report');
finally
RvProject1.Close;
end;
end;
procedure TForm.Button1Click(Sender: TObject);
VAR MyPage:TRavePage;
text1: TRaveText;
begin
RvProject1.Open;
with RvProject1.ProjMando
begin
MyPage:=FindRaveComponent(report.Page1',nil) as TRavePage;
text1:=FindRaveComponent('text1',MyPage) as TRaveText;
text1.Text:=edit1.text;
end;
try
RvProject1.ExecuteReport('report');
finally
RvProject1.Close;
end;
end;