Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Resolving undefined variable
Message
 
 
To
22/05/2001 16:19:58
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00509828
Message ID:
00510076
Views:
22
>>An alternative to Craig's solution is to "hide" your report from the project manager - i.e. call it using a macro:
>>
lcMyReport = 'reportName'
>>REPORT FORM &lcMyReport TO...
>
>Just a little reminder.. use
>
>
lcMyReport = 'reportName'
>REPORT FORM (lcMyReport) TO...
>
>i.e. a name expression, because it is resistant to spaces in the filename. The first form (macro expansion) is not, unless you surround the variable and the & with quotes.
>
>I'm still eradicating this throughout few tons of legacy code, just as well as I replace the usual
>
>
lcAlias = alias()
>...
>select (lcAlias)
>Though this would work with macros as well, I prefer
>
lnWA = select()
>...
>select (lnWA)
>because it doesn't break if there's no alias selected.

Exactly. I always do that. When I see macros in this kind of code:
saveAli=alias()
     ...
     select &saveAli.
it really irritates me...
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