I have a QuickReport with several groups and footers defined at design time.
 
At run time I need to conditionally disable one Group/Footer pairing. 
However, I find that if I merely disable the Group, group expression seems to stuff up the grouping of the remaining pairs (forcing group breaks where they don't actually exist).
 
To get around this problem I have decided to destroy the group/footer pair rather than just disabling them.
 
Can someone advise the correct way to go about this.  I have done it, and it works OK on my Win2k machine but on a couple of client sites - one with Win98 and another with NT Terminal server are getting access violations.
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
 
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
 
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

Reply via email to