Nello said (in his usual crystal clear
and logical style)
when you say "disable" the group do you mean you want to
disable the
"grouping/breaking" behaviour or do you mean you don't want
the stuff
in those bands to print?
If you want to disable the grouping/breaking behaviour set
the expression property
to some constant
YES! That's exactly what I wanted. (Simple -
really, when you think about it!)
If you want to disable the printing sometimes (but not
always) hook the "BeforePrint" event
and set the boolean flag
(PrintBand?) it passes to your handler := False.
If you want to disable printing of the stuff in the bands,
set the property
Enabled := False
Well that's an odd property to use to just
disable printing
Finally - if the purpose of the group footers/headers is to
do "invisible stuff"
(like aggregate totals or something clever) and THAT is
what you want to disable
setting the property Enabled := False will NOT turn that
stuff off - so you there
you also need to set PrintBand flag
false in BeforePrint.
-ns
Thanks very much Nello, and to the others who
offered suggestions.
Mark