|
发表于 2007-8-6 16:10:55
|
显示全部楼层
把代码改这样以后才可以,结帖吧
procedure TMainForm.BizFormCreate(Sender: TObject);
begin
DocViewRBBXX_BGWD1.Doc.Close;
if DataSetBroker1.DataSet.Active then DataSetBroker1.DataSet.Close;
DocViewRBBXX_BGWD1.Doc.AutoOpenDataSet:=false;
TPivotDataSet(DataSetBroker1.DataSet).OnCreateFieldName := DataSetTSSJJ1CreateFieldName();
DocViewRBBXX_BGWD1.Doc.Open(TDocMode.dmEdit,DocViewRBBXX_BGWD1);
if not DataSetBroker1.DataSet.Active then DataSetBroker1.DataSet.open;
end;
procedure TMainForm.DataSetTSSJJ1CreateFieldName(AKind: TPivotFieldKind; AOriginFields: TOriginFields;
const AColumnField, AColumnDisplay: string; var AFieldName, ADisplayName: string);
begin
//if AKind = TPivotFieldKind.pfkColField then
ADisplayName := 'ss';
end; |
|