Solved

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

Posted on 2013-11-09
9
1,669 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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Hi, I have heard from my friends that it’s not possible to create Label Printing report using SSRS. I am amazed after hearing this words not possible in SSRS. I googled lot and found that it is possible to some of people know about the Report Bui…
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 …
This video discusses moving either the default database or any database to a new volume.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

743 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

14 Experts available now in Live!

Get 1:1 Help Now