>
>Now I've reread the whole thread, and I know what's going on. You DO need to call a function (or procedure) in the Expression you're talking about. What's not necessary was for you to RETURN TownEnd. All you had to do was change it within the function (or procedure) you called.
>
>Cheers,
>Rich.
Just let's make it simple. Nadia could have the variable set to initially .f., calculate nothing (in the report variables dialogue), then have two functions, one which would set the veriable to .f. and be called in the group header, and another one (which she already made) to be called in the group header (done that too). So one function sets it to false on group start, another one sets it to .t. at group's end, and PrintWhen is the variable as it is.
The footer/header expressions don't have to return anything, they're just a hook to call a function, not for its result, but primarily for its side effects.
I hope it's clear now. I'm sorry this took so long, but I've had a nice combination of too much to do and too much flu at the same time for the whole week.