Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. correct the expression of the textbox field

correct the expression of the textbox field

Scheduled Pinned Locked Moved Database
helpcareer
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vinu 1111
    wrote on last edited by
    #1

    hi... to all.. i've written the code in expression field... =format(sum(fields!salary.value),"##\,##\,##\,##\,##\,##\,##0.00") the code is for printing the number in this format(12,23,23,34,123.00) now i got an problem i.e if i give 5 digit the it will print ,,,,,12,123.00 the remaining commas are printed.. i dont want to print the extra commas.. how the word length is there that much it should take..i.e( for 5 digit 12,123.00 and for 9 digit 12,23,23,123.00)... i've tried by removing some of the #'s but it is for fixed number.. please help me...

    G 1 Reply Last reply
    0
    • V vinu 1111

      hi... to all.. i've written the code in expression field... =format(sum(fields!salary.value),"##\,##\,##\,##\,##\,##\,##0.00") the code is for printing the number in this format(12,23,23,34,123.00) now i got an problem i.e if i give 5 digit the it will print ,,,,,12,123.00 the remaining commas are printed.. i dont want to print the extra commas.. how the word length is there that much it should take..i.e( for 5 digit 12,123.00 and for 9 digit 12,23,23,123.00)... i've tried by removing some of the #'s but it is for fixed number.. please help me...

      G Offline
      G Offline
      Geoff Williams
      wrote on last edited by
      #2

      It is customary to group 3 digits at a time. To achieve that you simply need to use "#,##0.00" as your number format - the result will contain as many ',' characters as necessary e.g.

      Format(123.45, "#,##0.00") -> 123.45
      Format(1234.56, "#,##0.00") -> 1,234.56
      Format(12345.67, "#,##0.00") -> 12,345.67
      Format(123456.78, "#,##0.00") -> 123,456.78
      Format(1234567.89, "#,##0.00") -> 1,234,567.89

      V 1 Reply Last reply
      0
      • G Geoff Williams

        It is customary to group 3 digits at a time. To achieve that you simply need to use "#,##0.00" as your number format - the result will contain as many ',' characters as necessary e.g.

        Format(123.45, "#,##0.00") -> 123.45
        Format(1234.56, "#,##0.00") -> 1,234.56
        Format(12345.67, "#,##0.00") -> 12,345.67
        Format(123456.78, "#,##0.00") -> 123,456.78
        Format(1234567.89, "#,##0.00") -> 1,234,567.89

        V Offline
        V Offline
        vinu 1111
        wrote on last edited by
        #3

        thanku.. for reply i have just change the language setting..

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups