LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  RH justification - numerics

    Employee
    Posted 12-13-2009 22:48

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: PGeee

    If I emit a numeric field, (eg bdouble), in BRDViewer it will be left justified. If I then output to HTML it's still left justified. I can pad with zeroes but it looks ugly. I just want normal RH justified fields, a la Excel Format num 0 and Excel format 0.000

    ie it's important that if I have decimal places the zeroes are retained.

    have tried format, trim, pad , running out of options


  • 2.  RE: RH justification - numerics

    Employee
    Posted 12-15-2009 07:57

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: rboccuzzi

    To right-justify as a string, you can do this:
    newStringField = format("%20.2f", oldNumberField)


    It will still look odd in the brdViewer, as we use proportional spacing and spaces are therefore not the same as other characters. But if you output this to html, I think it will do what you want. The 20 means pad the number with 20 spaces, the .2 means show 2 places to the right of the decimal. I hope this does what you are looking for.

    Cheers
    Rich