If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > Display a report on a form?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-02-04, 23:10
Anthony Kroes Anthony Kroes is offline
Registered User
 
Join Date: May 2004
Posts: 1
Question Display a report on a form?

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...

Thanks in advance fo the help.

Last edited by Anthony Kroes; 05-02-04 at 23:17.
Reply With Quote
  #2 (permalink)  
Old 05-04-04, 08:58
jmrSudbury jmrSudbury is offline
Registered User
 
Join Date: Oct 2003
Location: Canada
Posts: 573
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.
Reply With Quote
  #3 (permalink)  
Old 02-04-12, 13:27
EddyJawed EddyJawed is offline
Registered User
 
Join Date: Aug 2005
Location: Manchester, England
Posts: 3
Convert to Snapshot file first

Hello Anthony,

Unfortunately what you want can't be done. Apparently there is no method of showing a Report in a Form, although you could show a form in a report.

The only solution you have is to convert the report each time into a snapshot file using code similar to this:

DoCmd.OutputTo acReport, "RptToBeConverted", acFormatSNP, GetCurPath & RptName & ".SNP"

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.
Reply With Quote
  #4 (permalink)  
Old 02-05-12, 07:19
jmrSudbury jmrSudbury is offline
Registered User
 
Join Date: Oct 2003
Location: Canada
Posts: 573
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.
__________________
John M Reynolds
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On