SAP Knowledge Base Article - Public

1205464 - How to print color report pages in Black & White from a .NET application

Symptom

  • A report containing a number of colored objects needs to be printed in black and white only

Cause

  • The CR.NET SDK model does not have control over the color settings of the printer
  • Thus it is not possible to print the report using any methods available in Crystal Reports .NET SDK

Resolution

  • Install your printer twice
  • Change the color settings of the first printer to Color and the second one to Black & White
  • Use the 'PrintToPrinter' method available with the ReportDocument object model
Private Sub printReport(ByVal rd As ReportDocument)
    Dim localPrinter As System.Drawing.Printing.PrintDocument = New PrintDocument()
    rd.PrintOptions.PrinterName = "printer_name"
    rd.PrintToPrinter(1, False, 0, 0)
End Sub
 

Keywords

Forum thread, Print colour color and black white grayscale , KBA , BI-DEV-NET-SDK , .NET SDK / COM SDK , How To

Product

SAP Crystal Reports XI ; SAP Crystal Reports XI R2 ; SAP Crystal Reports, developer version for Microsoft Visual Studio