Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SetVar() method
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00667677
Message ID:
00667910
Vues:
23
>Cathy, (and anybody else who wishes to expound)
>In another thread you advised Winn (who was trying to print a continued... message):
>
>>I came up with a cleaner way to do this when I wrote the new Report Writer book...
>
>>... In the OnExit expression of the Data Group Footer, use _VFP.SetVar('nLines', 0) to clear the lines. Now you can put your "continued" text in the Page Footer band and use "nLines > 0" as the Print When expression.

>
>After reading the VFP help and Hackers Guide, my question is:
>Why is the variable nLines not 'directly' accessible, i.e. why are we treating it as a variable in 'another' application?
>
>When you were talking about this in Chicago last week, your comments on this must have passed through the space between my ears.... :-)
>
>Thanks,


nLines is a "Report Variable", which in essense means it is a regular variable just line any other variable. The Report Writer declares it for me and it also takes care of increasing the variable by 1 for each record processed. This is the advantage of using a report variable is that it takes care of itself. Unfortunately, it doesn't "clear" the variable and reset it back to 0 when I expect it. Even though I have it set to reset at the end of the data group .. it really doesn't reset until the NEXT data group starts. Therefore, I am using _VFP.SetVar() to force it to reset at the end of the data group which is what I need (and expect).

The _VFP.SetVar() function can be used to manipulate any VFP variable .. whether it has been declared by the report writer or by you in code or a native VFP variable.

I hope this clarifies.
Cathy
Cathy Pountney, Microsoft Visual FoxPro MVP
Memorial Business Systems, Inc. (www.mbs-intl.com)

My Website: (www.frontier2000.com)
My Blog: (www.cathypountney.blogspot.com)
My Book: The Visual FoxPro Report Writer - Pushing it to the Limit and Beyond
Free MSDN Article: What's New in the VFP 9.0 Report Writer
Free MSDN Article: The VFP 9.0 Report Writer In Action
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform