Databasefields not reflecting the database content after "OnGetText" modification

Hi

I do have a problem with creating a report.

In my delphi, I have a dataset, containing 2 fields:

  • TWideStringField
  • TIntegerField

Both fields have an "OnGetText" eventhandler that can modify the displayed content

Eks TIntegerField.OnGetText:

Case Sender.AsInteger of:

1: Text:='Low';

2: Text:='Medium';

3: Text:='High';

else Text := 'Unknown';

end;

Adding this field to a MasterBand in the report, it shows correctly

Eks: TWideStringField.OnGetText

Text := Sender.AsString + ' Text added';

Adding this field to a MasterBand in the report, it shows only the raw database string and not the modified string.

(In the TDBGrid in Delphi, it displays correctly)

Any suggestion?

Br.

Anders

Comments

Leave a Comment