How to read the changed values from frxMemoView
I need your help. The problem is: I change the contents of frxMemoView after clicking on the object.
procedure TForm2.frxReport1ClickObject(Sender: TfrxView; Button: TMouseButton;
Shift: TShiftState; var Modified: Boolean);
begin
if pos('Memo',sender.Name)>0 then
begin
TfrxMemoView(sender as TfrxView).Text:=???something???;
Modified:=true;
end;
end;
That is OK. The problem appeared when I wanted to read the new values from frxMemoView on the procedure frxReport1AfterPrintReport. Instead of receiving the new values ???something??? I get the initial values (before my changing).
procedure TForm2.frxReport1AfterPrintReport(Sender: TObject);
for i:=0 to frxReport1.ComponentCount-1 do
begin
t:=frxReport1.Components.Name;
if pos('Memo',t)>0 then
begin
t2:=(frxReport1.Components as TfrxMemoView).Memo.Text;
end;
end;
Why does a variable t2 receive initial the values but not my new values ???something????
procedure TForm2.frxReport1ClickObject(Sender: TfrxView; Button: TMouseButton;
Shift: TShiftState; var Modified: Boolean);
begin
if pos('Memo',sender.Name)>0 then
begin
TfrxMemoView(sender as TfrxView).Text:=???something???;
Modified:=true;
end;
end;
That is OK. The problem appeared when I wanted to read the new values from frxMemoView on the procedure frxReport1AfterPrintReport. Instead of receiving the new values ???something??? I get the initial values (before my changing).
procedure TForm2.frxReport1AfterPrintReport(Sender: TObject);
for i:=0 to frxReport1.ComponentCount-1 do
begin
t:=frxReport1.Components.Name;
if pos('Memo',t)>0 then
begin
t2:=(frxReport1.Components as TfrxMemoView).Memo.Text;
end;
end;
Why does a variable t2 receive initial the values but not my new values ???something????
Comments