1.
DevExpress.XtraReports:XrPivotGrid 显示时间为"0"的 格式问题:
把xrPivotGridField1的SummaryType改为"Max"或者"Min";
另外在Cell格式化时间默认日期时间一起显示的,
如果只想显示为Time(不显示日期部门)只需设置xrPivotGridField1属性中的CellFormat为DateTime "t"
如果只想显示为Date(不显示时间部分)只需设置xrPivotGridField1属性中的CellFormat为DateTime "d"
以下设置只影响GrandTotal(总计),不影响小计
this.pivotGridField12.GrandTotalCellFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
//this.xrPivotGrid1.OptionsView.ShowColumnHeaders = false;//显示列头
this.xrPivotGrid1.OptionsView.ShowDataHeaders = false;//显示数据头
this.xrPivotGrid1.OptionsView.ShowColumnTotals = false;//显示横向分组小计
//this.xrPivotGrid1.OptionsView.ShowColumnGrandTotals = false;//显示横向总计
this.xrPivotGrid1.OptionsView.ShowRowGrandTotals = false;//显示纵向总计
// xrPivotGrid1.ShowColumnGrandTotalHeader = false;//横向总计总表头文本("Grand Total")
this.xrPivotGridField5.Options.ShowGrandTotal = false; //不做总计显示
this.xrPivotGridField6.Options.ShowTotal = false; //不做小计显示
3.添加自定义总计列(未测试)
if (xrPivotGridField5.Area == PivotArea.ColumnArea)
{
xrPivotGridField5.CustomTotals.Clear();
xrPivotGridField5.CustomTotals.Add(DevExpress.Data.PivotGrid.PivotSummaryType.Average);
xrPivotGridField5.CustomTotals.Add(DevExpress.Data.PivotGrid.PivotSummaryType.Max);
xrPivotGridField5.TotalsVisibility = PivotTotalsVisibility.CustomTotals;
}
4.对齐方式(这里pivotGridControl使用Winform的控件)
5.