Crystal Report Print issue after Hosted in Server in ASP.Net

YacharuP
 
on Feb 28, 2017 03:46 AM
3656 Views

Hi Guys,

I need to print a report using crystal report through a system connected printer. Well, it's working fine in my system but when i hosts my application through IIS server then the report is not printing at all in another system i.e. connected to a printer

Please help me...

Download FREE API for Word, Excel and PDF in ASP.Net: Download
Andrea
 
on Feb 28, 2017 03:46 AM
Hi @YacharuP,
Please try the following

Crystal Report ReportViewer execute in ASP.Net Medium trust level on Hosted server

It might help you.

Cheers Andrea.
YacharuP
 
on Feb 28, 2017 03:49 AM

@Andrea

Not Much Information:(

dharmendr
 
on Feb 28, 2017 08:10 AM

Hi Yacharup,

Are you able to preview the report using crystal report viewer?

YacharuP
 
on Mar 01, 2017 05:49 AM

Reports are generating and even printing in printer on button click event on localhost but when hosts the website the report loads there too but there is no response at all on button click event to print...

Please Help Me...

Thank You

YacharuP
 
on Mar 08, 2017 10:12 PM

 

<script type="text/javascript">
        function Print() {
            for (var i = 0; i < frames.length; i++) {
                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();
                }
            }
        }
</script>

This function worked for me to print multiple pages...