Printing Reports With ScriptX

In this sample, the form is posted to a hidden IFrame (width and height are 0).

The customised report is generated at the server (an ASP page) and delivered back to the browser within the hidden iFrame.

The ScriptX object is included in this parent document and has been initialised with all the parameters required for printing; headers, footers etc. When the frame is ready for printing, it performs the print.

How do we know the frame is ready? Because we are already using ScriptX within this 'parent' document, we can use another method within ScriptX to receive a notification that the iframe is ready for printing (onDocumentComplete) - by use of this technique the report to be printed does not need to include either ScriptX or client side javascript to send notifications, it is a 'pure' html document.

NOTE: This technique is not entirely reliable - if the server returns an error such as document not found rather than the report to be printed then the onDocumentComplete event will never fire and the report will not be printed. For this reason, a "printing in progress" UI is provided so that the user may cancel the print process.


Customise the report....

Select a printer to use:

Your name: 

 

Use of licensed features.

Why use licensed features, and what licensed features?

This sample uses a license to enable the following features:

Please wait for printing to complete.