Zero Pad a Number

edited 3:18AM in FastReport 3.0
Is it possible for FastReports to zero pad a number?
Have tried <Format('%.6d',[<mydata."mynum">])> and while this will return 123 as 000123. The tfrxMemoView will no longer hide zero values (HideZeros = True). I want to have both the ability to hide zero values and zero pad numbers not equal to zero.

Comments

  • edited 3:18AM
    use IFF function for this.
    [IFF(<mydata."mynum"> = 0, '',Format('%.6d',[<mydata."mynum">]))]
  • edited 3:18AM
    Thank you. The IIF statement worked.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.