Report In Preview Mode: Modifyable?

P

(PeteCresswell)

I've got a request to implement a "SortBy" dialog box in front of an MS Access
report.

My kneejerk is to just pop the dialog - either from a function that then opens
the report, or from Report_Open... and somehow modify the report's sorting
properties before it opens... or, as a last-ditch move, open different reports
depending on the sort specs.

I could do it with an Excel worksheet - but this report is already out there and
redoing it in Excel would probably be too many man hours.

Before I start down the dialog-before-opening report road: is it possible to
modify the sorting on a report that's already open in "Preview" mode?

Seems like that would be the brass ring: user opens report, the "SortBy" dialog
floats over top, and the user has his way with the sort specs dynamically.
 
J

Jeff Boyce

If I recall correctly, the latest version of Access (2007) has a feature
very like that.

However, do you really want to risk having your users modify the design of
your report? How will you keep your application's reports maintained if you
don't know what they might have done to them? And if you "fix" a report
that's been modified, how many angry users will come back at you for
removing "their" fixes?!

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
A

Allen Browne

It's quite simple to alter the ControlSource of the GroupLevel in
Report_Open.

Example in:
Sorting report records at runtime
at:
http://allenbrowne.com/ser-33.html

How you interface that is up to you. Toolbar. Popup form. Form opened
previously. Parameter. Whatever suits.
 
D

Douglas J. Steele

Pete: See if you can get your hands on a copy of the February, 2007 "Advisor
Guide to Microsoft Access".

Alex Dybenko & I have an article in it about how to do exactly what you're
trying to do.

Unfortunately, the terms of our agreement with Advisor Media doesn't allow
us to repost articles on websites.

In a nutshell, you need to use flags in both the report and the pop-up form.
The form is going to need to close the report and reopen it. The report
needs to open the form if it isn't already opened, but needs to know whether
it's being closed by the user or by the form (so that it knows whether or
not to close the form.)
 
P

(PeteCresswell)

Per Douglas J. Steele:
In a nutshell, you need to use flags in both the report and the pop-up form.
The form is going to need to close the report and reopen it. The report
needs to open the form if it isn't already opened, but needs to know whether
it's being closed by the user or by the form (so that it knows whether or
not to close the form.)

Thanks. That's exactly what I'm in the process of doing right now.

Took awhile for it to dawn on me that, from the user's perspective, there was
little or no diff between dynamically modifying the report and just closing it
and then opening it again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top