change grouping on the fly

  • Thread starter Thread starter Stephen
  • Start date Start date
S

Stephen

I have a number of reports (25) that show agent activity for a specified
reporting period. We are trying to setup these reports so that they can be
printed as a company whole, OR grouped by office. The office name is one of
the fields passed in the query.

As far as I can tell, there are two ways to do this:

1. Create a duplicate of every report (formatted with office grouping) so
that either the Company report version is opened OR the Office-grouped
report is opened
2. Create VB code so that when a report is opened, it is formatted on the
fly with Office grouping.

Option 1 would end up creating a LOT of extra work to maintain because
whenever a report has a field edited or added, we must make all of the same
changes to the grouped report as well
Option 2 seems easier to maintain, but might be much more complicated to
setup.

Does anyone have a thought of either how to do this or whether Option1 or
Option 2 is a better solution?

-Stephen
 
Not quite understanding what you want and what you have, my thoughts would be
to create an unbound form with a combo box tied to your table of Office
Names. A command button with onclick event tied to the report you want which
is pointing to your query. Your query is basing your report on the selection
of the office from your combo box.

copy your query and remove the Office combo box reference, copy your report
and use the new query to get the same report for the whole company.
 
sorry about being vague.

I have a report that requires TWO different formats.
Format 1: List all transactions
Format 2: List all transaction, grouped by Office with each office starting
on a new page with Office

I can easily pass sorting order and filters through the query, but
specifying whether a report groups on Office when opening a report ...that
is the thing I do nto understand.

-Stephen
 
I believe our difference is that your are concentrating on one report with
two formats, organizing your report by grouping works fine but requires
separate actions.

I am looking at a report with a query as the control source. Then I have
the same report pointing to a copy of the first query, but then I change the
query to reflect the changes I want in the report. One command button points
to each separate report, based on the same data but using a different query
as a source based on the info I want.

Don't know if I am clear or not.
 
Back
Top