Click here to Skip to main content
15,904,503 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
currently i am printing the report using java script but it prints only one page.but i want to print all pages which is available in crystal report viewer.



Any Help !!!

What I have tried:

Below is the Java script Code. it prints only one page which is showing in crystal report viewer.

<script type="text/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();
}
}
</script>
Posted
Updated 23-Jul-16 3:18am

1 solution

 
Share this answer
 

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



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