Crosstab issue - not to sort alphabetically [message #366483] |
Mon, 05 January 2009 11:36  |
Eclipse User |
|
|
|
Hi,
I'm using BIRT 2.3.1 and would like to know if there's a way
to have the crosstab not sort alphabetically (when creating groups),
but to take 'unsorted' result from the tabluar data?
Say this is the raw tabular data:
Category | Units | Category
----------|--------------|----------------------|----------- -
Apples | XX One
Bannanas | XX One
Apples | XX Two
Oranges | XX Two
Bannanas | XX Two
Apples | XX Three
Oranges | XX Three
Bannanas | XX Three
If I create a cross-tab, i'll get something like this:
-----------------------------------------------------
Category | Apples | Oranges | Bannanas
|
-----------------------------------------------------
| Three | XX | XX | XX |
| Two | XX | XX | XX |
| One | XX | XX | XX |
-----------------------------------------------------
For me this is out-of-order (Category) I want something like this:
The raw data is already sorted, and I don't want to resort the fields
alphabetically.
-----------------------------------------------------
| Apples | Oranges | Bannanas
-----------------------------------------------------
| One | XX | XX | XX |
| Two | XX | XX | XX |
| Three | XX | XX | XX |
-----------------------------------------------------
How can I do this? I know that I can tell a BIRT table that my data is
already sorted when adding a group section using : <property
name="sortByGroups">false</property>. Is there something similar I can
do in the Crosstab?
Thanks,
Anthony
|
|
|
|
|
|
|
|
Re: Crosstab issue - not to sort alphabetically [message #915867 is a reply to message #366503] |
Tue, 18 September 2012 01:42   |
Eclipse User |
|
|
|
Anthony/Jason,
I have been doing similar thing and but I didnt understand exactly by "adding a computed column to the dataset that indicates the
order and put it in the cube and use it to sort on."
Can please post any example rptdesign for doing so?
Regard,
Suyash Patil
Eclipse User wrote on Tue, 06 January 2009 14:23Originally posted by: jasonweathersby.alltel.net
Anthony,
If you select the crosstab and then choose sorting you should be able to
enter an expression for the sort key. In your case you could enter:
if( data["yourcat"] == "One" ){
"A";
}
if( data["yourcat"] == "Two" ){
"B";
}
if( data["yourcat"] == "Three" ){
"C";
}
You could also add a computed column to the dataset that indicates the
order and put it in the cube and use it to sort on.
Jason
Anthony Ku Ong wrote:
> Hi,
>
> I'm using BIRT 2.3.1 and would like to know if there's a way
> to have the crosstab not sort alphabetically (when creating groups),
> but to take 'unsorted' result from the tabluar data?
>
> Say this is the raw tabular data:
>
> Category | Units | Category
> ----------|--------------|----------------------|----------- -
> Apples | XX One Bannanas | XX One
> Apples | XX Two
> Oranges | XX Two Bannanas | XX Two
> Apples | XX Three
> Oranges | XX Three Bannanas | XX Three
>
>
> If I create a cross-tab, i'll get something like this:
>
> -----------------------------------------------------
> Category | Apples | Oranges | Bannanas |
> -----------------------------------------------------
> | Three | XX | XX | XX |
> | Two | XX | XX | XX |
> | One | XX | XX | XX |
> -----------------------------------------------------
>
>
> For me this is out-of-order (Category) I want something like this:
> The raw data is already sorted, and I don't want to resort the fields
> alphabetically.
>
> -----------------------------------------------------
> | Apples | Oranges | Bannanas
> -----------------------------------------------------
> | One | XX | XX | XX |
> | Two | XX | XX | XX |
> | Three | XX | XX | XX |
> -----------------------------------------------------
>
> How can I do this? I know that I can tell a BIRT table that my data is
> already sorted when adding a group section using : <property
> name="sortByGroups">false</property>. Is there something similar I can
> do in the Crosstab?
>
> Thanks,
> Anthony
>
>
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.05061 seconds