>Ah so! But I'm fairly new to VFP and it's not clear to me where the UDF is defined so that the variables are within its scope when not running from the command window. Would these be private variables owned by the caller of the report generation file?
David,
Yes they would. Make a PRG that runs the report and define the vars in there prior to calling the REPORT FORM command.