четверг, 21 января 2016 г.

FastReport Number Format with Leading Zeros (FastReport VCL)

Problem


Delphi 7 Application with FastReport 4. I need field "document number" to be with leading zero in FastReport report.

Solution

Use FastReport Format Function in Delphi-style manner.

Delphi Example

str := Format('%.*d',[length, number]);
str := Format('%.*d',[3, 7]);
//str is '007'


FastReport Example

[Format('%.*d',[6,<frxDBDataset1Order."NUMBER">])]


Комментариев нет:

Отправить комментарий