>Is it possible to use a udf in a report expression? If so, where should it be stored for the report frx to find it?
>
>I'm reporting on an sql-select cursor so I cannot update the data directly before it hits the frx.
>
>TIA....Terry
My reporting routines usually look like this:
open the tables needed
prompt the user for parameters (usually run a little dialog-type modal form)
sql-select the data for reporting
set the relations from the resulting cursor into lookup tables
set up the printer
report form....
restore printer settings (i.e. set print off etc)
close the tables
Function ....
Procedure...
I.e. all the code that one specific report calls is in the same .prg which calls the report. This is my way of imagining everything is neat and under control. The report sure finds the functions, because the functions and procedures contained in the calling .prg are always in the search path.
If two or more reports use the same functions, they probably have some other things in common, too, so I call them all from the same .prg, which gets called with different parameter for each report.