2
Answers

All Pages are not printing in Client Side Printing

Shaiwal Tripathi

Shaiwal Tripathi

9y
593
1

I am working on a Web Project in Asp.net with crystal reports.

I am trying to print crystal report using javascript. Everything is fine but when there is multiple pages in crystal report it's not printing all pages. Printing only single Page.

Here is my javascript code

function Print() { var dvReport = document.getElementById("dvReport"); var frame1 = dvReport.getElementsByTagName("iframe")[0]; if (navigator.appName.indexOf("Internet Explorer") != -1 || navigator.appVersion.indexOf("Trident") != -1) {                 frame1.name = frame1.id;                 window.frames[frame1.id].focus();                 window.frames[frame1.id].print(); } else { var frameDoc = frame1.contentWindow ? frame1.contentWindow : frame1.contentDocument.document ? frame1.contentDocument.document : frame1.contentDocument;                 frameDoc.print(); } return false; }
Please help guys....

Answers (2)