locked
Embedding a Report in a Form RRS feed

  • Question

  • It looks like a no go, at least via the subreport/subform wizard, but this is what I am trying to do.  I have a form with 4 (so far) interactive graphs.  The user changes dates, metrics, filters and formatting options and the results are instantly displayed on the form.  It works very well except for printing.   To allow for printing well formatted charts I have created clones of these graphs and popped them into reports.  With a few procedure calls the reports come up in print preview or are sent directly to the printer reflecting all the changes made on the form.  This works well enough, but creates some maintenance issues.  For the most part I can just copy and paste a revised chart from the form to the report.  I have structured my code in such a way that it will run from either source, but my preference would be to create and maintain a single chart on a report embedded on the form.  For good reasons I don't like have duplicate copies of the same thing.  To display the various report I'd use code to change the embedded report.  If I could do that it would eliminate about six problems and greatly simplify upkeep.

    Are there any magic trick that will let me do this?


    TIA, Paul

    Monday, August 13, 2012 3:39 PM

Answers

  • On the Forms Property box select the "other" tab.Set Pop up to Yes.

    the form will now float above other windows...


    Brian, ProcessIT- Hawke's Bay, New Zealand

    • Marked as answer by Dummy yoyo Wednesday, September 5, 2012 3:51 AM
    Wednesday, August 22, 2012 10:24 PM

All replies

  • Hi Paul,

    I don't believe you can place a report on a form as you suggest but others may have found some way to do so, perhaps manipulating the windows GDI?

    I think I would build the results to just display on the report with a smaller and simplified form as the criteria / filter.

    Then there is just the report to maintain...


    Brian, ProcessIT- Hawke's Bay, New Zealand

    Monday, August 13, 2012 10:54 PM
  • Well, maybe.  The current solution works so well giving instant feedback inside the same window (form).  If I never had to print these it would be just fine.  I think I am going to maintain the duplicate graphs.  Maintenance is just about as simple as copying and pasting the graph from the window to the existing report.  That is replacing the existing chart object in the report.  It's not that it's difficult, but it seemed worth investigating whether displaying the reports on the form was possible.  It probably is in a different programming environment,  but I have to work within Access' limitation for now.

    Thanks for your input.

    Paul

    p.s. Hawke's Bay, sounds devine.

    Tuesday, August 14, 2012 1:39 PM
  • Hi Paul,

    You could also consider writing an update routine in code that copies the properties from the form to the report. might take some iteration but could be an interesting project...

    Yes Hawke's Bay is very nice. -A gorgeous sunny and crisp winter morning!


    Brian, ProcessIT- Hawke's Bay, New Zealand

    Tuesday, August 14, 2012 8:51 PM
  • I'm back at it.  This time I am attacking it from the other direction.  I learned that a you CAN embed a form in a report.  I created a small form with only the filter contols and command buttons and embedded it in a report called reportMaster.  It fits just perfectly on the right edge of the report.  I created a subreport(reportChart) on in reportMaster containing the chart I wanted to manipulate.  After a lot of pushing and shoving all the pieces fit together. 

    Here's the hitch.  While I have access to all of my controls, the combo boxes drop down and each check box or option box clearly receives the focus when clicked on, I can't change any of the values.  For example, the combo box drops down, but nothing happens when I select a value.  The only thing that functions is the command button which  opens up reportChart in Print Preview.  This works perfectly.

    Any suggestions?


    TIA, Paul


    • Edited by Paul Hammond Wednesday, August 22, 2012 9:14 PM clarity and spelling
    Wednesday, August 22, 2012 9:01 PM
  • AFAIK you cannot do this.

    Chris Ward

    Wednesday, August 22, 2012 9:37 PM
  • Hi Paul,

    Well you learn something new everyday!

    Why not make your form a Popup? This will show over the Report -then use the after update events to requery the report?


    Brian, ProcessIT- Hawke's Bay, New Zealand

    Wednesday, August 22, 2012 9:40 PM
  • Brian, thanks, I'll try that.  I'm not familiar with a Popup.  Can you fill me in?


    TIA, Paul

    Wednesday, August 22, 2012 10:18 PM
  • On the Forms Property box select the "other" tab.Set Pop up to Yes.

    the form will now float above other windows...


    Brian, ProcessIT- Hawke's Bay, New Zealand

    • Marked as answer by Dummy yoyo Wednesday, September 5, 2012 3:51 AM
    Wednesday, August 22, 2012 10:24 PM