K
kiln
I have a report that has three GroupLevels and then a detail section.
Example:
Country
State
City
Person (detail)
The calling form has three checkboxes, one for each GroupLevel, and the
user checks the levels which are to be shown on the report. So they
could check just Country, and it'd list people grouped by country; or
check both Country and State, have it group by both. The reports on open
event has code that sets the visible property for each group level
according to the matching checkbox on the calling form. Fine...but of
course the report still sorts by the hidden group levels, IOW there is
always a sort by Country in effect, even if the group level is hidden.
So far the only way I've been able to envision getting rid of the
sorting for hidden group levels is to reassign the ControlSource
property to match the next visible group level. So if the first group by
to be shown is City, reassign both Country and State ControlSource's to
City. Is there a simpler way to implement this?
Example:
Country
State
City
Person (detail)
The calling form has three checkboxes, one for each GroupLevel, and the
user checks the levels which are to be shown on the report. So they
could check just Country, and it'd list people grouped by country; or
check both Country and State, have it group by both. The reports on open
event has code that sets the visible property for each group level
according to the matching checkbox on the calling form. Fine...but of
course the report still sorts by the hidden group levels, IOW there is
always a sort by Country in effect, even if the group level is hidden.
So far the only way I've been able to envision getting rid of the
sorting for hidden group levels is to reassign the ControlSource
property to match the next visible group level. So if the first group by
to be shown is City, reassign both Country and State ControlSource's to
City. Is there a simpler way to implement this?