Case-insensitive sorting or custom function for sort

Stimulsoft Reports.Flex discussion
jakrzysztow
Posts: 18
Joined: Tue Aug 09, 2011 10:35 am

Re: Case-insensitive sorting or custom function for sort

Post by jakrzysztow »

So lets try this another way.

I would like to provide a custom function for sorting DataBands, is this possible?
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Case-insensitive sorting or custom function for sort

Post by Alex K. »

Hello,

Can you please describe your task in more details.

Thank you.
jakrzysztow
Posts: 18
Joined: Tue Aug 09, 2011 10:35 am

Re: Case-insensitive sorting or custom function for sort

Post by jakrzysztow »

First task is that I don't have an easy way to convert that data I uploaded into XML for you to determine the sort has an issue.

Second task is I need to sort a field that is contains a two numbers separated by a dash. So 1-1, 2-1, 3-1, 3-2, 10-1, 11-1, 11-2, 100-1, etc etc. And the field is a String.
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: Case-insensitive sorting or custom function for sort

Post by Vladimir »

Hello,

Unfortunately, at the moment this functionality is not available.
We will add the ability to use complex expressions in sorting, update will be available later this week.

Thank you.
jakrzysztow
Posts: 18
Joined: Tue Aug 09, 2011 10:35 am

Re: Case-insensitive sorting or custom function for sort

Post by jakrzysztow »

Let come at this another way then...

Can I sort the DataTable I build in ActionScript, that is associated with the DataBand and have the report know this?

At one point, via Support Ticket #AMR-709656, I thought you added the ability to specify a sort function on the DataTable.rows? If so, how do I tell the viewer I did this so it will update?
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: Case-insensitive sorting or custom function for sort

Post by Vladimir »

Hello,

Yes, you can use your sort (as specified in the ticket):

Code: Select all

private function sortFunc(string a, string b): int
{
   // sort condition
}

rows.sort(sortFunc);
If you use this method to sort, you will need to remove a sort on the DataBand.

Thank you.
Locked