Edu_vz
asked on
Can't print B&W with Crystal Reports VS2010
Hi Everyone
I'm trying to force a Crystal Report to print black and white from Visual Studio 2010 but it is always printing in color. Any help with this is greatly appreciated.
Below is a sample of the code I'm using to print the report:
Dim myReport As New ReportDocument
Dim PrinterName As String = "HP Officejet"
Dim myPrinterSettings As New Printing.PrinterSettings
Dim myPagesettings As New Printing.PageSettings
myReport.Load("ColorReport .rpt")
myPrinterSettings.PrinterN ame = PrinterName
myPagesettings.Color = False
myReport.PrintToPrinter(my PrinterSet tings, myPagesettings, False)
Can anyone tell me what I'm missing here?
Regards
Edu
I'm trying to force a Crystal Report to print black and white from Visual Studio 2010 but it is always printing in color. Any help with this is greatly appreciated.
Below is a sample of the code I'm using to print the report:
Dim myReport As New ReportDocument
Dim PrinterName As String = "HP Officejet"
Dim myPrinterSettings As New Printing.PrinterSettings
Dim myPagesettings As New Printing.PageSettings
myReport.Load("ColorReport
myPrinterSettings.PrinterN
myPagesettings.Color = False
myReport.PrintToPrinter(my
Can anyone tell me what I'm missing here?
Regards
Edu
ASKER
Hi Guru
I should have been a bit clearer with my specification.
There is no user interface for changing the printer settings at runtime and I woudl have preferred not to have to manage to printer drivers for each printer (one set to color and one to B&W).
I just did a lot more digging on the Crystal/SAP site and the last suggestion there was to have 2 drivers as they do not seem to have the ability to manipulate the color option from VS.
If anybody has a solution for this via code, please let me know.
Regards
Edu
I should have been a bit clearer with my specification.
There is no user interface for changing the printer settings at runtime and I woudl have preferred not to have to manage to printer drivers for each printer (one set to color and one to B&W).
I just did a lot more digging on the Crystal/SAP site and the last suggestion there was to have 2 drivers as they do not seem to have the ability to manipulate the color option from VS.
If anybody has a solution for this via code, please let me know.
Regards
Edu
What version of Crystal?
Do you always want to print in black and white?
If so set the printer up that way when you design the report.
Another idea is to use a black and white only printer when you design the report. I designed several reports for a client not knowing they wanted to use a color printer. When I delivered the reports they loved them but needed color. I had to install their color printer driver and reset the reports to use it.
Are the reports designed with that printer as the default printer?
If not try setting that printer as the default printer then design the report. It may then be able to switch to black and white mode.
Crystal is very sensitive to the printer driver and seems to only allow changes to the things that the printer it was designed with can do. I designed many reports using a printer that couldn't duplex. The users in order to save some paper wanted to print duplex but couldn't until I changed the reports to use a duplex capable printer.
mlmcc
Do you always want to print in black and white?
If so set the printer up that way when you design the report.
Another idea is to use a black and white only printer when you design the report. I designed several reports for a client not knowing they wanted to use a color printer. When I delivered the reports they loved them but needed color. I had to install their color printer driver and reset the reports to use it.
Are the reports designed with that printer as the default printer?
If not try setting that printer as the default printer then design the report. It may then be able to switch to black and white mode.
Crystal is very sensitive to the printer driver and seems to only allow changes to the things that the printer it was designed with can do. I designed many reports using a printer that couldn't duplex. The users in order to save some paper wanted to print duplex but couldn't until I changed the reports to use a duplex capable printer.
mlmcc
ASKER
Hi mlmcc
I'm testing on a local HP OfficeJet that has color printing ability and it is set as the default printer on the report.
If I open the report in Crystal Reports and manually print it the print options for color/BW works when selected from the print options dialogue but if I print the same report through code it alwasy prints in color.
Regards
Edu
I'm testing on a local HP OfficeJet that has color printing ability and it is set as the default printer on the report.
If I open the report in Crystal Reports and manually print it the print options for color/BW works when selected from the print options dialogue but if I print the same report through code it alwasy prints in color.
Regards
Edu
I don't know what the solution is. I know there are some printer related fetures that don't seem to be supported by Crystal.
mlmcc
mlmcc
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This seems to be the only way to make this work.
Its not an optimal solution.
Its not an optimal solution.
http://uk.answers.yahoo.com/question/index?qid=20061109091829AACNU7s
Hope it helps.