万能报表交叉分析表按笔画进行排序
金蝶云社区-王文亮
王文亮
0人赞赏了该文章 915次浏览 未经作者许可,禁止转载编辑于2018年06月22日 17:43:49

1.设置字段排序方式为自定义.


2.设置交叉分析表CustomFieldSort脚本

[code]private void pivotGrid1_CustomFieldSort(object sender, DevExpress.XtraReports.UI.PivotGrid.PivotGridCustomFieldSortEventArgs e) {
if (e.Field.FieldName == "fmaterialname")
{

if (e.Value1 == null || e.Value2 == null) return;

e.Handled = true;
string s1 = e.Value1.ToString();
string s2 = e.Value2.ToString();

System.Globalization.CultureInfo stroke= new System.Globalization.CultureInfo(0x20804);

e.Result = string.Compare(s1, s2, stroke, System.Globalization.CompareOptions.None);

}
}
[/code]