I'm trying to create an XML datasource that gets passed in a report parameter. When I set up the XML datasource, I set the URL to <a class='bbc_url' href='
http://10.0.0.9:8090/lookup?type=getResourceOidList&rgOidList=1.'>http://10.0.0.9:8090/lookup?type=getResourceOidList&rgOidList=1.</a> I am able to create a dataset and bind it to a table and see the data just fine.<br />
<br />
I need to dynamically change the rgOidList value based on a report param. Based on some Google searches, I set the beforeOpen script to the following:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>importPackage(Packages.java.io);
importPackage(Packages.java.net);
//url setup from parameter values
url = new URL("http://10.0.0.9:8090/lookup?type=getResourceOidList&rgOidList=" & params["rpResourceGroupDFList"]);
// GET HTTP
connection = url.openConnection();
is = connection.getInputStream();
appcon = reportContext.getAppContext();
//appcontext setting
appcon.put("org.eclipse.datatools.enablement.oda.xml.inputStream", is);
appcon.put("org.eclipse.birt.report.data.oda.xml.inputStream", is);
</pre>
<br />
Now, the report generates, but with no data. Am I missing something?<br />
<br />
Thanks,<br />
<br />
Kev