Direct Report Printing from Web Application

Hi,

Is there any way, we can implement in Web Report to directly print the Report to default Printer without preview. Sometime different documents like Invoice, Vouchers needs directly to be printed and doings this from Preview, it takes 2-3 clicks before its goes to print. Any idea.

Thanks.

Comments

  • edited 2:37AM
    web browser can do that, install add-ons 'Seamless Print'

    or google with keyword "kiosk printing"
  • edited 2:37AM
    Thanks Ipong, I have already added --kiosk-printing in Chrome shortcut but still I still need to preview the report and click print button select - Print From Browser and then it print directly to printer and open another tab/windows thru which google printed. To return back, need to closed that tab/window. Any further advise to get output silently right from Print Button on my Form - without getting preview.
  • edited December 2016
    yes, preview window still appears, but automatically print.

    create a shortcut with target location :
    "C:\Program Files\Google\Chrome\Application\chrome.exe" --kiosk-printing --allow-running-insecure-content --disable-scripted-print-throttling --disable-gdi-text-printing http://localhost/


    in firefox, install 'seamless print' add-ons , no preview window and automatic printing (i tried one year ago, don't know with current version of firefox and seamless print)
  • edited 2:37AM
    For experimental purpose

    1. asp.net code :
    FastReport.Web.WebReport wr = new FastReport.Web.WebReport();
    wr.SinglePage = true;

    2. html page :
    <input type="button" value="Print" onclick="btnPrint();" />
    <script type="text/javascript">
        function btnPrint () {
            var content = document.getElementById("frbody");
            var print = window.open("", "", "left=0,top=0,width=100,height=100,toolbar=0,scrollbars=0,status=0");
            print.document.write("<title>POPUP PRINT</title>" + content.innerHTML);
            print.document.close();
            print.focus();
            print.print();
            print.close();
        }
    </script>
    

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.