I am using CR4E 2.0 update 3 and tried to export a report that includes a text formatted with a barcode font (Code39).
When I export the report to PDF with the Crystal Reports Desinger it works fine.
When I export it in our application it generates a NullPointerException at the following line in my application:
exportStream = (ByteArrayInputStream) doc.getPrintOutputController().export(ReportExportFormat.PDF); Export failed: java.lang.NullPointerException com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: java.lang.NullPointerException---- Error code:-2147467259 Error code name:failed at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.if(SourceFile:237) at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:147) at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:128) at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:111) at com.gehcit.ccc.report.ExportReport.writeExportFile(ExportReport.java:222) at com.gehcit.ccc.report.ExportReport.export(ExportReport.java:192) at com.gehcit.ccc.report.ExportReport.runExport(ExportReport.java:127) at com.gehcit.ccc.report.ExportReport.main(ExportReport.java:582) Caused by: java.lang.NullPointerException at java.io.ByteArrayInputStream.<init>(Unknown Source) at com.crystaldecisions.reports.exporters.format.page.pdf.fontembedding.opentype.tables.ControlValueTable.if(SourceFile:58) at com.crystaldecisions.reports.exporters.format.page.pdf.fontembedding.opentype.tables.ControlValueTable.<init>(SourceFile:53) at com.crystaldecisions.reports.exporters.format.page.pdf.fontembedding.OpenTypeSubsetter.<init>(SourceFile:56) at com.crystaldecisions.reports.exporters.format.page.pdf.fontembedding.FontEmbeddingSession.a(SourceFile:352) at com.crystaldecisions.reports.exporters.format.page.pdf.fontembedding.FontEmbeddingSession.a(SourceFile:313) at com.crystaldecisions.reports.exporters.format.page.pdf.pdflib.r.a(SourceFile:1538) at com.crystaldecisions.reports.exporters.format.page.pdf.pdflib.PdfDocumentManager.if(SourceFile:350) at com.crystaldecisions.reports.exporters.format.page.pdf.dom.PdfAdvancedDocumentModeller.do(SourceFile:348) at com.crystaldecisions.reports.exporters.page.pdf.AdobePDFExporter.finalizeExportJob(SourceFile:235) at com.crystaldecisions.reports.formatter.export2.ExportSupervisorEx.if(SourceFile:652) at com.crystaldecisions.reports.formatter.export2.ExportSupervisorEx.a(SourceFile:586) at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.a(SourceFile:636) at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.int(SourceFile:672) at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(SourceFile:1942) at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:659) at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:165) at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(SourceFile:527) at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(SourceFile:525) at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(SourceFile:102) at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(SourceFile:523) at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(SourceFile:422) at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(SourceFile:350) at com.businessobjects.sdk.erom.jrc.a.a(SourceFile:54) at com.businessobjects.sdk.erom.jrc.a.execute(SourceFile:67) at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(SourceFile:716) at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(SourceFile:125) at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:537) at com.crystaldecisions.sdk.occa.report.application.ds.a(SourceFile:186) at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(SourceFile:1558) at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(SourceFile:337) at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.if(SourceFile:223) ... 7 more
Is there anything that I did wrong or is it generally not working with CR4E to use a simple barcode font?
When I use ReportExportFormat.MSWord or ReportExportFormat.crystalReports it works fine but unfortunately
out customers insist on PDF. Any help would be appreciated very much.
The bar code font I am using is from http://www.barcodesinc.com/free-barcode-font/
Edited by: Lothar Bernecker on Dec 3, 2009 3:12 PM