>Hi! I need some assistance with a report that uses macro substitution. The form that calls the report can open a series of tables (chosen by the user). All the table structures are the same except for one. This particular table structure can range from report_1 to report_10. For this form, I have only one report designed. I wish to know if anyone knows of a good way to let me keep this one report instead of having to make 10 different ones that will reflect the one table structure. Right now I have print when expressions on the report that read like: report_1 > 0 (this needs to be true for all the reports).
>
>I assumed I could have used a global variable (gcIndex), but it did not work. Then I tried to SQL the original table into a cursor, but that did not work because it kept the original table structure. Next I tried a SCATTER GATHER method, but it did not bring over the data in the report_1 field because the field did not match. I would hate to use an array because when I try to append an array from a large table, it blows a insufficient memory error.
>
>I also tried to create a table by the SQL SELECT, but that did not work. Finally, I attempted in creating a seperate table to hold the actual table and index in it (profit.report_1). But then I realize that it would not work in the report because when you place it into a variable (gcIndex) and attempt to do a print when expression, it does not work.
>
>Any suggestions that I have not tried?? Thanks!!
Eval(cExpression) works in reports. cExpression needs to be defined (as public or private) in the calling program or as a report variable, and needs to evaluate to an expression defined in terms of what the report can use - current aliases, variables which are in scope, properties of objects referenced by variables which are in scope, function calls.
Of course, using eval() will not make your report faster.