We create a single PO for a vendor, but inside that single PO, we may have items going to multiple of our manufacturing locations. This is sometimes necessary for price breaks from our vendors.
ie.
PO 12344 for Rodney’s Resin Corp.
Line 1 - Resin 1, we want this to be shipped to our Michigan location.
Line 2 - Resin 2, we want this shipped to our Texas location
Line 3 - Resin 3, shipped to our Michigan location
Etc
I want to split the pages on the PO so it will look something like:
Page 1 of 2 Ship to Michigan
Line 1
Line 3
Page 2 of 2 Ship to Texas
Line 2
Any recommendations on the best way?
I’ve started by sorting the PO into multiple PO records in the xml with the different headers. Using a master page, I’m having difficulty figuring out how to keep the multiple records in one document, as well as consistent page numbers across the entire po.
I would use the DataMapper to create separate detail tables for each of the locations.
That way, your data record would contain a single table for all items going to Texas, another one for items going to Michigan, etc. That will make it easier to create separate pages that simply display the contents of each appropriate table.
So if each ship-to is its own detail record, how do I get the designer to create a page for each detail record, with the detail information on the header, and the item table paging as need inside each ship-to page? I’m not sure how to set up the document this way.
Record (no fields on this level)
–Detail (this is where the PO and ship-to fields are)
– – Lines (all the line fields for this ship-to detail)
So you’re dealing with nested detail tables then, which adds a level of complexity that you could possibly avoid.
Depending on how much information is found in each of the Detail records, you may want to consider storing that information in each of the Lines records. This would eliminate one level of nesting (the Detail table) and would allow you to deal with a single table (the Lines table).
So essentially, the Lines table would contain fields like:
PO, SHIPTO, item, item description, item price, etc.
where PO and SHIPTO are the same for each line in that specific table. What you lose to redundancy, you gain in ease of use and management.
Here’s a rough mockup showing what I’m trying to accomplish. A single PO, but with the first ship-to line table overflowing into page 2, and both the Alabama and Quincy locations only having a single page, but the page numbering is for the whole document.
I can structure my xml whichever way is simplest to make the design the easiest, I don’t want to get hung up on that.
What’s the best/simplest way to make my form do this? (and from that the xml?)