1 Reply Latest reply on Jul 15, 2011 10:45 AM by philmodjunk

    How can I structure this layout report...?

    lymetyme24

      Title

      How can I structure this layout report...?

      Post

      Hello All -
      I'm an intermediate developer creating a database for a small business. I'm having trouble achieving what I hope to with the way I want to display line items on an invoice:

      The way this company works, there may be 50 line items on an invoice. Some of them have "sub-line items" associated with them, some do not. So I'm trying to figure out how to create a report (which will be printed as the invoice that gets sent to clients) that shows all the line items... and then IF a line item has "sub-line items", then they show up directly underneath that specific line item.

      What I'm trying to get it to look like is something resembling this:

      Line Item 1
      Line Item 2
      Line Item 3
      - Sub-Line Item 3
      - Sub-Line Item 3
      - Sub-Line Item 3
      Line Item 4
      Line Item 5
      - Sub-Line Item 5
      - Sub-Line Item 5
      Line item 6
      Line Item 7
      ...and so on

      I just can't wrap my mind around how to structure the layout for the report. If I use "Sub-Line Items" as the BODY... then only Line Items that have "subs" will show up. If I use "Line Items" as the BODY... then how do I get the "Sub-Line Items" to show up?

      Any help would be greatly appreciated. I feel like there is an answer, I just have coders block.
      Thanks.

        • 1. Re: How can I structure this layout report...?
          philmodjunk

          I see you are trying to avoid using portals in your layout. That's a good idea, but in this case you may want to try using them for your sub line items and base your report on the line item table. You can make the portal many rows tall and set it to slide up|resize enclosing part.

          The other option I can think off requires adding a "dummy" sub line item record for all lineitems that do not already have at least one sub line-item. Such a record could have all fields blank on this layout and the fields can be set to slide up/resize. That's possible, but seems messier to me than using a slide/resize portal here.