function FieldToDisplayName(ADataSet: TBizDataSet;
const AFieldName: string): string;
var
lField: TBizField;
begin
lField := FindFieldByName(ADataSet, AFieldName);
if lField <> nil then
begin
if (ADataSet is TSQLBasedDataSet) and
(TSQLBasedDataSet(ADataSet).Tables.Count > 1) then
Result := lField.Origin.DisplayName //改成这样就OK了。呵呵。
else
Result := lField.DisplayName;
end
else
Result := '';
end;