>Hi Steve,
>I created a .prg file named calculate.prg and added it as a report variable.
>Then in the expression I used "calculate" but it displays all the results as "0" when I run it or preview it. Can you help with the steps I need to take as I know I've done something incorrectly.
>Thanks!
>Max
>
>>Max,
>>
>>You can use a UDF. In the expression put myCalculation(). Inside of the function (in a .prg file), the fields will be available to do your calculation.
>>Steve Gibson
Hello Max,
The expression would be: calculate()
(you need the parenthesis)
I don't know if I would call it calculate though, because that is a reserved word. Make sure the program file is in your path (or in the current directory), or you can use the SET PROCEDURE TO myprogram ADDITIVE before running the report.
Steve Gibson