Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dynamic xml datasource

Status
Not open for further replies.

ililal

Programmer
Dec 4, 2006
15
US

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, "", "");
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top