>Ah, the old pyjama paper. Well, the principle still holds - have a variable for each band to hold the band expression - a copy of recno() for detail, copy of group expression for each group band, and eof() for the grand total, and compare each time. If it's changed, it's the first call for that band; store the new value to the variable, and do whatever you want.
>
>While the PrintWhen expressions may be evaluated many times (seems to be it recalculates to make sure the line would be blank, if you have "eliminate blank lines" set on), I think the OnEntry expressions would be calculated only once. You could have a separate set of logical variables in the report, set them from OnEntry functions, and have these variables as PrintWhen expressions. Thus you'd calculate only once, and you won't care how many times Fox looks at these variables.
Dragan,
Thanks again for all your help.
Kind Regards,
Mat