Hi, I noticed that behavior.. the problem is that this will sort by the value of the "dataField" field, that usually is a numeric identifier.. but the sort often must be done on its "descriptive" name, that is the value actually shown to the users.
--- In flexcoders@yahoogroups.com, "sreeni_r" <[EMAIL PROTECTED]> wrote: > > > Have you tried calling OLAPSet.hierarchize()? > > It returns a new OLAPSet in which the members are sorted. > > --- In flexcoders@yahoogroups.com, "Cosma" <cosmacol@> wrote: > > > > Hi, > > > > I'm trying to sort the results of my OLAPQuery, anyone has tried to > do > > that? I can't find any info in the documentation. > > > > I verified that the order of the elements is based on the OLAPSet > > contents for that axis. That is, if you manually build the OLAPSet > > that you assign to the query axis, you will control the order. > > > > However, it is common to build the OLAPSet querying the cube about > its > > dimensions and hierarchies. The cube will return the elements > without > > any special order, probably it creates its internal sets adding > > elements as these are read. > > > > Is there an easy way to sort an OLAPSet built this way? I mean, > > probably it is possible to get the tuples array from the OLAPSet, > wrap > > it into an arraycollection, sort it providing a custom compare > > function and then build a new OLAPSet with the new tuples array, but > > this is a little tricky - there should be an easier way.. any ideas? > > > > Thank you > > Cosma > > >