>>Does anybody have any idea why errors are generated when compiling a project that contains a report form that has array references in it?
>>
>>I need to keep the array references, so replacing them with memvar references is out. Any suggestions how to make VFP happy?
>
>I have always used the EXTERNAL ARRAY command and the beginning of my main PRG.
I had tried EXTERNAL ARRAY in the code calling the report and didn't work. I'll have to try it in the main PRG...
Hmm, I just tried that in my main PRG, and it doesn't work there, either. Neither does defining an array inside a IF .f., as suggested by Jim B.
This works for me:
MAIN.PRG
.
DO report.prg
.
.
PROCEDURE arraynamehere
REPORT.PRG
DIMENSION arraynamehere[5]
REPORT FORM myreport
Now in myreport.FRX I can reference array arraynamehere[1] as a datafield, and the building the project does not complain. If I don't put the DIMENSION in the code that calls the report (or at least have it in scope when the report runs) THEN I do get an error running the report (No Parameter Statement Found), even though the project build doesn't complain. Set up like above, the project build OK, and the report runs OK, treating the array as an array.