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)
choosing datasource dynamically
Geetha87
Hi ,
I'm using Birt 2.6.1 version and i'm new to Birt.
I'm working on a product application and presently I need to generate a report .As a part of this, the input for the 'datasource' comes dynamically from my JSP page. And so now, upon receiving this datasource the further report generation proceeds. For now, how do i fetch this datasource coming from JSP (dynamically) and insert as a part of a report criteria ?
I would really appreciate if the explaination is done in detail.
Thanks in advace.
Help seeker,
Geetha.
Find more posts tagged with
Comments
JasonW
How do you have BIRT deployed? Are you using the RE API or the Viewer?
Jason
Geetha87
Hi again....
Let me ask in a better sense.
Suppose i have a "sample.rptdesign". Each time the report is made to run, it should prompt user to provide the required "database connection string url", "username", "password". So based on these inputs the report should hit respective database to generate the report.
For eg:
USer1 - Provides the following values while running
"jdbc:oracle:thin:
@HOST
:1521:SID", "Scott", "tiger". This must generate the report from "Scott" DB.
Once again while running the same report he provides different DB details as below
"jdbc:oracle:thin:
@HOST
:1521:SID", "NewUserDB", "Password".This must generate the report from "NewUserDB" DB.
Thanks,
Geetha.
JasonW
Changing any of the connection properties is pretty simple as long as the same table names are used in the report. Either use property binding in the datasource editor or use a beforeOpen script like:
this.setExtensionProperty("odaURL","jdbc:mysql://localhost/mysql");
this.setExtensionProperty("odaUser",params["User"].value);
this.setExtensionProperty("odaPassword",params["Pass"].value);
Jason
joeguzman1
I have created a dynamic data source using a data source & group parameter created in the .rptlibrary (<em class='bbc'>see attached word doc</em>)<br />
<br />
We are using jtds for the driver.<br />
<br />
I think this will help.