"Cannot assign a TFieldList to a TStringList"



Hello,

I developed a DLL with Preview of FastReport

The report is show but this exception is throw:
EConvertError "Cannot assign a TFieldList to a TStringList"

I use C++ Builder 6 Pro.

Thanks

Comments

  • edited 10:11AM
    KingOrmon wrote:
    Hello,

    I developed a DLL with Preview of FastReport

    The report is show but this exception is throw:
    EConvertError "Cannot assign a TFieldList to a TStringList"

    I use C++ Builder 6 Pro.

    Thanks
    I try it by this:

    changed frxDBSet.pas

    procedure TfrxDBDataset.GetFieldList(List: TStrings);
    var
    i: Integer;
    begin
    List.Clear;
    if FieldAliases.Count = 0 then
    begin
    try
    if FDS <> nil then
    begin
    //FDS.GetFieldNames(TStrings(List)); <--old
    for i := 0 to FDS.FieldCount - 1 do <-- new
    List.Add(FDS.Fields.FullName); <--new
    //
    end;
    except
    end;
    end
    else
    begin
    for i := 0 to FieldAliases.Count - 1 do
    if Pos('-', FieldAliases.Names) <> 1 then
    List.Add(FieldAliases.Values[FieldAliases.Names]);
    end;
    end;

Leave a Comment