我有一个数据库交叉表对象enter image description here
我为exampel的列总计设定值: A + B-C-D-E-F-G-H-I = Grand ToTal
或 总计=总计-A -B
答案 0 :(得分:0)
尝试使用交叉'OnPrintCell事件(总计=总计 - A):
procedure Cross1OnPrintCell(Memo: TfrxMemoView; RowIndex, ColumnIndex, CellIndex: Integer; RowValues, ColumnValues, Value: Variant);
begin
if ColumnIndex = 0 then
if Value <> null then
Set('Var0', Value)
else
Set('Var0', 0);
if Cross1.IsGrandTotalColumn(ColumnIndex) then Memo.Text := VarToStr(Value - Get('Var0'));
end;