I am successfully using this method to send a report to a local printer from the client, but I have a situation where I need to send multiple reports. My application uses a signature scanner to grab a clients signature and then needs to print a number of separate reports with that signature on them. I've tried a number of methods but none of them work, printing only the last report that was sent. is there a way to do this?
I am using HttpContext.Current.ApplicationInstance.CompleteRequest() instead of Response.End() since Response.End() terminates further processing of the page.
Here's what I've tried so far,
- Create a single ReportProcessor and doing a BinaryWrite of each RenderingResults to it, followed by one CompleteRequest
- Create a single ReportProcessor and doing a BinaryWrite followed by a CompleteRequest for each RenderingResult
- Create a separate ReportProcessor for each RenderingResult with a BinaryWrite and CompleteRequest for each of them
- Create a separate ReportProcessor for each RenderingResult with a BinaryWrite followed by a single CompleteRequest
And so on... Nothing works. Is there a way to do this? Perhaps concatenating all of the reports into a single report, how would I do that?
Another problem is that after the page is finished, whether I am attempting to print one or more reports, I get this error,
Microsoft JScript runtime error: 'type' is null or not an object
It is on this line of code in an unknown script file (identified only by a long Hex number)
var etype = this.type = e.type.toLowerCase();
This appears to be related to the printing of the report, since it doesn't appear if I comment out all the printing related code.
Any help on this?