Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Doing away with Private variables
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Doing away with Private variables
Divers
Thread ID:
01685958
Message ID:
01685958
Vues:
89
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform