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)
Column Grouping
mastermine11
<p>I was wondering if BIRT is capable of the following:</p><p> </p><p>I have a query: select * from PERSON where CITY='****'</p><p> </p><p>The person database table has the following columns: pk, name, date of birth, spouseName, spouseDateofBirth, city</p><p> </p><p>I want to return a cross table showing person's name and DOB as well as their spouse's name and DOB</p><p> </p><p>My requirement is for the report table to look like:</p><p> </p><p>__________________________________________________________________________________</p><p> Person | Person's 1's Spouse | Person2 | Person's 2's Spouse | etc....</p><p>
</p><p>Name |</p><p>Date of Birth |</p><p> </p><p>Essentially, I want to create the Person and Person's Spouse column for each person row in the dataset. You can think of it as a column grouping. </p><p> </p><p>I am thinking of using data cubes with cross tab. </p><p> </p><p> </p><p> </p><p> </p>
Find more posts tagged with
Comments
micajblock
<p>Or you can use a list with display set to inline. Here is one example, it should give you an idea.</p><p> </p><p><a data-ipb='nomediaparse' href='
http://www.birt-exchange.org/devshare/_/designing-birt-reports/705-multiple-columns-within-a-list'>http://www.birt-exchange.org/devshare/_/designing-birt-reports/705-multiple-columns-within-a-list</a></p>
;
mastermine11
<p>I don't think making a list inline would work in my situation. The problem is not because the report gets too long vertically, and I want to split the results into multiple columns. The problem is: for every dataset row, I want to create a [color=rgb(0,0,0);font-family:helvetica, arial, sans-serif;]Person and Person's 's Spouse column. So, if I have 5 rows in my dataset, I want 5 sets of [/color][color=rgb(0,0,0);font-family:helvetica, arial, sans-serif;]Person and Person's's Spouse's columns. I do not know how many dataset rows get return initially, so I can't hardcode the number of columns before hand. I only know how many rows I get after I run my query. [/color]</p>
micajblock
<p>Can you attach a CSV with sample data and the version of BIRT you are using?</p>
mastermine11
<p>Sure thing.<br />
<br />
I am using BIRT 4.3. I have attached my CSV file. This forum does not permit me to upload files with CSV extension, so I changed it to txt.</p><p> </p><p>You can run the query: [color=#000000;][font="helvetica, arial, sans-serif;"]select * from PERSON where city='NYC'[/color][/font]<br />
<br />
My goal is for the report to appear as:<br />
[color=#000000;][font="helvetica, arial, sans-serif;"]__________________________________________________________________________________[/color][/font]<br />
Person | Person1's Spouse | Person2 | Person2's Spouse | Person3 | Person3's Spouse<br />
<br />
Name | joey jane mark leila bob bobina<br />
Date of Birth | 19770222 19790303 19831103 19850710 19761222 19750524</p>
micajblock
<p>Will this work?</p><p> </p><p>P.S. I changed the CSV file so that the dates are in yyyy-mm-dd format so BIRT can read them in as dates.</p>
Hans_vd
<p>I took a different approach, using a crosstab.</p><p>Take a look at this post to see the steps I took to create the report: <a data-ipb='nomediaparse' href='
http://enterprisesmartapps.wordpress.com/2013/09/20/mulitple-detail-rows-in-a-birt-crosstab/'>http://enterprisesmartapps.wordpress.com/2013/09/20/mulitple-detail-rows-in-a-birt-crosstab/</a></p><p> </p><p>mblock
, I tested you report too, it works and looks somewhat easier than my solution.</p><p> </p><p>For some reason I can't upload any files to this forum...</p>
mastermine11
<blockquote class="ipsBlockquote" data-author="mblock" data-cid="120564" data-time="1379678466"><div><p>Will this work?</p><p> </p><p>P.S. I changed the CSV file so that the dates are in yyyy-mm-dd format so BIRT can read them in as dates.</p></div></blockquote><p> </p><p>Thanks mblock. It works great. It seems the magic happened when you made the detail grid in the list's display to inline. How were you able to auto resize the person and spouse column?</p><p> </p><p> </p><blockquote class="ipsBlockquote" data-author="Hans_vd" data-cid="120566" data-time="1379686280"><div><p>I took a different approach, using a crosstab.</p><p>Take a look at this post to see the steps I took to create the report: <a data-ipb='nomediaparse' href='
http://enterprisesmartapps.wordpress.com/2013/09/20/mulitple-detail-rows-in-a-birt-crosstab/'>http://enterprisesmartapps.wordpress.com/2013/09/20/mulitple-detail-rows-in-a-birt-crosstab/</a></p><p> </p><p>mblock
, I tested you report too, it works and looks somewhat easier than my solution.</p><p> </p><p>For some reason I can't upload any files to this forum...</p></div></blockquote><p> </p><p>I will have to look into this solution a little bit later.</p>
micajblock
<blockquote class="ipsBlockquote" data-author="mastermine11" data-cid="120568" data-time="1379695483"><div><p>How were you able to auto resize the person and spouse column?</p><p> </p></div></blockquote><p>It is not auto resize. It is fixed to 1 inch.</p>