Page 2 of 2

Re: Case-insensitive sorting or custom function for sort

Posted: Thu Jul 25, 2013 9:47 pm
by jakrzysztow
So lets try this another way.

I would like to provide a custom function for sorting DataBands, is this possible?

Re: Case-insensitive sorting or custom function for sort

Posted: Fri Jul 26, 2013 6:53 am
by Alex K.
Hello,

Can you please describe your task in more details.

Thank you.

Re: Case-insensitive sorting or custom function for sort

Posted: Fri Jul 26, 2013 2:16 pm
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.

Re: Case-insensitive sorting or custom function for sort

Posted: Tue Jul 30, 2013 11:23 am
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.

Re: Case-insensitive sorting or custom function for sort

Posted: Tue Jul 30, 2013 5:54 pm
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?

Re: Case-insensitive sorting or custom function for sort

Posted: Wed Jul 31, 2013 8:21 am
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.