Fields from TfrxDataSet

edited October 2015 in FastReport 4.0
How do you get all the fields into a TstringList via script? I want to do something like:
var
  data_list: TStringList;
  estDataList: TfrxDataSet;
begin
  estDataList := Report.GetDataSet('EstData');
  [color=#FF0000]data_list := estDataList.GetFields();[/color]
end.

Comments

  • edited 12:26PM
    After a couple days of looking I found the answer to my own question. (Fast Reports needs better docs)
    var 
      fields: TStringList;
      estDataList: TfrxDataSet;
    
    begin
      estDataList := Report.GetDataset('EstData');
      fields := TStringList.Create;
    
      estDataList.GetFieldList(fields);
    end.
    

    The name of the Procedure GetFieldList makes sense, what throws me off is the fact that you pass an empty TStringList to it.... to me it would make more sense to call the procedure and have it just return a TStringList.

Leave a Comment