Click here to Skip to main content
15,846,211 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +
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

JavaScript
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...
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900