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)
Dynamic xml Data Source
JanaF
Hi,<br />
<br />
I have several reports and every report has its own xml file, which is created by our application. <br />
<br />
I would like to set the URL of the xml Data Source Tab to some expression, which uses a environmental variable to get the root folder for all xml-files. The name of the xml file is the same as the reportfile name. <br />
<br />
I tried to use the "property binding" tab with the following code:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>temp = java.lang.System.getenv("CX_REPORT_DATA");
var reportFolderAndReportName = reportContext.getReportRunnable().getReportName();
var tempvar = reportFolderAndReportName.substr(reportFolderAndReportName.lastIndexOf('/'))
var tempvar1 = tempvar.substr(0, tempvar.lastIndexOf("."))
var reportname = tempvar1.replace(/%20/g, " ")
FILELIST = temp+reportname+".xml";</pre>
<br />
This works fine for displaying the data at runtime using the "preview" tab. <br />
<br />
But when I am trying to edit the data set I always get the error message <br />
"XML data source cannot be retrieved.XML data source file is invalid or the file doesn't exist." (see attachment)<br />
<br />
Is there a way to evaluating a script during design mode, when editing the data set? That would be really helpful as maybe not all the column names of the xml file are known by heart.<br />
<br />
Thank you in advance,<br />
<br />
Jana
Find more posts tagged with
Comments
JanaF
I am still having this problem... any ideas?