Matthew,
Another possibility is to put a UDF into the expression on the report, the calculate command into the UDF which then returns the value.
>this will work fine at the command window, but I can't put it in an expression on a report.
Regards,
MarkA