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)
Problems with scripting
NewInBirt
Hello,<br />
<br />
i created scripted data sources / data sets.<br />
<br />
By using a script, within of birt, i call java classes. <br />
The java-method,which will be called by birt, has to get a String array over the parameter list.<br />
The string array consists properties for the connection to a custom java system.<br />
<br />
The java-method is looking like that:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
public void createConnection(String[] properties)
{
String server = properties[0];
String port = properties[1];
String loginName = properties[2];
String password = properties[3];
Connector con = new Connector();
con.login(server, port, loginName, password);
}
</pre>
<br />
But by using rhino script i can´t create a String Array or I don´t know<br />
how i can do that.<br />
<br />
I tried it like that in birt:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
String[] connectionArray = new String[4];
connectionArray[0] = "host1432"; //server
connectionArray[1] = "5475"; //port
connectionArray[2] = "test"; //username
connectionArray[3] = "drkso8054"; //server
jsFunction.createConnection(connectionArray);
</pre>
<br />
<br />
Please could you help me?<br />
<br />
Do you have a hint for me, where I can look for questions like that?<br />
<br />
I browsed google, but unfortunately without success.<br />
<br />
Thank you.<br />
<br />
Bye<br />
NewInBirt
Find more posts tagged with
Comments
There are no comments yet