Custom sorting on a chart X axis [message #496294] |
Mon, 09 November 2009 10:55  |
Eclipse User |
|
|
|
Hi,
I have created a chart with Strings as the X axis based on a column called Reporting_Period e.g.
row["Reporting_Period"]
These however are not sorted in the way i'd like due to the fact that alphabetical sorting is used.
There are 3 columns of the format
"W/E 15/11/2009" "W/E 08/11/2009" and "2 weeks old+ ".
The report can also be ran monthly in which case the W/E would be replaced with M/E.
When these are rendered I want them to be "date sorted" so this week/month should be the first column, then 1 week/month ago followed by 2 + weeks/months.
I have another column which is periods_old whose values correspond to the number of weeks/months old i.e. 0, 1 and 2 in the above example - is it possible to display the string value but sort on the integers? The "Sort on" field in the "Grouping and Sorting" menu is always disabled so I cant try to sort on the integer column. See attached screenshot for disabled section.
I can change the dataset to return just the date and use that but then I require some logic as follows, which im not sure where to put it (computed column editor doesnt seem to allow if/else syntax)
if(report_by_weeks)
Prepend W/E
else
Prepend M/E
thanks for any ideas
[Updated on: Mon, 09 November 2009 10:59] by Moderator
|
|
|
|
|
|
|
Re: Custom sorting on a chart X axis [message #557729 is a reply to message #557572] |
Wed, 08 September 2010 11:40  |
Eclipse User |
|
|
|
What version of BIRT are you using? When you select ascending or
descending you should be able to choose a different sort column right
under it.
Jason
On 9/8/2010 3:13 AM, can wrote:
> Hello,
> I looked into the second tab of the chart builder, but I cannot see a
> way to choose a different column for the data to be sorted.
>
> All I can see is this after pressing the down arrow:
>
> Group and sorting
> Data Sorting: Ascending/Descending or Unsorted
> Grouping
> Enabled Check-box
> Type Unit Interval Aggregate Expression
>
|
|
|
Powered by
FUDForum. Page generated in 0.02933 seconds