• 4.0后续增加功能和修正Bug


    修正的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

  • 相关阅读:
    关于Log4j的初始化
    Golang-interface(四 反射)
    JavaScript学习总结-技巧、有用函数、简洁方法、编程细节
    玩转iOS开发
    小谈一下Java I/O
    [ACM] 最短路算法整理(bellman_ford , SPFA , floyed , dijkstra 思想,步骤及模板)
    已超过了锁请求超时时段。 (Microsoft SQL Server,错误: 1222)
    计数排序
    跟我学solr---吐槽一下,我的文章被抄袭啦
    Navicat11全系列激活工具和使用方法
  • 原文地址:https://www.cnblogs.com/edrp/p/16446396.html
Copyright © 2020-2023  润新知