Intercepting query result set in javascript
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Hi Guys,</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">I am very new to BIRT. Went through few examples in which while building a report javascript uses Java's pojo object.</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">My query is somewat different. I have created a jdbc data set in which I have written my query. Now I am having a table(in my report) where I am using data from this jdbc data set to populate the table.</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Now what I want is that, the data that is coming out of this query must come to javascript first for manipulation and then after manipulation of data I will display it in table(in report).</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">I am not getting how to intercept the data coming from query in the javascript and manipulate it and then populate this manipulated data.</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Do I need to make a new scripted data set? If yes how do I get the query result in this data set for manipulation?</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> </p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Scenario:(This is what I am getting as query result) (All the 3 rows are part of table(database) only, I mean even total is also a part of result set, it has not been computed separately by adding the data of first two rows)</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> Cost</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Abc 5</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Xyz 10</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Total 15</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> </p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Desired:(This is what I want after manipulation)</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> Cost</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Abc 33.33%((5/15)*100)</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Xyz 66.66%((10/15)*100)</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Total 15</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> </p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">If this can be done without intercepting data into javascript please suggest.</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Also tell how to intercept query data into javascript as I have other scenarios where I can use this concept.</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> </p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Thanks in advance</p>
<div> </div>