on 09-06-2018 2:41 PM
I am using a console program (built in Visual Basic 2015), together with Crystal Reports runtime to pass commands to automatically export reports to PDF files, with an XML document as the data source. Although I can use Crystal Reports software to export to a PDF using my XML data source, the export fails when I use the CR runtime.
When I try to export a PDF from an XML source it results in the following error:
Exception: Fehler in der Datei Report 6844_16872_{F29A83D1-1A9B-43BE-B3F1-2BF0FD 11E655}.rpt: Fehler beim Laden der Datenbankinformationen Inner Exception: System.Runtime.InteropServices.COMException (0x800002CD): Fehler in der Datei Report 6844_16872_{F29A83D1-1A9B-43BE-B3F1-2BF0FD11E655}.rpt: Fehler beim Laden der Datenbankinformationen bei CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(Exp ortOptions pExportOptions, RequestContext pRequestContext) bei CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportR equestContext reqContext)
When I execute this command using an empty report without any parameters, it successfully generates a PDF document.
When I execute the command using a report with a field like the current date, it also works.
If I create a parameter in the report with default values and I insert it into the report and I run the console program, it results in the following exception:
Exception: Fehlende Parameterwerte. Inner Exception: System.Runtime.InteropServices.COMException (0x8004100E): Fehle nde Parameterwerte. bei CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(Exp ortOptions pExportOptions, RequestContext pRequestContext) bei CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportR equestContext reqContext)
System specifications:
Windows 7
Visual Basic 2015
Open Source Console Application: Crystal Report Ninja (Target framework: .NET Framework 4.5, Platform target x64)
SAP Crystal Report 2016 SP3 Version 14.2.3.2132
SAP Crystal Reports runtime engine for .NET Framework (32-bit) Version 13.0.23.2819
SAP Crystal Reports runtime engine for .NET Framework (64-bit) 13.0.23.2819
SAP Crystal Reports, version for Microsoft Visual Studio 13.0.23.2819
An example command would be: CrystalReportsNinja.exe -F Report.rpt -E PDF.
Please let me know if you need the source code for the command line application, which can be found online. Thank you very much in advance.
If you open the report in CR Designer and set lcoation to the XML does that work?
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to run in debug mode and step through each line and use Try/Catch blocks to capture any exceptions or inner exceptions and see what is happening.
See the download WIKI for a Parameter test app and see if that works for you:
https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Don, thank you for the reply.
I did use the try/catch blocks in my code and the outputs, including the inner exceptions are included in my previous message.
I've downloaded the parameter test app and I was able to run it successfully. When I try to refresh the loaded report inside the test app, it crashes with the following error:
Trigger Event - Error in Viewer:
CrystalDecisions.Windows.Forms.ExceptionEventArgs
Fehler beim Offnen der Verbindung (Failed opening a connection).
Formulas_11512_4160_{850CF317-78E1-4951-A0B3-9CD641EF0D31}.rpt
I have a similar issue when using the console application, it fails unable to load new XML data with the following exception:
Source: CrystalDecisions.ReportAppServer.DataSetConversionException: Fehler in der Datei Report 12596_8100_{CE1D4386-6F18-4F82-948C-E2CF9F76A5C9}.rpt:
Fehler beim Laden der Datenbankinformationen
Inner Exception: System.Runtime.InteropServices.COMException (0x800002CD):
Fehler in der Datei Report 12596_8100_{CE1D4386-6F18-4F82-948C-E2CF9F76A5C9}.rpt: Fehler beim Laden der Datenbankinformationen bei CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(Exp ortOptions pExportOptions, RequestContext pRequestContext) bei CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportR equestContext reqContext)
Thank you in advance for any suggestions.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.