Msg#: 4475734 posted 1:12 am on Jul 15, 2012 (gmt 0)
I'm trying to figure out the proper way to construct and print multiple work order reports - all at once.
I'd like to also be able to print multiple work order reports by...
1. populating the hidden div container with the next work order data 2. appending or adding the div container and contents to some variable or structure 3. keep populating and appending the div container to the variable or structure until all selected work orders are processed 4. use either the same printElement plugin or some other method to print all the stacked work order divs (sheets) at once - one work order per sheet.
I'm thinking i have the right idea or approach, but i would appreciate some further insite on this issue.
Msg#: 4475734 posted 5:29 am on Jul 15, 2012 (gmt 0)
Once you start getting into multi-page printing you start getting into such things as working out where the page break should be etc. it can get messy fast.
It sounds like you are trying to change a process that works fine for a single work order, but would be a bad fit for multiple work orders.
I would actually rather use a design where the work orders are marked as ready for printing in the back-end and when the user is ready they click on print all pending work orders and you call another page which then gets all those work orders and formats them or even have a back-end report generator that formats them.
Other than the single print button already on the work order add/edit entry form that when clicked pops up the browsers print dialog, the user has two screens where they could (once its programmed) mark or check each work order they'd like to print. One is the calendar dispatch board page and the other is the work order list grid page.
In any case, it sounds like what your saying is that instead of stacking each work order into one structure or variable or hidden div with page breaks in between each, you think it would be simpler to as you say "have a back-end report generator" function that formats and prints each selected work order directly to the printer one at a time automatically eliminating the need to manage page breaks.
From what i've been reading, it looks like there is no way to print directly to the default printer without the printer popup dialog in any browser.
This would imply that appending multiple formatted report div containers with page breaks inserted in between each into a variable or structure that could be used by something like the printElement plugin would be the only option.