代碼
private void SetSortQuick(ReportClientDocument objRPT)
{
if (!String.IsNullOrEmpty(this.SortField))
{
cCreateReport objCreateReport = new cCreateReport();
string[] arrySortField = this.SortField.Split(new char[] { , });
string[] arrySortDirection = this.SortDirection.Split(new char[] { , });
for (int i = 0; i < arrySortField.Length; i++)
{
string[] arryTemp = arrySortField[i].Split(new char[] { | });
string strFieldName = arryTemp[0];
string strFieldType = arryTemp[1].ToLower();
string strFormula = "", strFormulaName = "";
switch(strFieldType)
{
case "datetime":
strFormula = "date({" + arrySortField[i] + "})";
break;
case "numeric":
case "int":
case "money":
case "float":
strFormula