Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Doing away with Private variables
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Doing away with Private variables
Miscellaneous
Thread ID:
01685958
Message ID:
01685958
Views:
88
Hi,

I have 2-band report. The 2nd band relies on records in a cursor. The cursor name is lcLaborCursor. The cursor is created as follows:
lcLaborCursor = SYS(2015)
So the variable lcLaborCursor has to be in scope when the report is produced. But the cursor (lcLaborCursor) is created and populated two functions before the report is produced. So, I declare the variable lcLaborCursor as PRIVATE. And it works.

Another way I can do it is to declare the variable as Local (my desired goal) and then pass it from one function to another, and then to another.

My question: Can I declare the variable lcLaborCursor LOCAL, not pass it from one function to another, but then still make the cursor in scope within the report?
Some of the text in the report is using the following syntax:
EVALUATE( lcLaborCursor + ."FLD_NAME")
The above requires that the lcLaborCursor be in scope.

What else can I do?

TIA
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Next
Reply
Map
View

Click here to load this message in the networking platform