Zero Pad a Number

edited 2:35AM 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 2:35AM
    use IFF function for this.
    [IFF(<mydata."mynum"> = 0, '',Format('%.6d',[<mydata."mynum">]))]
  • edited 2:35AM
    Thank you. The IIF statement worked.

Leave a Comment