>Hello Terry
>Thank you for your quick answer.
>I tried this, but then f_fetch_barcode was called for each record of mycursor
If you need it only once, then don't use a report variable. Use a private variable defined in the calling code, i.e. a line or two before the Report Form command.
How many times do you actually need it? At a beginning of a group? When an expression changes?