Skip to Content
0
Dec 10, 2022 at 12:27 PM

crystal report direct print preview problem in aspx page

214 Views Last edit Dec 15, 2022 at 02:41 PM 4 rev

When I'm pintting from Crystal Report to my Epson receipt printer or my Sato tags printer it ads blank space on top and after what it shows in the preview. When I'm printing from Visual Studio directly It's Allso happen and My Publish apps all having same issue, Previously working fine But Last 2 days Having Issue, I am Not Installing Any New Software or any thing For Where rinsing error

so it is not the printers.

<code> function Print() {
                      var dvReport = document.getElementById("dvReport");
                      var frame1 = dvReport.getElementsByTagName("iframe")[0];
                      if (navigator.appName.indexOf("Internet Explorer") != -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();
                      }
                  }

Before

image.png

after clicking direct print header is gone

image.png

Attachments

image.png (84.4 kB)
image.png (88.6 kB)