Solved

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

Posted on 2013-11-09
9
1,754 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Major Incident Management Communications

Major incidents and IT service outages cost companies millions. Often the solution to minimizing damage is automated communication. Find out more in our Major Incident Management Communications infographic.

 

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PowerShell: ForEach-Object Export to CSV 4 92
Adjust the codes 3 64
PowerShell: Adding ToGB to a script 4 76
XML XDocument extract - Keeping a node list like a menu path 8 34
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

752 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