Another idea along these lines is that, if you have several
versions of essentially the same report (or form), but with
differences only in specific sorting, grouping, or
formatting/layout, you may be able to combine them into one
object, with code in the Open event to tweak the various
properties and controls according to what is passed in the
object's OpenArgs. I try to do this with reports anyway, so that
the same report object can show the detail data sorted and grouped
in various different ways.
This makes maintenance much easier, too. Any reports that have the
same basic printed layout and display data from the same table(s)
should probably be combined into a single report and tweaked at
runtime as you describe. For instance, you don't need a detail and
summary report -- you can have one report and hide the details at
runtime. I do this as a matter of course simply because it's so much
work to maintain different reports so that they continue to look
alike and present the same data. Say you have a detail and summary
report and you add a field to a table. With two reports, you have to
add the field twice, whereas with a single report you need do it
only the one time.
Or course, most of us have encountered amateur apps where there are
dozens of copies of a report/query/form, each one with a specific
set of criteria, but otherwise completely identical. Sounds like the
project in question is way beyond that kind of problem, but I can't
help but think there have to be lots of different reports and forms
that are basically the same thing and should be combined and tweaked
at runtime.