2 Replies Latest reply on Dec 12, 2011 1:57 PM by matronryan

    how to do a report with that includes sub records

    matronryan

      Title

      how to do a report with that includes sub records

      Post

      I have a product table and a related sub product table.  I want to be able to run a report that lists the products and where a product has a sub product/s list those below the product.  Where a product has more that one sub product the report only displays the first subproduct.  

      I've also tried using a portal in the report which works but that means I have to set the portal size for the maximum number of sub products and this looks very messy for products that have none or one subproduct

       

      Any help greatly appreciated

      Thanks 

        • 1. Re: how to do a report with that includes sub records
          philmodjunk

          If all products had at least one related sub product record (even if it's blank except for the key field), you could base your report on the sub product table and include related fields from products, but this excludes the products that do not have a sub product record.

          Your portal approach can work if you set your portal to "slide up" , "Resize enclosing part" in the sliding & visibility section of the Inspector's position tab, provided that you do not the fields within the portal to adjust field height for differing amounts of text. (The portal will shrink/slide, but not the rows inside.)

          Key facts about sliding layout objects:

          1. It's only visible in preview mode and when you print/save as PDF...
          2. All layout objects below and in the same layout part as the slide/resize field need to also be set to slide up and resize.
          3. Objects in headers and footers will not slide.
          4. Portals will shrink/slide to fit the number of rows of records, but fields within the portal row will not shrink/slide.
          5. Container fields will slide only if Top, Left alignment is specified for it in the data formatting section of the Inspector's data tab.
          6. Consistent side borders are difficult to achieve with sliding fields.
          • 2. Re: how to do a report with that includes sub records
            matronryan

            Excellent solution - thank you!