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)
how to dynamic set the datasource "odaURL" into a nested dataset ?
ricky91
<p>how to dynamic set the datasource "odaURL" into a nested dataset ?<br><br>
My scenario is like this:</p>
<p>
</p>
<p>| Master.org_id |detail.column1 |Master.Column2 |<br>
| |detail.column1 | |</p>
<p>| |detail.column1 | |</p>
<p>
</p>
<p>Where The Detail Dataset's Datasource is dynamic assign depend on Master.org_id<br>
</p>
<p>I tried scripted in Detail.dataset beforeofen method<br><br>
if(master.org_id ==1 ){<br><br>
this.getDataSource().setExtensionProperty("odaURL",odaurl1);<br><br>
}else{<br><br>
this.getDataSource().setExtensionProperty("odaURL",odaurl2);<br><br>
}<br><br>
but it is not work , how can I achieve that in BIRT.... Please help.... Thanks in advance</p>
Find more posts tagged with
Comments
micajblock
<p>That is because the beforeOpen is too late in the order of events. Can you provide more detail on what you need to accomplish and maybe we can figure out a workaround. </p>
ricky91
<p>Hi Mica J. ,</p>
<p> </p>
<p> My scenario is like this:</p>
<p> 1. Mster Datasource --> Master Dataset<br>
2. Detail Datasource --> Detail Dataset</p>
<p>on ReportDesign.initialize --> Detail Datasource odaURL = T_odaURL</p>
<p> </p>
<p>Master Dataset.onFetch ROW#1--> <span style="color:rgb(255,0,0);">ORG_S</span><br>
Detail Datasource odaURL need change to <span style="color:rgb(255,0,0);">S_odaURL </span>and fetch the data<br>
Master Dataset.onFetch ROW#2--> <span style="color:rgb(255,0,0);">ORG_T</span><br>
Detail Datasource odaURL need change to <span style="color:rgb(255,0,0);">T</span>_odaURL and fetch the data<br>
Master Dataset.onFetch ROW#3--> ORG_C<br>
Detail Datasource odaURL need change to C_odaURL and fetch the data<br>
Master Dataset.onFetch ROW#4--> ORG_S<br>
Detail Datasource odaURL need change to S_odaURL and fetch the data<br>
Master Dataset.onFetch ROW#5--> ORG_H<br>
Detail Datasource odaURL need change to H_odaURL and fetch the data<br>
................................................</p>
<p> </p>
<p>how can I achieve that in BIRT or any .... Please help.... Thanks in advance</p>
micajblock
<p>I am not sure. Why the different URL's? Will a joined data set work instead?</p>
ricky91
<p>HI</p>
<p>The Detail Datasource at different data server ,</p>
<p>like <span style="color:rgb(255,0,0);">S_odaURL </span> = "jdbc:informix-sqli://sgcen1:20001/sgcedb:INFORMIXSERVER=gcetcp"</p>
<p><span style="color:rgb(255,0,0);">C_odaURL </span> = "jdbc:informix-sqli://cgcen1:20001/sgcedb:INFORMIXSERVER=gcetcp" ......</p>
<p>and has the same Dataset (table) .</p>
micajblock
<p>How about a union data set so the detail data is one data set,</p>
ricky91
<p>yes , union is one of workaround , but has any other solutions better than this ?</p>
<p>because union in birt must be used scripted dataset ,right ?</p>
micajblock
<p>Not that I am aware of. Actuate BIRT (commercial has a union data set OOTB). Are the number of details fixed?</p>
datakeyword
<p>The scripted dataset can be used to dynamically relate a master report to subreports in multiple data sources, but the code is complicated. Try using esProc to assist BIRT in handling the operation, you’ll find it becomes easier. esProc code is as follows:</p>
<p>
<img src="<a data-ipb='nomediaparse' href='
http://www.raqsoft.com/wp-content/themes/reckoner/images/2015-02-27_154243.jpg'>http://www.raqsoft.com/wp-content/themes/reckoner/images/2015-02-27_154243.jpg"></a><br><br>
;
BIRT can connect to esProc through JDBC and calls the script in the same way as that in which it calls the stored procedure. For details, see <a data-ipb='nomediaparse' href='
http://blog.raqsoft.com/?p=2983'>http://blog.raqsoft.com/?p=2983</a>
; . </p>
micajblock
<p>BTW, example of as union data set - <a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/files/file/993-simple-union-dataset/'>http://developer.actuate.com/community/forum/index.php?/files/file/993-simple-union-dataset/</a></p>
;