SAP Knowledge Base Article - Public

1865589 - Error when printing from a 64 bit VS .NET application - Unregistered interface: ICRReportPrinterPageRange

Symptom

  • Using the SAP Crystal Reports SDK for Visual Studio .NET
  • Application compiled as 32 bit works with no error
  • Application compiled as 64 bit results in the error:

Unregistered interface: ICRReportPrinterPageRange

Environment

  • SAP Crystal Reports, developer version for Microsoft Visual Studio
  • Microsoft Visual Studio (2010 / 2012)
  • Microsoft Server 2008, 64 bit

Reproducing the Issue

 

Try
            Dim pDoc = New System.Drawing.Printing.PrintDocument
            Dim rasPROpts = New CrystalDecisions.ReportAppServer.Controllers.PrintReportOptions
            Dim printLayout = New CrystalDecisions.Shared.PrintLayoutSettings
            Dim rptClientDoc As CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument
            rptClientDoc = pj.ReportDocument.ReportClientDocument
            rasPROpts.JobTitle = pj.ReportTitle
            rasPROpts.PaperSize = pagesetting.PaperSize.RawKind
            rasPROpts.PrinterName = printersetting.PrinterName
            rasPROpts.NumberOfCopies = printersetting.Copies
            rasPROpts.Collated = printersetting.Collate
            rasPROpts.PaperSource = Convert.ToInt16(pagesetting.PaperSource.RawKind)
            rasPROpts.PrinterDuplex = printersetting.Duplex
            rasPROpts.PrinterName = printersetting.PrinterName
            rasPROpts.AddPrinterPageRange(printerSetting.FromPage, printerSetting.ToPage)
            rptClientDoc.PrintOutputController.PrintReport(rasPROpts)
        Catch ex As Exception
            Agilis.ShowMessage(ex.Message, Windows.MessageBoxButton.OK, Windows.MessageBoxImage.Error)
        End Try

Cause

  • This is a limitation of the 64 bit SDK for Visual Studio .NET
  • The PrintOutputController has a dependency on the PrintControll dll

Resolution

  •  The issue is resolved in Service Pack 6 for SAP Crystal Reports, developer version for Microsoft Visual Studio

See Also

Reference; ADAPT01608246

Keywords

printer crvs cr4vs 2010 2012 , KBA , BI-DEV-NET-SDK , .NET SDK / COM SDK , Problem

Product

SAP Crystal Reports, developer version for Microsoft Visual Studio