This project has moved. For the latest updates, please go here.

Sorting with CurrentCellAttributes()

Topics: Developer Forum, User Forum
Jun 25, 2012 at 9:11 AM

Hi all,

Is it possible to sort the result set from a Drillthrough operation when called using CurrentCellAttributes() ?

I have something like the following, and need to sort it by Internet Sales Amount in Descending order:

"DRILLTHROUGH MAXROWS 100 SELECT (" +
ASSP.CurrentCellAttributes()
+ ") ON 0 FROM [Adventure Works]
RETURN
 [Internet Sales].[Internet Sales Amount]
,[Internet Sales].[Internet Total Product Cost]
,NAME([$Date].[Date])
,NAME([$Customer].[Customer])
"

Thanks a lot for your support!

Jon

Coordinator
Jun 25, 2012 at 3:46 PM

DRILLTHROUGH doesn't support an ORDER BY clause, unfortunately.

The only way I can think of is to take the code for ExecuteDrillthroughAndFixColumns and extend it to do some sorting in .NET. If you code that, feel free to post the code here so we can consider including it in ASSP.