修正的Bug:
1、报表设计工具,客户端增加的报表名称和分类,其它电脑无法看到
解决方法:
打开报表设计工具,修改ABQuery1的属性FieldDefaultValues值为下面的即可:
Ti_Group=Main,Ti_Tr_Guid=select dbo.Func_GetTreeGuid('Extend ReportType')
2、报表的cxGrid组件在解析SQL时,如果SQL的AS标题中有“|”时,会导致如下错误:
''ABcxGrid1ABcxGridDBBandedTableView1明细|240'' is not a valid component name.
解决方法:
在ABFrameworkcxGridU 单元中替换方法:
procedure TABcxGridDBBandedTableView.LoadColumnsFieldDef;
var
tempColumn:TcxGridDBBandedColumn;
tempIndex,
i:longint;
tempFieldDef:PABFieldDef;
tempHaveFieldEmptyStr ,
tempNoHaveFieldEmptyStr:boolean;
begin
if (Assigned(DataController)) and
(Assigned(DataController.DataSet)) and
(DataController.DataSet.Active) then
begin
ShowHourglassCursor;
try
BeginUpdate;
DataController.BeginUpdateFields;
try
if columncount>0 then
ClearItems;
GetExpProperty;
tempNoHaveFieldEmptyStr:=FNoHaveField=EmptyStr;
tempHaveFieldEmptyStr:=FHaveField=EmptyStr;
for i := 0 to DataController.DataSet.FieldCount-1 do
begin
if ((tempNoHaveFieldEmptyStr) or (ABPos(','+DataController.DataSet.Fields[i].FieldName+',',','+FNoHaveField +',')<=0)) and
((tempHaveFieldEmptyStr) or (ABPos(','+DataController.DataSet.Fields[i].FieldName+',',','+FHaveField+',')> 0)) then
begin
tempFieldDef:=ABFieldDefByFieldName(DataController.DataSet,
DataController.DataSet.Fields[i].FieldName
);
//SQL语句中的字段或数据字典中有定义的字段
if (NOT Assigned(tempFieldDef)) or (tempFieldDef.Fi_IsGridView) then
begin
// DataController.CreateItemByField(DataController.DataSet.Fields[I]);
tempColumn:= CreateColumn;
tempColumn.HeaderAlignmentHorz:=taCenter;
tempColumn.HeaderAlignmentVert:=TcxAlignmentVert.vaCenter;
tempColumn.DataBinding.FieldName := DataController.DataSet.Fields[i].FieldName;
if Name<>EmptyStr then
tempColumn.Name:=Name+StringReplace(DataController.DataSet.Fields[i].FieldName, '|', '_',[rfReplaceAll, rfIgnoreCase]);
ABReFreshCloumnAndControl(DataController.DataSource,DataController.DataSet.Fields[i],tempColumn);
if Assigned(tempColumn.Properties) then
tempColumn.Properties.ValidationOptions:=[evoRaiseException,evoShowErrorIcon,evoAllowLoseFocus];
if (DataController.DataSet.Fields[i].DataType in ABMemoDataType) or
(DataController.DataSet.Fields[i].DataType in ABBlobDataType) then
HeaderPopupMenu.AutoApplyBestFit:=False;
if (Assigned(tempFieldDef)) and (tempFieldDef.Fi_IsGridView) then
begin
tempColumn.HeaderHint:=tempFieldDef.Fi_Hint;
if (tempFieldDef.Field.FieldKind =fkCalculated) or
((Assigned(tempFieldDef.PMetaDef)) and ((tempFieldDef.PMetaDef.Fi_IsAutoAdd) or (tempFieldDef.PMetaDef.Fi_iscomputed))) then
begin
ABSetColumnReadOnlyOrNotEdit(tempColumn,True);
tempFieldDef.Fi_LockGridView :=true;
end
else if ((FReadOnlyField=EmptyStr) or (ABPos(','+tempFieldDef.Fi_Name+',',','+FReadOnlyField +',')<=0)) and
((FEditField=EmptyStr) or (ABPos(','+tempFieldDef.Fi_Name+',',','+FEditField+',')> 0)) then
begin
end
else
begin
ABSetColumnReadOnlyOrNotEdit(tempColumn,True);
tempFieldDef.Fi_LockGridView :=true;
end;
tempIndex:=tempFieldDef.Fi_GridColumnList.IndexOf(tempColumn.Name);
if tempIndex>=0 then
begin
tempFieldDef.Fi_GridColumnList.Objects[tempIndex]:=tempColumn;
end
else
begin
tempFieldDef.Fi_GridColumnList.AddObject(tempColumn.Name,tempColumn);
end;
end
else
begin
ABSetColumnReadOnlyOrNotEdit(tempColumn,True);
end;
if (Assigned(tempFieldDef)) and
(pos(ABEnterWrapStr,tempFieldDef.fi_Caption)>0) then
tempColumn.Position.LineCount:=ABGetSpaceStrCount(tempFieldDef.fi_Caption,ABEnterWrapStr);
end;
end;
end;
finally
DataController.EndUpdateFields;
EndUpdate;
end;
finally
HideHourglassCursor;
end;
end;
end;
3、客户端心跳包没有发送成功的Bug
方法:
ABClientU中的方法
procedure TClientRefreshThread.Execute;
中修改
ABClientForm.ABClientSocket1为 FMainForm.ABClientSocket1
ABClientForm.ABClientSocket1改为ABClientSocket1
4、系统设置中的【开启调试】关闭勾选不生效的Bug
方法:
在ABFrameworkDictionaryQueryU单元中找到函数 function LoadFieldinfo_Base:boolean;中找到如下代码:
tempFieldDef.Fi_Hint :=Format('表名:%s字段名:%s表名描述:%s字段描述:%s',
[tempFieldDef.Fi_Ta_Name+ABEnterWrapStr,
tempFieldDef.Fi_Name+ABEnterWrapStr,
tempFieldDef.Fi_Ta_Caption+ABEnterWrapStr,
ABisnull(tempFieldDataset.FindField(trim('Fi_Hint')).AsString,tempFieldDef.Fi_Caption)]);
然后替换成如下:
if ABLocalParams.Debug then
begin
tempFieldDef.Fi_Hint :=Format('表名:%s字段名:%s表名描述:%s字段描述:%s',
[tempFieldDef.Fi_Ta_Name+ABEnterWrapStr,
tempFieldDef.Fi_Name+ABEnterWrapStr,
tempFieldDef.Fi_Ta_Caption+ABEnterWrapStr,
ABisnull(tempFieldDataset.FindField(trim('Fi_Hint')).AsString,tempFieldDef.Fi_Caption)]);
end
else
begin
tempFieldDef.Fi_Hint :=EmptyStr;
end;