Print Page | Close Window

Duplex Printing in Crystal Report Dot Net

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=1617
Printed Date: 15 May 2024 at 10:12pm


Topic: Duplex Printing in Crystal Report Dot Net
Posted By: kaled
Subject: Duplex Printing in Crystal Report Dot Net
Date Posted: 03 Nov 2007 at 12:18am
hello friend
 
 
i need help  to print my report details in front and back side of singl paper.
 
 
i am using vbdotnet 2005 and i have one report to  print Registration details on the front of report and instructions  on back of the report
 
the printer i have is support Duplex  printing. but the problem how to do this in crystal report.
 
please help cause i suffer alot.
 
 
thanks all.
 



Replies:
Posted By: wattsjr
Date Posted: 05 Nov 2007 at 12:05pm
Hi kaled,
 
Since you are using VB.NET you probably have a couple of options.
 
The 1st is inside the CR developer.
1. right-click anywhere on the report and select "Designer" then select "Printer Setup..."
2. Select the printer that you want to print to and click the "Properties" button.  Since you have probably used the printer before, the rest should be familiar to you.
 
From a VB.NET standpoint, I think that you might be able to use the "PrinterDuplex" option within your "ReportDocument.PrintOptions" coding.
 
Regards,
 


-------------
-jrw


Posted By: senglee
Date Posted: 17 Jan 2008 at 4:28pm

Here was how I did it using vb.net and crystal reports.

1. In the report, create a seperate detail section to hold your second page.  Crystal will see it as Details a & b.  In section a, set the new page after property.  This will cause the second page (details b) to print on a seperate page. 

2. Ok. The next step is to programmically tell your printer to print in duplex.  Study the code below and modify it to suite your needs.

               ' Declare an object of your report.
                Dim objReportObject As New rptTheDailySavings

                'Declare a printoptions object of the objReportObjects print option.  Set the settings.
                Dim PrintOptions As CrystalDecisions.CrystalReports.Engine.PrintOptions = objReportObject.PrintOptions
                PrintOptions.PrinterName = "Your Printer Name Here"
                PrintOptions.PaperOrientation = CrystalDecisions.Shared.PaperOrientation.DefaultPaperOrientation
                PrintOptions.PaperSize = CrystalDecisions.Shared.PaperSize.DefaultPaperSize
                PrintOptions.PrinterDuplex = CrystalDecisions.Shared.PrinterDuplex.Default
                PrintOptions.PaperSource = CrystalDecisions.Shared.PaperSource.Auto

                ' Send the report to the printer.
                objReportObject.PrintToPrinter(1, False, 1, 2)

 

Hope this helps.



Posted By: adelr5
Date Posted: 17 Jun 2014 at 10:26am
Am using Datacard printer and i use the code above when i print the front side printer ask me to flip the card to the other side, crystal report and vb.net ... the code is working fine with HP colored printers, but when it comes to Datacard printer C800 ;-(

any one can help in this ?



Print Page | Close Window