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)
onFetch() not available for XML 'Join Data Set'
germobirt
Hi,<br />
<br />
I'm using Birt 2.6.2 with Javascript.<br />
<br />
The data sitution is a classical one to many relation with 3 tables.<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>SYSTEM <- SYSTEMCOMPONENT -> COMPONENTS</pre>
A system with some attributes and many components with their attributes assigned to a system.<br />
<br />
In my report I need to use code inside onFetch() of my ODA Data Set.<br />
<br />
Having an SQL DB as datasource I can put all JOINS inside my SQL query and have only one Dataset with all my data.<br />
For that one Dataset I can use code inside onFetch().<br />
<br />
Having XML as datasource, I have to map all elements in different 'Data Set' Elements <br />
and have to use 'Join Data Set' Elements to bring everything together in one (Join)Data Set Element like in SQL.<br />
But for 'Join Data Set' Elements there are no scripts like beforeOpen() or onFetch() available.<br />
In the script tab is to see 'This element has no methods'.<br />
<br />
If I need such a 'Join Data Set' Element just as a binding source for a grid, there is no problem.<br />
<br />
But if I want to script over all data I can't use just one of the single 'Data Set' Elements.<br />
I need the object that contains all elements, but that is not possible.<br />
<br />
How can I use onFetch() if the datasource is XML and I have to use 'Join Data Set' Elements ? <br />
<br />
regards<br />
germobirt
Find more posts tagged with
Comments
germobirt
<p>Hi,<br>
<br>
meanwhile I'm using BIRT 4.3.1 but there is still no access to any kind of script for that type of datasource.</p>
<pre class="_prettyXprint">
This element has no methods.</pre>
<p>Is there any idea to handle that besides "Better do not join XML datasources"?</p>
<p>Or can anyone explain why there is no script available?</p>
<p> <br>
Best regards</p>
Clement Wong
<p>Sorry, only commercial BIRT has the ability to combine 2 or more Data Sets unlike OS BIRT where it can only combine 2.</p>
<p> </p>
<p>Also, only commercial BIRT's "Join Data Set" has the script events available: <em>beforeOpen, beforeClose, onFetch, afterClose, beforeClose</em>.</p>
<p> </p>
<p>Attached is a sample if you are able to use commercial BIRT -- look at the Data Set named "Commercial BIRT Combined Data Set".</p>
<p> </p>
<p>Maybe there is another option for you? Do you have sample data? Also, what's the logic that you want to put into the onFetch?</p>