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)
Create a report from two data sets merged
doneill
I have to create BIRT reports but the data is in two separate servers. User wants just one report with the data combined. I created two data sources, two data sets but how do I combine the data sets to look like one (similar to using the UNION operator in a SQL statement). When I create a join data sets I get columns for both data sets but I want only one column with the data combined.
I'm using BIRT 7.1 w/Rational with Oracle databases.
Find more posts tagged with
Comments
doneill
Correction...I'm using BIRT 2.2.1.v2 with IBM Rational ClearQuest 7.1.0
mwilliams
You can create computed columns to merge your columns. Or, you could create a scripted dataSet that combines them, instead of a jointDS.
doneill
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="111322" data-time="1352324937" data-date="07 November 2012 - 02:48 PM"><p>
You can create computed columns to merge your columns. Or, you could create a scripted dataSet that combines them, instead of a jointDS.<br /></p></blockquote>
<br />
Thanks Michael.<br />
<br />
I created the computed columns on the jointDS, it works great on my report parameter list box.<br />
<br />
Now that I have the selected project from the report parameter I usually append the WHERE clause (to this.queryText) in the beforeOpen of the dataSet that retrieves the report data. Each dataSet has 11 columns and if I create a jointDS I'll have 22 columns and 11 new computed columns. I haven't tried this so I don't know if it will work. Do you know where I can find documentation or examples on creating a scripted dataSet?<br />
<br />
Thanks again.
mwilliams
I would think it would work fine, but 11 computed columns is probably a pain to do. For the scripted union dataset, take a look at this devShare:
http://www.birt-exchange.org/org/devshare/designing-birt-reports/1215-create-union-data-set/
doneill
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="111350" data-time="1352389651" data-date="08 November 2012 - 08:47 AM"><p>
I would think it would work fine, but 11 computed columns is probably a pain to do. For the scripted union dataset, take a look at this devShare:<br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/org/devshare/designing-birt-reports/1215-create-union-data-set/'>http://www.birt-exchange.org/org/devshare/designing-birt-reports/1215-create-union-data-set/</a><br
/></p></blockquote>
<br />
I created the jointDS w/the 11 computed columns and the report works great but it was tedious creating the new columns and some of my other reports have more than 11 columns.<br />
<br />
Anyway, I tried downloading the rptdesign from the link you gave me but when I try to open it I get the following error: The report file of version "3.2.17" is not supported. <br />
I'm using version 2.2.1, do you know how I can get around this error?<br />
<br />
Thanks again, you've been a big help.
mwilliams
You can try changing the first few lines of the XML Source to match the lines from one of your other reports. This works in some cases for using newer designs in older designers. Let me know. If not, you can take a look at the scripted dataSource example in the report examples view. To open this, go to Window -> Show View and find the report and chart examples views. In the scripting examples, you'll find the scripted dataSource example. If this doesn't help, I can make you a simple example.