Creating a report from a subform

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ever Improving
    New Member
    • Oct 2012
    • 11

    #1

    Creating a report from a subform

    I have created a report from a subform. However, there is one nuance I have not been able to formulate. To give a little background. I have a table (Managers) and table (Staff). The main form information is related to the managers table. While the sub form is related to the staff reporting to that manager. It all works fine, except that I would like to create individual reports for each manager, rather than one continuous report that includes all the managers in the organization. Can anyone offer any suggestions on how to make this happen? Thanks.
  • TheSmileyCoder
    Recognized Expert Moderator Top Contributor
    • Dec 2009
    • 2322

    #2
    One approach could be to create first a report of managers, and have the staff as a subreport.

    Finally open the manager report while applying a filter to select only one manager.

    Comment

    • Rabbit
      Recognized Expert MVP
      • Jan 2007
      • 12517

      #3
      Group by manager and use a page break.

      Comment

      • Ever Improving
        New Member
        • Oct 2012
        • 11

        #4
        Thanks to both The SmileyCoder and Rabbit. I'll try your suggestions and report back.

        Comment

        • Ever Improving
          New Member
          • Oct 2012
          • 11

          #5
          Would someone be so kind as to provide an example of how to filter from the example I cited with the manager report and staff report , so that only, one, not all the managers appear on the report.

          What would be great is if I could put a combo or listbox on the form and have the person select the manager and have only his / her report and subreport appear and ready to print. Or even a pop-up criteria box would suffice. I tried to filter the report by using this code:=([Manager Last Name]) in the "Filter" property in the data tab. However, I just keep getting a syntex error. I also tried just including one name in the query grid criteria. This did indeed limited the query to pull only one record. However, the report continues to list all the records. Any guidance on this matter would be greatly appreciated.

          Comment

          • NeoPa
            Recognized Expert Moderator MVP
            • Oct 2006
            • 32669

            #6
            Asking for specific code is not really allowed, but hopefully you'll find enough concept information in Example Filtering on a Form to help you on your way. We can comment on your existing code for you, but simply doing it for you isn't what we do (generally). Hopefully though, the examples and explanation in the linked article will be exactly what you need.

            Comment

            • Ever Improving
              New Member
              • Oct 2012
              • 11

              #7
              NeoPa Thanks for the info. Will let you know how it turns out.

              Comment

              Working...