Tip! OnUserFunction

67 views
Skip to first unread message

Rafa Carmona

unread,
Feb 20, 2012, 12:23:19 PM2/20/12
to FastReport for [x]Harbour, Alaska Xbase++, Visual FoxPro
Hi, I am evaluating this tool, I feel great, thank you very much
Spirin Sergey

A tip to be faster when using event "OnUserFunction"

FrPrn:SetEventHandler( "Report", "OnUserFunction", { | FName,
aFParams | CallUserFunction( FName, aFParams ) } )

function CallUserFunction ( fName, aFParams )
Local uRes

if empty( aFParams )
uRes := HB_ExecFromArray( FNAME )
else
uRes := HB_ExecFromArray( FNAME, aFParams )
endif

return uRes

Thus, we need not define function by function, can also be more
proactive in defining the functions outside the PRG and take them into
a dbf, for instance.
Regards



Spirin Sergey

unread,
Feb 22, 2012, 5:45:31 PM2/22/12
to FastReport for [x]Harbour, Alaska Xbase++, Visual FoxPro
Hello, Rafa,

Ok. Good idea :)

---
Sergey Spirin.
FastReport for Xbase-family languages,
http://www.spirins.com

Joseph Owoyemi

unread,
Mar 18, 2012, 6:30:00 AM3/18/12
to fastreport_f...@googlegroups.com
Can you please favor me with the source code for HB_ExecFromArray()  to enable me adapt it for use with Xbase++

Thanks

Joseph

--- On Mon, 2/20/12, Rafa Carmona <rafa.t...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "FastReport for [x]Harbour, Alaska Xbase++, Visual FoxPro" group.
To post to this group, send email to fastreport_f...@googlegroups.com.
To unsubscribe from this group, send email to fastreport_for_x_harbour+unsub...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/fastreport_for_x_harbour?hl=en.

Reply all
Reply to author
Forward
0 new messages