Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is purpuse of Run expression on entry on exit
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01035168
Message ID:
01035289
Views:
14
>Hello,
>
>What is the purpose of running expressions on entry on exit on Details, Page Footer, Summary, etc.

These give you a change to extend the report writer. You can use a simple expression or call a method or UDF. For example, if you want to count the number of Data Groups processed in a report you can do this ....

- Create a report variable called nGroups, set the value to zero, set the calculate option to SUM.

- In the OnExit Expression of the Data Group Footer, use this: _VFP.SetVar('nGroups', nGroups+1)

Now you can use nGroups in the Report Summary band to print the total number of groups processed.

You can even get more complicated by calling a UDF or method that switches to another cursor, finds some records, sets some variables, totals up some values, etc. Just remember to switch back to the cursor that drives the report before leaving the UDF or method.
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
Previous
Reply
Map
View

Click here to load this message in the networking platform