On April 27, 2024, our Sign-in and Create Account options will be unavailable from 9am-12pm ET. During this maintenance window, developer account access and free trial registration will be unavailable.

Set a XML DataSource programmatically

Mikey
Mikey Junior Member
Hello World,<br />
<br />
Here is what I am trying to do:-<br />
<br />
I have created a report called test.rptdesign. I have specified a XSD file as the datasource of my report and the report's dataset contains the elements in the XSD schema.<br />
<br />
right, now I am want to invoke this report programmatically. I have a Java Object that I have converted to XML (using JAXB) and I now want to set the XML as the datasource for this report at runtime. <br />
<br />
ie., While design time, I have specified a XSD schema as my datasource, but while run time I want the report to point to a XML file. Makes sense? How would I go about doing this?<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
String xmlString = "<application>.................</application>";
ReportDesignHandle reportDesignHandle = (ReportDesignHandle)design.getDesignHandle();
SlotHandle dataSets = reportDesignHandle.getDataSets();
</pre>
<br />
How can set the xmlString as my dataSource? Any ideas / pointers?<br />
<br />
Regards,<br />
Mikey