Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    swicklund is offline Novice
    Windows XP Access 2003
    Join Date
    Jul 2009
    Posts
    24

    Merging Reports??

    I have a number of reports that are the maintenance schedules for different pieces of equipment. I have a form set up w/ check boxes to select the specific pieces of equipment for a given project. What I would like to do is to pull all of the individual reports for the check boxes selected, into one (1) multi page report.



    Any thoughts on how this can be done??

  2. #2
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    create a main report, include all reports as subreports.

  3. #3
    swicklund is offline Novice
    Windows XP Access 2003
    Join Date
    Jul 2009
    Posts
    24
    I thought of using sub-reports, but do not know how to limit which ones will be 'called up' based on Boxes checked on my form..

  4. #4
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    there is no simple method - so you are going to need to determine which approach works for your situation.

    if these are for printing always - - then there is no need to attempt to merge them into a single report - simply fire/print them sequentially - and the person scooping up the paper at the printer won't know nor care that they came from individual reports.

    if it is electronic - - then 1 choice is to normalize the schedules with a master schedule - - that contains every column/field. an individual schedule does not have to have data in every column of course. then assemble your data at the query level - and make a report off that that groups by "subschedule" name....

    the 2 choice - suggested by Weekend - is to make a master report containing all subreports....For any specific piece of equipment they will use some subreports but not others. If there is no data for a subreport - make it not visible when the report is formating. With the CanShrink property the report will downsize as needed. Getting the layout & linebreaks to be efficient in every iteration will be a bit tricky.

    Finally - don't overlook the possibility of using WordMerge. Where the multipage form can be in Word - and you use Access to provide the data. All of the same issues still exist. But it can have a benefit wherever there is alot of boilerplate info that users need to tweak.

    Hope this helps.

  5. #5
    swicklund is offline Novice
    Windows XP Access 2003
    Join Date
    Jul 2009
    Posts
    24
    Getting Closer.

    I am going with the the subreport method, and am planning on using page breaks to help with formatting. Now there are just two (2) more things that I need help with.

    1: I am trying to use the DefaultControl Property to set the visibility of the sub reports that I do not want to be visible to "NO". I remember doing this many years ago to set the color of text based on selections made on a form.

    2: Is there something similar to DefaultControl that I can use to not use the page breaks based on conditions in the form.

    Thank you,

  6. #6
    swicklund is offline Novice
    Windows XP Access 2003
    Join Date
    Jul 2009
    Posts
    24

    Setting Visibility

    I am trying to set the visibility of a subReport based on information selected in a form. I am using the following code to set the visibility, but am getting an "OBJECT REQUIRED" error when I click on the Open Report Button.
    rpt.stDocName!subReport1.Visible = False

    stDocName is the Name of the report
    subReport1 is the Name of the Sub Report
    I know the solution is simple to this, and am pulling what is left of my hair out trying to figure it out.

  7. #7
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    what is rpt?

  8. #8
    swicklund is offline Novice
    Windows XP Access 2003
    Join Date
    Jul 2009
    Posts
    24
    I thought rpt was short for Report...

  9. #9
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    does it work? if not, think about changing it.

  10. #10
    swicklund is offline Novice
    Windows XP Access 2003
    Join Date
    Jul 2009
    Posts
    24
    No, it does not work. I have tried changing the code to:
    Report.stDocName!subReport1.Visible = False
    but it made no difference.

    I am still getting the same error. The report opens, I get a pop up window that says "OBJECT REQUIRED", and the sub report is still visible.

  11. #11
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295

    try tochange report.st... to report!st...
    Report!stDocName!subReport1.Visible = False

    or just use
    subreport1.visible=false

  12. #12
    swicklund is offline Novice
    Windows XP Access 2003
    Join Date
    Jul 2009
    Posts
    24
    No difference, with the exception of using the final suggestion. That one gave a Compile error....

  13. #13
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    subreport1 should be the object name of sub report, not the report name.

  14. #14
    swicklund is offline Novice
    Windows XP Access 2003
    Join Date
    Jul 2009
    Posts
    24
    I am grasping at straws here, but could it have something to do with opening a report in Preview mode before trying to make the sub report not visible?

  15. #15
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    time for a sanity check.

    1. set up so you have data in all subreports - everything visible - and run that to make sure that is ok. (don't proceed to you get this working).

    2. then, while there is data for a subreport; attempt to run your report but with that subreport to be not visible. to do this use the OnFormat event (not the subreport property) and:

    Me.SubreportName.visible=False

    get that to work. just as a sanity check trial.

    3. then, get your logic going to make a subreport not visible only if there is no data. In VB Help take a look at the HasData method. you will be able to use the same OnFormat event and with an if/then approach and HasData - make subreports not visible when there is no data.

    Hope this helps.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. merging two fields
    By brandon in forum Access
    Replies: 5
    Last Post: 06-09-2010, 08:17 AM
  2. merging PDF files
    By cuzza69 in forum Programming
    Replies: 1
    Last Post: 01-29-2010, 07:13 AM
  3. Merging 2 tables
    By todavy in forum Queries
    Replies: 4
    Last Post: 12-02-2009, 10:12 AM
  4. Merging
    By bailey537 in forum Queries
    Replies: 0
    Last Post: 07-14-2009, 04:14 AM
  5. Merging values in Access
    By jains in forum Forms
    Replies: 0
    Last Post: 06-08-2009, 09:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums