Yes, It's the basic question from many people who did the same thing
and never succeeded.
Data view or any other control failed to get the results which matches
the given criteria by using SPROC in sql server*
Sorting never work with SPROC in Sharepoint data view control [reason
is below]. So, what i did was, any way we are completely customizing
page, i chosen grid view for my requirement which work perfectly.
What is happening when you bind SPROC as the data source to a data
view is, whenever the user selected something, it does a postback and
call the same SPROC and returns the results. So, no where this sorting
logic is called even you selected sorting option. If it is any other
data source like XML, list, library or any other it has the
functionality implemented and will sort based on the selection and
give results. But SPROC doesn't.
So, i can say better to go for Grid view or some custom programming
other than Data view when you deal with SPROCS.
http://praveenbattula.blogspot.com