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 11:58PM
    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

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.