First we have to start with the structure of your tables and relationships. Do you have this typical structure for your invoicing?
If you have that structure, you can base your layout on the LineItems table with your rows of line items fields placed in the body of the layout. By not printing from a portal layout, it not only is easier to print invoices with very different length lists of items purchased, but you can use sliding fields to adjust for the different amounts of text found in the description fields.
1) Make the height of the text fields enough rows of text tall to fully display the largest description. YOu may want to play it safe and go a few rows more than that to allow for future descriptions of even greater size.
2) For this field and all fields and other layout objects along side or below it while still part of the same layout part, use the sliding and visibility section of the inspector's position tab to specify that the fields "slide up" and "resize enclosing part."
Key facts about sliding layout objects:
- It's only visible in preview mode and when you print/save as PDF...
- 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.
- Objects in headers and footers will not slide.
- Portals will shrink/slide to fit the number of rows of records, but fields within the portal row will not shrink/slide.
- Container fields will slide only if Top, Left alignment is specified for it in the data formatting section of the Inspector's data tab.
- Consistent side borders are difficult to achieve with sliding fields.
Ok, that sounds good, BUT....
If I max out the row height and slide up, then for example, I could only include 5 rows per page. IF each of the first five rows on page 1 were all short descriptions, then I would have a big blank space below the items on page 1, and no way to bring in items 6-10 from page 2.
Am I understanding this correctly?
This will not happen if you specify "resize enclosing part" in the sliding and visibility section. This option is intended to remove the unused white space from your report.