D
Daniel L. VanDenBosch
Guest
I have a series of thousands of crystal reports and I need a way to create methods for each of them that will allow me to export them with their parameters. I need to do this while at the same time maintaining the reports and subreport datasets that are already built into them.
I tried everything I could find on the internet and in this question. I was able to boil down the code I need to accomplish this task to something that looks like what I have below. The problem is I keep getting an error on the last line of code. I am assuming it is
On that last line I will get the following error
Continue reading...
I tried everything I could find on the internet and in this question. I was able to boil down the code I need to accomplish this task to something that looks like what I have below. The problem is I keep getting an error on the last line of code. I am assuming it is
Code:
ReportClientDocument RCD = new ReportClientDocument();
System.setProperty("java.version", "1.8.0_254");
RCD.open("C:\\foo.rpt", 0);
RCD.getDataDefController().getParameterFieldController().setCurrentValue("", "InventoryRef" , "PP10085");
ByteArrayInputStream byteArrayInputStream = (ByteArrayInputStream) RCD.getPrintOutputController().export(ReportExportFormat.PDF); //Error finding JNDI name
On that last line I will get the following error
Error finding JNDI name (my-database)---- Error code:-2147467259 Error code name:failed at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.if(SourceFile:237) ...
Continue reading...