>Thanks for help Ed. >I do all like you wrote. >Now when I enter in Expression builder () >and press buttom Verify, I have eroor: "Invalid subscript reference"
Start - a hint when entering things here. The board processes HTML; things directly within < > with no separators do not appear.
One possibility is that the function is not visible at design time. If you're using a procedure file, make certain that you've done a SET PROCEDURE TOprocedure file before invoking the Report Designer. What VFP doesn't know about at design time can't be used in the expression builder. If you're using a standalone .PRG, make certain that the .PRG is in the current directory or somewhere along VFP's search path (as set by SET PATH) so that VFP can find the .PRG file.
The same rules apply at runtime - the procedure file or program must be visible to VFP when the report is invoked, or the function won't be available.