Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Add column to XML data set dynamically
snoland
I need to add columns to an Xml data set based on comma delimeted list of parameters that will be passed to the report. I know I can do this to a scripted data set using this code:<br />
<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>dataSet = reportContext.getReportRunnable().getDesignHandle();
dataSetHandleClone = dataSet.findDataSet("scripted");
log(dataSetHandleClone);
columnHint = dataSetHandleClone.getPropertyHandle("columnHints");
resultSet = dataSetHandleClone.getPropertyHandle("resultSetHints");
log("resultSet: " + resultSet);
ch = StructureFactory.createColumnHint();
ch.setProperty("columnName", "something");
ch.setProperty("displayName", "something");
columnHint.addItem(ch);
rs = StructureFactory.createResultSetColumn();
rs.setColumnName("test");
rs.setPosition(0);
rs.setDataType("String");
log("ResultSetColumn: " + rs);
resultSet.addItem(rs);
</pre>
<br />
However when I try to use this on an xml data set the resultset variable is null. Is there any way I can do this?
Find more posts tagged with
Comments
There are no comments yet