This is a java web application using:
jdk 1.4.12
crystal reports xi r2
sun application server 8.2
Here's the problem:
I would like to generate a dynamic XML document as the datasource. (This XML datasource is a result set from a query. I've completed and tested the XML file; it works.)
Using this new datasource as the driver for the Crystal Report.
BTW, The Crystal Report rpt file's datasource was selected first by XML then by Database files.
They both worked with in the Crystal report view section; however, they didn't work in the application.
this is the error:
com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: No database connector has been specified.
---- Error code:-2147467259 Error code name:failed
I've searched the net with no luck.
Here’s my source code:
ReportClientDocument reportClientDoc = new ReportClientDocument();
reportClientDoc.open("Report1.rpt", 0);
IXMLDataSet xmlDS = new XMLDataSet(new ByteArray(bytesFromFile(XMLFileLocation)), new ByteArray(bytesFromFile(XMLFileLocation)));
// Change the XML datasource to the new XML datasource
reportClientDoc.getDatabaseController().setDataSource(xmlDS, "", "");