DataView.Sort - more than just asc/desc (need custom sort)

后端 未结 5 1468
庸人自扰
庸人自扰 2020-11-27 07:28

I\'ve got a report being built from a dataset. The dataset uses the Sort property to order the data. I know that I can create a sort expression like this:

\"field de

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-27 07:47

    I don't think so. You could however change you SQL to return a "CustomSort" column that is the result of your case statement:

    select
        (case when f = 'a' then 0 else 1 end) as CustomSort
    from MyTable
    

提交回复
热议问题