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????

Comments

  • gpigpi
    edited 4:58AM
    I think you should use TfrxReport.PreviewPages.Page[j].AllObjects.Items instead of frxReport1.Components

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.