truncate a text in dbtext
I' sorry, but not have I understand well the procedure that me explain.
You could detail me more as being able to truncate the text of a dbtext and
can me
posteriorment to assign it to a label or a variable.
That type of code I must use to truncate part of the text of the dbtext and
that code I
must use to assign to the label or to variable it again.
graces.
You could detail me more as being able to truncate the text of a dbtext and
can me
posteriorment to assign it to a label or a variable.
That type of code I must use to truncate part of the text of the dbtext and
that code I
must use to assign to the label or to variable it again.
graces.
This discussion has been closed.
Comments
You will need to retrieve the field value inside the DetailBand.BeforePrint
event, then using any number of Delphi string handling routines, truncate
the field value as you need. Then assign the result to the Text property of
a TppLabel inside the detail band. Something like the following...
lsFieldValue := Report.DataPipeline['MyField'];
liTruncPos := Pos(':', lsFieldValue);
liSubStrCount := Length(lsFieldValue) - liTruncPos;
lsFieldValue := Copy(lsFieldValue, liTruncPos, liSubStrCount);
Label.Text := lsFieldValue;
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com