问题描述
目前我正在使用java脚本打印报告,但它只打印一页。但我想打印水晶报告查看器中可用的所有页面。
任何帮助!!!
我尝试过:
以下是Java脚本代码。它只打印一个在水晶报表查看器中显示的页面。
< script type =text / javascript>
函数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>
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>
推荐答案
这篇关于如何在ASP.NET Web应用程序中打印Crystal报表中的所有页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!