Home DevShare Designing BIRT Reports

Sorting a Crosstab by a Field Not in the Crosstab

Share

by mwilliams

Forum - 10,000 postsBlog - 100 postsDevShare - 100 postsPoll Voter
Posted 05 Mar 2010 - 11:15 AM

(1)  (0)   (1855 views)

By downloading this item, you are agreeing to the Terms of Use for the site.

Quick tip telling how to use the attribute feature of a crosstab dimension to sort the crosstab by a field from the dataSet that is not used in the crosstab.

Birt Version:-

Sometimes you want to sort a crosstab by a value from your dataSet that you don't care to see in the crosstab, whether it's a ranking or a custom order that you want for your crosstab dimension that isn't alphabetical or numerical.  You can do this by adding an attribute to the dimension you want to sort in your dataCube.

To do this, you open your dataCube, double click on the dimension in the groups and summaries section of the dataCube editor, Click under attribute in the group level editor where it says "Create New Attribute" and select the column you want to sort by.  This adds that field as an accessible field in your crosstab.  So, now you can go to the sorting tab of the crosstab's property editor and sort the group you added the attribute to with a sort key like:

dimension["groupName"]["dimensionName"]["attributeName"]

An example report with this done is attached.  It was designed in BIRT 2.5.2.

Download (21.68 KB)

By downloading this item, you are agreeing to the Terms of Use for the site.



Forum - 100 postsDevShare - 1 post

al91206

Posted: 01 Apr 2010 - 09:02 AM

Just what I was looking for! Excellent step by step directions.

Forum - 1 post

Anandhi

Posted: 01 May 2012 - 10:29 AM

Just what I was looking for too.

Forum - 1 post

abhay_bc

Posted: 26 Aug 2012 - 10:56 PM

you are a life saver ! :) Thank you !

Forum - 10,000 postsBlog - 100 postsDevShare - 100 postsPoll Voter

mwilliams

Posted: 27 Aug 2012 - 09:34 AM

Good to see that this is helping people out! :)

Forum - 10 posts

patsuyash

Posted: 19 Sep 2012 - 03:17 AM

gr8 work!!!!!
 
Filter More