Print Crystal Report

Hi Wisej,
How to print CrystalReport like that.
1. Link:
2. Code:
<script type=”text/javascript”>
function Print() {
    var dvReport = document.getElementById(“dvReport”);
    var frame1 = dvReport.getElementsByTagName(“iframe”)[0];
    if (navigator.appName.indexOf(“Internet Explorer”) != -1) { =;
    else {
        var frameDoc = frame1.contentWindow ? frame1.contentWindow : frame1.contentDocument.document ? frame1.contentDocument.document : frame1.contentDocument;
Thank you.
  • You must to post comments

Same way. button1_Click() { Application.Call(“print”); }

Assuming you have a javscript function print() and the ASP.NET Crystal Report viewer.

We usually use the PdfViewer instead since the pdf.js viewer is a lot better that the old ASP.NET viewer and the report rendering is a lot more accurate than HTML. You can view a crystal report with 2 lines of code.

  • Huỳnh Tấn Phát
    I see. But I can not get it. You can send demo using this script. Thank you so much.
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.