Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
Dynamically creating a data set
Migrateduser
<p>Hi there,</p>
<p> </p>
<p>following issue:</p>
<p> </p>
<p>I have two data sources:</p>
<ol><li>StarTeam (Database connection)</li>
<li>XML file</li>
</ol><p>The XML file needs some pre-processing. I'm extracting the needed data by using a scripted data set with my own java library included as a .jar file. It basically parses the XML data using XPath expressions and providing an ArrayList of Module() objects which I include by overriding the fetch() method inside the BIRT report designer. I'm passing the XML file's path into my Java code in fetch() with a BIRT parameter.</p>
<p> </p>
<p>In the end I want to combine the data provided by StarTeam and the XML file into a table. The problem I'm dealing is that the columns in the final table should be dynamically added based on the XML data set.</p>
<p> </p>
<p>1. StarTeam table (which is automatically done by BIRT, so no problems here):</p>
<pre class="_prettyXprint">
+
+
+
| Req. ID | Rev. No. |
+
+
+
| 2 | 7 |
| ... | ... |
+
+
+
</pre>
<p>2. Scripted XML Data set should look like this:</p>
<pre class="_prettyXprint">
+
+
+
+
+
+
| Req. ID | module 1 | module 2 | ... | module n |
+
+
+
+
+
+
| 2 | rev. no. | rev. no. | ... | rev. no. |
| ... | ... | ... | ... | ... |
+
+
+
+
+
+
</pre>
<p>module1 - module n is the ArrayList provided by my Java code integrated in the scripted data set.</p>
<p>The data in the ArrayList looks like this (simplified):</p>
<pre class="_prettyXprint">
public class Module {
private String name;
private List<Requirement> requirements;
}
public class Requirement {
private int id;
private String revision;
private String name;
}
</pre>
<p>
How do I build such a data set with dynamic columns that are provided by my external source (XML file -> java parser -> ArrayList)?</p>
<p> </p>
<p>This is how the final table should look like:</p>
<pre class="_prettyXprint">
+
+
+
+
+
+
| Req. ID | module 1 | module 2 | ... | module n |
+
+
+
+
+
+
| 2 | rev. 7 | none | ... | rev. 5 |
| ... | ... | ... | ... | ... |
+
+
+
+
+
+
</pre>
<p>I'm aiming towards a joint data set, but I'm open for any suggestions on how to do this. I'm really out of ideas and feel like google won't provide anymore answers.</p>
<p> </p>
<p>Any help is really appreciated!</p>
<p> </p>
<p>Regards</p>
Find more posts tagged with
Comments
There are no comments yet