I have two data sources, a jdbc:mysql based source & a xml based source. The xml data source uses a beforeOpen script to reset the url using:<br />
<br />
<p class='bbc_indent' style='margin-left: 40px;'><strong class='bbc'>this.setExtensionProperty("FILELIST", vars["fullXmlQueryUrl"]);</strong></p>
<br />
Where the variable <strong class='bbc'>fullXmlQueryUrl</strong> is built using two other variables (one that makes a time stamp, the other defines the server number to use).<br />
<br />
When viewing the "Output Columns", the "Preview Results", or using the data sources in charts EVERYTHING is fine. But when I create a JOINT data set using the xml based data source I get the following error: <br />
<br />
<p class='bbc_indent' style='margin-left: 40px;'><strong class='bbc'>Fail to execute sript in function __bm_beforeOpen(). Source:<br />
<br />
" + this.setExtensionProperty("FILELIST", vars["fullXmlQueryUrl"]); + "<br />
<br />
A BIRT exception occurred. See next exception for more information.<br />
Error evaluationg Javascript expression. Script engine error: Report variable "fullXmlQueryUrl" does not exist <br />
Script soruce: <inline, line: 0, text:<br />
__bm_beforeOpen()<br />
Reason:<br />
A BIRT exception occurred.</strong></p>
<br />
However, if I use the following script in the xml data source's script tab then it does work. I just have to modify the beforeOpen script in multiple data sources rather than parameterize the creation of the urls. (I have many similar but different xml url data sources and parameterizing them makes management of the BIRT report easier.)<br />
<br />
<p class='bbc_indent' style='margin-left: 40px;'><strong class='bbc'>this.setExtensionProperty("FILELIST", "<a class='bbc_url' href='
http://server07/..."+new'>http://server07/..."+new</a> Date().getFullYear()+"-"+new Date().getMonth()+"-"+new Date().getDate()+"..... etc.</strong></p>
<br />
Note, with this work around I can make the url have a time relevant to "now" but I can't parameterize the server number like what is desired.<br />
<br />
<span class='bbc_underline'><strong class='bbc'>SO, How can I use variables in the "beforeOpen" script of a Data Source that feeds one of two Data Sets that are used to create a Joint Data Set?</strong></span><br />
<br />
Any help is appreciated.