Using FastReports FRH change memo2 from Memo1

Using FastReports FRH change memo2 from Memo1

Postby reinaldocrespo » Sat Apr 08, 2023 2:22 pm

Hello FiveWinners;

Suppose I want to change text on memo2 after clicking on memo1 on a preview report. Let's say I have set property OnPreivewClick of memo1 to this:
Code: Select all  Expand view

//--------------------------------------------------
procedure Memo1OnPreviewClick(Sender: TfrxView; Button: TMouseButton; Shift: Integer; var Modified: Boolean);
var
   s: String ;

begin

   s := TfrxMemoView( Sender ).Text  ;
   TfrxMemoView( Sender ).Text  := InputBox('BI-RADS', 'LT:', s ) ;    
   memo2.Text := TfrxMemoView( Sender ).Text ;

   Modified := True;  //this will update preview memo1 but not memo2
   
end;
//----------------------------------------------------
 


Memo2.text contents will be changed but not displayed.

Anyone has an idea how to update preview so that Memo2 shows new data changed on event OnPreviewClick of memo1?

Thank you,

Reinaldo.
User avatar
reinaldocrespo
 
Posts: 972
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Re: Using FastReports FRH change memo2 from Memo1

Postby karinha » Sun Apr 16, 2023 12:58 pm

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7214
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Using FastReports FRH change memo2 from Memo1

Postby reinaldocrespo » Sun Apr 16, 2023 5:13 pm

Hello Karinha;

On that page the only memo that gets updated on the preview (refreshed using fwh language) is the one from which the mouse click event gets called, that is also the object for which the "modified" variable belongs to.

I'm thinking one possible way would be to alter the report engine object which is something I was hoping to avoid. The other way I think it would be possible would be to write a harbour function that finds the object and forces an update on the preview but that is something I'm also trying to avoid. I would rather if all code could all be contained on a script inside the report file (.fr3).

I really like FastReports. I think it is a shame there is no harbour api.

Thank you,
User avatar
reinaldocrespo
 
Posts: 972
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 90 guests