Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report band expressions

Status
Not open for further replies.

chpicker

Programmer
Apr 10, 2001
1,316
When you double-click on a band in the Report Designer in VFP6, how do you use the "On Entry" and "On Exit" expressions? I tried creating a report variable called "NumGroups" and putting "NumGroups=NumGroups+1" into each of the expressions in turn in the Group Footer band, but NumGroups still ends up 0 at the end of my report. I obviously don't understand how this dialog works, and hitting F1 while in it brings up a "Page Not Found" error in MSDN. Please note that the intent of this isn't to get a count of the number of groups but to figure out how the expressions "On Entry" and "On Exit" work when you double-click on a report band.
 
Hello.

This isn't exactly the answer you need, because I'm positive Cathy Pountney did a job much better than whathever I can write here, online.

Go to get an account there (is free 90 days) and read the articles written by her in December 2000, February, March and April 2001.

The articles are named "Report Writer Tips and Tricks". An excellent source of knownledge.


Hope this helps. Grigore Dolghin
Class Software
Bucharest, Romania
 
The expression you enter in the dialog is "evaluated", not "run". Thus your expression "NumGroups=NumGroups+1" evaluates to false.

To get the effect you wanted in your example you'd need a function like:

FUNCTION add1
NumGroups=NumGroups+1

Then, in the report band dialog you could enter:

add1()

The process of evaluating this expression would increment NumGroups.

Jim


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top