Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2013-11-09
9
Medium Priority
?
1,856 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
6 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
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 

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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

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 …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

783 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