Results 1 to 3 of 3
  1. #1
    f15e is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Mar 2016
    Posts
    75

    Dynamically Adding Sub-Report into Main Report

    I don't know if this is possible but hoping someone could steer me in the right direction. I want to be able to create a new report and then insert it into an existing main report all done dynamically. The main report currently has 8 sub-reports in it. I believe I can create a new report but I'm not sure how to then insert it to the bottom of the the main report.

    To give a little background on why I'm trying to do this:
    I have created a Structural Weight Control Report Database. The sub-reports within the main report are based on an Area and computations, graphs, reports, etc., can be generated from the DB. For example, an offshore platform that consists of different areas such as Main Deck, Cellar Deck, Heli-Deck, etc. I want to allow a user to be able to add a new Area to the DB and when the new area is created, a sub-report is dynamically created and then inserted at the bottom of the last sub-report in the main report. Like I said, I don't know if this is even possible but hoping someone can tell me if it is or not and maybe some pointers on how to do it.

    Thank you.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    i would have the subreports already there and invisible.
    when I want one to show
    subRptCellar.visible = forms!myForm!chkCellar.value

  3. #3
    f15e is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Mar 2016
    Posts
    75
    Thanks for your reply ranman256.
    Cellar was just an example. In reality, I would not know ahead of time what new area the user would add and therefore could not have a subreport available and hidden ahead of time. It is not practical to have a subreport for every possible area plus the name of the areas may differ depending on Client. This is the reason I am asking about creating these subreports from scratch programmatically and then adding it as the last subreport in the Main Report.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 06-24-2016, 06:59 AM
  2. Replies: 2
    Last Post: 03-31-2015, 03:32 AM
  3. Report Width - Scaling dynamically
    By RonL in forum Reports
    Replies: 5
    Last Post: 06-30-2013, 07:44 PM
  4. Replies: 1
    Last Post: 03-07-2012, 09:00 AM
  5. Replies: 0
    Last Post: 10-24-2008, 11:20 AM

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