majorsilence / CrystalCmd

Java and c# program to load json files into crystal reports and produce PDFs
MIT License
10 stars 8 forks source link

How to make sub-reports work #32

Closed marcovega closed 7 months ago

marcovega commented 10 months ago

Hello @majorsilence,

We're trying to batch print some reports, and for that we need to add sub-reports functionality. Currently, our setup doesn't really allow for that and we're getting the error below.

I was checking the history of commits and noticed a name about sub-reports support - is it really allowed somehow or that's additional work needed?

Thanks again!

com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Error finding JNDI name (shuttersoft.database.windows.net)---- Error code:-2147467259 Error code name:failed
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.if(SourceFile:238)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:148)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:129)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:112)
    at PdfExporter.exportReport(PdfExporter.java:211)
    at PdfExporter.exportReportToStream(PdfExporter.java:52)
    at ServerExport.handle(ServerExport.java:70)
    at jdk.httpserver/com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:77)
    at jdk.httpserver/sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:82)
    at jdk.httpserver/com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:80)
    at jdk.httpserver/sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:848)
    at jdk.httpserver/com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:77)
    at jdk.httpserver/sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:817)
    at jdk.httpserver/sun.net.httpserver.ServerImpl$DefaultExecutor.execute(ServerImpl.java:201)
    at jdk.httpserver/sun.net.httpserver.ServerImpl$Dispatcher.handle(ServerImpl.java:560)
    at jdk.httpserver/sun.net.httpserver.ServerImpl$Dispatcher.run(ServerImpl.java:526)
    at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: com.crystaldecisions.reports.common.JndiNotFoundException: Error finding JNDI name (shuttersoft.database.windows.net)
    at com.crystaldecisions.reports.queryengine.Connection.a(SourceFile:1872)
    at com.crystaldecisions.reports.queryengine.Connection.bs(SourceFile:1816)
    at com.crystaldecisions.reports.queryengine.Connection.bv(SourceFile:506)
    at com.crystaldecisions.reports.queryengine.Connection.uk(SourceFile:3022)
    at com.crystaldecisions.reports.dataengine.dfadapter.DFAdapter.a(SourceFile:697)
    at com.crystaldecisions.reports.dataengine.dfadapter.DFAdapter.for(SourceFile:707)
    at com.crystaldecisions.reports.reportdefinition.ReportHelper.a(SourceFile:214)
    at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.long(SourceFile:962)
    at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.a(SourceFile:640)
    at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.int(SourceFile:677)
    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(SourceFile:1944)
    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:661)
    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:167)
    at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(SourceFile:529)
    at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(SourceFile:526)
    at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(SourceFile:102)
    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(SourceFile:525)
    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(SourceFile:424)
    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(SourceFile:352)
    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.dt.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:224)
    ... 16 more
Caused by: com.businessobjects.reports.jdbinterface.common.DBException: Error finding JNDI name (shuttersoft.database.windows.net)
    at com.crystaldecisions.reports.queryengine.driverImpl.jdbc.JDBCConnection.Open(Unknown Source)
    at com.crystaldecisions.reports.queryengine.JDBConnectionWrapper.Open(SourceFile:123)
    at com.crystaldecisions.reports.queryengine.Connection.bs(SourceFile:1787)
    ... 42 more
majorsilence commented 9 months ago

I vaguely remember having problems with sub-reports in the java version.

Most of my attention is now on the dotnet version and running it either with IIS or on wine in docker.