Calculated fields
Posted: Tue 27 Jan 2009 18:32
Hello,
I added this code in the BeforeOpen event of my TSmartQuery. The field was created, but the TSmartQuery did not create fields for any of columns of the query. Is there a way to add Calculated Fields in TSmartQuery?
Thanks,
John D.
Field := TIntegerField.Create(qrydata);
Field.FieldName := 'RecNo';
Field.Calculated := True;
Field.Dataset := qrydata;
qryData.OnCalcFields := DataSetCalcFields;
I added this code in the BeforeOpen event of my TSmartQuery. The field was created, but the TSmartQuery did not create fields for any of columns of the query. Is there a way to add Calculated Fields in TSmartQuery?
Thanks,
John D.
Field := TIntegerField.Create(qrydata);
Field.FieldName := 'RecNo';
Field.Calculated := True;
Field.Dataset := qrydata;
qryData.OnCalcFields := DataSetCalcFields;