Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Macro Substitution(&)
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00459993
Message ID:
00460233
Views:
14
>>>Can macro substitution (&) be used in a report?
>>
>>Rip,
>>
>>I am a strong believer in experiments, as Nadya suggests. In the command window I set
abc = [123]
and in my dummy report I added controls "&abc", "EVAL(abc)" and "(abc)" {name expression}.
>>
>>Macro expansion doesn't work, EVAL() and the name expression work.
>
>I found the same thing but I was having some problems getting it to work in complicated expressions. So what I did was just use the "&" for readability then I created a little prg that takes the frx file a makes a copy of it. Then I do find and replace for all the known variables that have "&" in front of them and replace them with the field names I need at any particular time. Then I run the report from the copied frx. This way I only have one frx to maintain for several flavors of the same report.
>
>If at first you don't succeed hack the frx.

How fast does this idea work? Basically, you may achieve the same functionality without hacking fxr, but making Print When or IIF(). Of course, the report would be more complicated in this case...

Anyway, I'm glad, you achieve the desired result.

I found by experiment, that REPORT FORM myReport TO FILE ASCII doesn't work correctly, if you have several lines in any of the band. So, I have to switch from Report to program, which generates the report. This way I already created 4 different reports, which nned to be outputed to ASCII file. I showed my program in another thread...
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform