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 Datasorce from URL Parameter
zax
Hello,<br />
<br />
This probably quite simple, but I am stuck.<br />
<br />
I have a report on a tomcat web server that I want to use on many databases. My thought was to pass in the host name as a URL variable and using property binding to format the JDBC connection string.<br />
<br />
But this does not work. The URL parameter is passed, the user enters any user parameters, and I get the error:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>org.eclipse.birt.report.engine.api.EngineException: An exception occurred during processing. Please see the following message for details:
Error evaluating Javascript expression. Script engine error: Report parameter "project" does not exist</pre>
<br />
So how do I pass the URL variable onto the engine so it is available for my script?<br />
<br />
Thanks in advance,<br />
Stephen
Find more posts tagged with
Comments
averma
Hi Stephen,
Edit your data source and go to the property binding tab and define you database url as params["paramname"].value Here you can use expression builder to define values for JDBC driver class/URL, username, password etc. instead of hard coded values. Let me know if this approach works.
Ashwini Verma
zax
I saw what I was doing straight away. I was not using ".value". My code now works in Eclipse, so depending on what I set the parameter's default to, depends on what database a simple SELECT COUNT(*) query uses.
I knew it would be something simple, so thank you for unsticking me...
Stephen