I have an application that has a form in which the user picks a number of options from a set of combo boxes that become critera for a report that previews when clicking a button at the bottom of the form.
Is there a way to show the report preview on the form itself with some sort of control? The user would like to see the report change dynamically as different options from the combo boxes are chosen, but doesn't want to have the report pop up continuously in preview mode. Kind of a pre-preview right on the form that they can use to see if there is data, etc before actually choosing to really preview and print it.
Is this possible? I am currently playing with displaying it from a snapshot view created each time the user changes a parameter, but am wondering if there is an easier way...
One solution would be to do a count or dcount of the number of records to be returned. I often do a dcount before opening a form or report and will not run the open command if there are no records, but you can use this principle to show in a text box the number of records that will appear on the report.
Then getting a snapshot viewer in access to pick that snapshot file up and view it.
Each time you change the combo, you then delete the original snapshot file, and then generate a new one with the same name to be picked up by your snapshot control in the access form.
It's the only way i could find that made it possible to do what you need to, there's no other way
btw, it's a relatively quick process though once you got it all to work.
How did you find an almost 8 year old message? I doubt the original person is concerned about this anymore, but you were able to find this post, so perhaps others are interested.
Regardless, there is a much easier way by simply creating many small bitmap files of a report with all combinations of the various options. Simply replace the 'screen shot' picture. I like this method because it is really fast and you don't have to generate a who knows how long report. Some of the options that are chosen could make the report really slow to load, but each option would change the report in a predictable way. If you want to get really fancy, you could create a plethora of small versions of screen shots based on how many records are available in each section. The only problem is that this idea is not very useful. Previews of the first screen or two are pretty pointless beyond the general idea of how the data will be grouped.
Don't get me wrong. I like your idea which would be much easier now a days on computers that are much faster than they were 8 years ago, but some options can make reports really tough to generate quickly. The main problem I have with your idea is that all you will be able to see is the first one or two pages, so generating a long report just to make a preview of the first page or two is a huge waste of resources. The idea is to be fast regardless of how much data there is; otherwise, they may as well use the full preview feature.