Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add UDF() Or Method To Report

Status
Not open for further replies.

xBaseDude

MIS
Jan 31, 2002
357
US
How do I add a UDF() to a report?

TIA - Wayne

sig_jugler.gif
...all this and tap dancing too!
 
HI

In your report add box just as you do for your field and in the expression put..
myUDF(myParameters)

Add the myUDF at the end of your main.prg so that it is available to the report. Or you can add this myUDF as a PRG in your project. myParameters can be a record value (field value) and the value is passed on to the myUDF prg.

myUDF prg shall return a value which the report will obtain. Set the boxes property in the report a charater type or suitable data type as returned by the UDF.

:)

ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com

 
xBaseDude

You could also use Global function like this (In your main program)

DEFINE CLASS myCustomClass AS CUSTOM
procedure myFunction
LPARAMETERS lcmyValue
&& [COLOR=rbg(124,228,132]Your procedure here[/color]
ENDDEFINE
ENDDEFINE

Just before your report use:
PUBLIC oClass
oClass=CREATEOBJECT("myCustomClass")

And in the field of your report use:
oClass.myFunction(myValue)


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top