4 Replies Latest reply: May 15, 2014 10:08 AM by Fairfield _ RSS

    How to capture a subreport

    Fairfield _

      This report is vexing It was fairly straight forward until I got a new request today to extract more information.  The first 15 lines or so are OK.  but then near the end of each section is something like this.


      AB 01 0000 0000001234                      ABCD

      CD 02 0000 00000000000004321           EFGI

      EF  03 0000 000000000005678              JKLM


      There may be 0 to 30 or so of these kinds of lines.  They are really accounts related to the customer which involves the first 15 or so lines.  In other words this is similar to a subreport in Access or Reporting Services.


      How do I capture these lines?



        • How to capture a subreport
          Fairfield _


          Forgot to mention that I am using version 8


            • How to capture a subreport
              Fairfield _

              After playing with this some more the only solution that I can come up with is to make a detail template using the sub report lines.  Then use an append template on the first line that really defines the beginning of each main section.  This will be missing the ones that don't have sub report lines.   I will export this to SQL Server and also the original report that has all the data except the sub report lines.  Then I will merge the two in SQL Server and hopefully have what is wanted.


              I'm sure Monarch has a simple way to do this but I haven't found it yet.


                • How to capture a subreport
                  Olly Bond

                  Hello Fairfield,


                  There are two approaches that could help you solve this in Monarch. You don't mention whether you're using Monarch Pro or Monarch Standard - which will affect the options open to you here. I'd recommend, as ever, getting Monarch v10.5 Pro so you aren't constrained.


                  If the subreport data appears below the detail, and appears on every record, then you should be able to capture it using a footer template. If it doesn't appear on every record, then you may be able to capture it using the "guru trap" - which is an append template that uses the same trap characters as the detail  template.


                  If that won't work (and variable formatting, page breaks and other glitches can complicate it) then your approach of a second model, that uses the subreport as the detail and an append template to pull in the relevant key, is correct. You don't need to export to SQL Server, just output an MDB file.


                  Then open the report again, and (this needs Monarch Pro) trap the detail as normal, and from the table window make an external lookup to the MDB file you created in step one.


                  Best wishes,