>In the book "1001 Things You Wanted to Know About Visual FoxPro" they talk about adding the greenbar effect to your reports. It adds a nice touch to the reports, but I am having trouble implementing it consistantly across the bands of the report.
>
>I created a simple report with just one field. In the Print When of this field control, I added fGreenBar(). In the fGreenBar function I added a Wait Window. Now if I run this report for just one record, the function gets called five times? Why?
VFP internally calls it for who knows which reason, just to make sure everything prints right. I observed that behavior ten years ago, and the solution was to keep a report variable which will store the recno(), and the function would check if this has changed, in which case it stores the current recno() to the variable and does what it was written for, else it just exits. This variable should be zero initially.
Maybe a better solution would be to have this function as OnEntry of the detail band; haven't played with it but it may be called only once per band.