Is it possible to print rdlc report automatically? RRS feed

  • Question

  • User166705649 posted

    I'm using .rdlc report in my web application, exporting report to pdf & print it works great but now i wanted to print report automatically(i,e on click of print button.)

    Please help me

    Wednesday, October 10, 2012 6:41 AM


All replies

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, October 15, 2012 2:18 AM
  • User-8475372 posted

    Dear User, 

    Complete step by step explanation and code snippet : 


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, October 15, 2012 2:55 AM
  • User2088646281 posted

    There is no way to print the rdlc report in all three browser Mozilla,Chromeand IE

    Please help me if any body know the way.

    I am using the below code:

     function first_Click() {
            //open new window set the height and width =0,set windows position at bottom
            var a = window.open('', '', 'left =' + screen.width + ',top=' + screen.height + ',width=0,height=0,toolbar=0,scrollbars=1,status=0');
            //call print
            return false;

    It is working in all 3 browser but it have the styles problem like table style,color etc.


    Wednesday, April 3, 2013 11:22 AM
  • User-1185172246 posted

    To avoid style and layout issues when printing a RDLC report you cannot just print the HTML generated by the reporting engine. Each browser will accomodate elements and apply styles differently. The only way to get a common and unique output printing from a RDLC report is to export it to PDF and print it. Of course, with the built-in functionalty on RDLC, this involves the user to be presented with the PDF document and then print it i.e. many steps/clicks are required by the end user. But this article shows you a way to print a RDLC report wihtout extra steps and that works in all browsers (IE, Chrome, Firefox, Opera & Safari). You can use that code or get an idea of how to do it by yourself.

    Thursday, April 4, 2013 8:45 AM