Testing for a field name

Is there a way to test for the existence of a given field name? I am trying to use a single report with a dynamically changing set of fields in a given dataset.

Regards,
Monte Carver

Comments

  • edited 3:59PM
    Try to use property of TfrxADOQuery.

    ADOQuery based on FR compiled demo => select * from customer c
      ShowMessage( ADOQuery1.FieldAliases.IndexOfName('DoesThisFieldExist'));
      ShowMessage( ADOQuery1.FieldAliases.IndexOfName('Company'));
    

    Mick

Leave a Comment