報表使用時可按列動態排序。
實現方法
在書寫SQL時,應用排序資訊即可實現動態排序。
order by <%=String.IsNullOrEmpty(Context.Current.RequestParams["sortstring"])?"Hiredate desc":Context.Current.RequestParams["sortstring"]%>
Hiredate desc 為預設排序。
Context.Current.RequestParams["sortstring"]取得前台發送的排序資訊,如“Approved ASC”、 Approved DESC”。