7 Replies Latest reply on May 6, 2013 1:28 PM by rgordon

    Printing static form with multiple portals and many related records

    flybynight

      I have a form that must remain somewhat static - that is the info always stays in the same place, so no sliding/moving/resizing of fields.

       

      My layout is based on the JobTicket, which can have multiple related Jobs (child table) on it.

      Due to the amount of info, there are 3 portals - all showing records from Jobs. Basically 3 sections of info for different production groups. Each portal has 10 rows with no scroll bars - because it's only mean to be printed, not used for input. The user never deals with this layout directly. It is only called as a "Print Job Ticket" script.

       

      I'm looking for the most efficient way to print this out, when there are more than 10 records. In those cases, the ticket will have multiple pages (1 of X, 2 of X, etc.)

       

      One idea I had was to make the portals filtered based on a variable that the script would set and iterate over to print each page.

      Show only if JobPartNumber is in the range of the current page being printed. For instance 1-10, 11-20, 21-30, etc. A Ceiling(JobPartNumber / 10) calc minus the iteration loop, etc calc should do the trick.

       

      I think this would work, as long as I can print without a dialog… I just think that having a dialog pop up for each page of the ticket would get too confusing for my users. The other issue is that if for some reason we want to allow them to preview the layout before printing, it could only show one page at a time. Same issue with making a PDF - instead of a 3-page PDF, it would result in 3 1-page PDFs. Not ideal.

      I'm also not sure how I could easily print multiple copies, if desired by the user, other than to add another loop iterating over the whole thing for the user input number of copies to print.

       

      Anyone have an idea for a more elegant solution that would just result in a single print-stream of the desired number of pages? I also need it to print the 1 of X, etc somewhere on the layout.

       

      Since I have 3 rows of portals, I couldn't see a way to do this as a list view based on the Jobs table. If I could have multiple "body" parts to my layout, that would solve the issue, but I don't think that is an option?

       

      Thanks!

      -Shawn