>>Dragan gave you a solution.
>
>Which I don't really like. Not at all - it creates 15 variables for no good reason. And then there needs to be code which will use these variables, which will also have to check for their existence first. Ugly, and unnecessarily complicated.
>
>>But I will repeat that an array is easier and "cleaner". With my earlier code var(1) is '3', var(2) is '1' and so on.
>
>Sure is... and reading that this is for a report, I smell a kludge. But I was also too tired/lazy to recheck the whole thread, so I let it go as is. I had some deja vu, though - sounds like we've been through this once before. But we all get those often, no big deal.
There is a problem with using an array in a report. When you build the project it will tell you it cannot find the var
And the kludge is ...
- add a prog to your project, which you exclude
- the contents are
function var()
endfunc
And it will find a function var() and stop complaining
Gregory