AnsweredAssumed Answered

Summary Report - Multiple Product Types

Question asked by mikethecreative on Jun 8, 2012
Latest reply on Jun 9, 2012 by mikethecreative


Summary Report - Multiple Product Types & Layouts


I have a database that sells various Product Types; Shirts, Pants, Jackets, etc. Each Product Type has various specifications that are unique to that Product Type. I want to created a Summary Report that lists out each Product Type (or "Line Item") with it's various specifications in a multipage PDF.



Order #557

Item #1  Shirt  Blue
Item #2  Jacket  Black
Item #3  Shirt  White


When I click my "Summary Report" button, I want the script to go to "Item #1" and realize that it is a "Shirt" (based off the Product Type) and go to "Layout - Shirt" and create a PDF with that ONE LINE ITEM and that ONE LAYOUT. Then, I'd like the script to go to "Item #2" and realize it is a "Jacket" and go to "Layout - Jacket" and create AND APPEND a PDF to the previous PDF, and so on with each additional line item. I hope that makes sense.


I have created a Layout for each Product Type with it's own specifications, but the script I created doesn't seem to work; each "Layout" contains every Line Item in the Order. So for the above example, instead of the Summary Report being 3 pages long, it ends up being 9 pages long with each Line Item being represented on each Layout. I've tried so many combinations of different variables but nohting works.


What am I doing something wrong? I've tried for hours and hours and my head is hurting. Heeeeelp...