Create button - Prewiew

166 views
Skip to first unread message

Leonardo Machado

unread,
Jun 9, 2013, 6:33:03 PM6/9/13
to fastreport_f...@googlegroups.com
Hi,
Does anyone know how to create a button within the previewer. to perform a particular function.

Leonardo Machado

Reinaldo Crespo

unread,
Jun 9, 2013, 7:28:17 PM6/9/13
to fastreport_f...@googlegroups.com, fastreport_f...@googlegroups.com
Place an object anywhere on the form, such as an image object and assign a script function to the on click event on the object's property inspector. 

Sent from my mobile device; please forgive any brevity or errors.

Reinaldo Crespo-Bazán
--
You received this message because you are subscribed to the Google Groups "FastReport for [x]Harbour, Alaska Xbase++, Visual FoxPro" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fastreport_for_x_h...@googlegroups.com.
To post to this group, send email to fastreport_f...@googlegroups.com.
Visit this group at http://groups.google.com/group/fastreport_for_x_harbour?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Leonardo Machado

unread,
Jun 9, 2013, 8:18:47 PM6/9/13
to fastreport_f...@googlegroups.com
Hi Renaldo,

Please, can you show me how to do this via code, I need this button to appear in all my files. FR3, so I thought to do to create the button in the viewer.


Em domingo, 9 de junho de 2013 20h28min17s UTC-3, Reinaldo escreveu:
Place an object anywhere on the form, such as an image object and assign a script function to the on click event on the object's property inspector. 

Sent from my mobile device; please forgive any brevity or errors.

Reinaldo Crespo-Bazán

On Jun 9, 2013, at 6:33 PM, Leonardo Machado <leonardo...@hotmail.com> wrote:

Hi,
Does anyone know how to create a button within the previewer. to perform a particular function.

Leonardo Machado

--
You received this message because you are subscribed to the Google Groups "FastReport for [x]Harbour, Alaska Xbase++, Visual FoxPro" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fastreport_for_x_harbour+unsub...@googlegroups.com.

Reinaldo Crespo

unread,
Jun 10, 2013, 4:12:11 PM6/10/13
to fastreport_f...@googlegroups.com
Ok, here is the basic idea:

1. Open fastreport editor with the .fp3 file for modifications.  
2. Insert a new object of any kind.  Let’s assume you insert a new memo object and fill it with text “Click Here”.  Name it ClickableMemo1.
3. Click on the Events tab of the new Memo object and double click on the “OnPreviewClick” event.
4. The code editor will open with this code:

procedure ClicklableMemo1OnPreviewClick( Sender: TfrxView; button: TmouseButton; Shift ..... )
begin
end;

5. Now you can call any xharbour function from inside the begin -end; code.  for example:

procedure ClicklableMemo1OnPreviewClick( Sender: TfrxView; button: TmouseButton; Shift ..... )
begin

   CallHbfunc( ‘MarkAsSigned’, [<someParmIfNecessary>] );

end;


Where MarkAsSigned is a function inside your app.  See the documentation for more info on calling your own funcs.

Hope that helps,



Reinaldo Crespo-Bazán



To unsubscribe from this group and stop receiving emails from it, send an email to fastreport_for_x_h...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages