Solved

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

Posted on 2013-11-09
9
1,685 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
DataGridView Events ? 3 37
Get id from json Data with NewtonSoft 3 34
Run time Error 4 34
ASP.NET 5 Templates 2 66
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…
Introduction Earlier I wrote an article about the new lookup functions (http://www.experts-exchange.com/A_3433.html) that ship with SQL Server 2008 R2.  In this article I’m going to show you another new feature of SSRS 2008 R2, this time in the vis…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

895 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now