"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 4:26PM
    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

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.