Solved

How to print a  .rdlc (SSRS) report as duplex mode ?

Posted on 2013-11-09
9
1,704 Views
Last Modified: 2013-11-26
Hi,
  I need to print the report (.rdlc) in duplex mode. The report viewer always print the report in  ' Simplex mode'. I need to print my report in Duplex mode.

I have already rendered the report in to PDF.

Here is it:
 byte[] bytes = reportViewer1.LocalReport.Render("PDF", null, out mimeType, out encoding, out extension, out streamids, out warnings);

This report contains images as well as charecters !

If the report contains more than one page, i need to print it on the page one back side .
eg:

page 1 - paper 1 front side
page 2 - paper 1 back side
page 3 - paper 2 front side
page 4 - paper 2 back side.....................etc.

How can I print this report in Duplex Mode ...?
Any suggestions would be appreciated !

Thanks in advance. :)
0
Comment
Question by:TaibaDXB
  • 4
  • 2
9 Comments
 
LVL 37

Expert Comment

by:ValentinoV
ID: 39643893
What code are you using to print the PDF?  Because that's probably what you should be looking at...  Once you've called the LocalReport.Render method and rendered a PDF, it's no longer in the hands of SSRS...
0
 

Author Comment

by:TaibaDXB
ID: 39654122
Thanks ,
Printing is working fine after it render to pdf (in Duplex mode). But I need the same to be from the SSRS.

Can we able to set the Duplex Printing mode in the Report (rdlc) itself,
Is it possible ..?

Thanks again for your quick reply .! :)
0
 
LVL 37

Expert Comment

by:ValentinoV
ID: 39654516
What exactly do you mean with "But I need the same to be from the SSRS"?  Are you referring to the Print button in the Report Viewer?  If you click the print button there, you get a Print Dialog popup.  Through that popup you can change the printer properties, including double-sided printing.  But it actually doesn't have much to do with SSRS itself...
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

Accepted Solution

by:
TaibaDXB earned 0 total points
ID: 39673645
First of all thanks for your support,

Actually I am not showing the report viewer to the user to select the printing options. There is only one print button (Windows Application ) for the user to perform the printing action and all the functionality that I mentioned above will do internally by code.

I got the solution from here  :
http://msdn.microsoft.com/en-us/library/ms252091.aspx

I just tuned some logic from this code to perform the duplex mode printing and setting the paper size, and its works fine! !!

Thanks......!    :)
0
 

Author Comment

by:TaibaDXB
ID: 39677317
I've requested that this question be closed as follows:

Accepted answer: 0 points for TaibaDXB's comment #a39673645

for the following reason:

This walkthrough shows how to programmatically print a report without viewing it, using the LocalReport object and the CreateStreamCallback callback function.
0
 

Assisted Solution

by:TaibaDXB
TaibaDXB earned 0 total points
ID: 39676674
For the Printing  (for me it's A5 paper)  =>

     printDoc.DefaultPageSettings.PaperSize = new PaperSize("PaperA5", 583, 827);
     printDoc.DefaultPageSettings.Margins = new System.Drawing.Printing.Margins(0, 0, 0, 0);
     printDoc.PrinterSettings.Duplex = Duplex.Vertical;
     printDoc.PrintPage += new PrintPageEventHandler(PrintPage);
     printDoc.Print();

Thanks, :)
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hi All, I am here to write a simple article to move SSRS (SQL Server Reporting Services) reports from one server to another. When I have faced the same issue to move reports those were developed by developer on development server and now need to …
Introduction In the following article I’ll be discussing and demonstrating several different ways of how images can be put on a report. I’m using SQL Server Reporting Services 2008 R2 CTP, more precisely version 10.50.1352.12, but the methods ex…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question