CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2007
    Posts
    7

    Converting numbers to text

    I have a group field that is called event year which takes the year portion out of a date. When I run the report, this four digit number looks like 2,007.00. I want this to read 2007 or 2008...just no comma or decimal places. To do this, in the group expert, I have selected to use the following formula as the group name:

    totext({@eventyear},0000)

    This formula has gotten rid of the decimal places, but still reads 2,007 or 2,008. Does anyone know how to modify this so that the comma goes away too? Please advise.

  2. #2
    Join Date
    Aug 2007
    Posts
    180

    Re: Converting numbers to text

    TRY
    totext({@eventyear},0,"")

    (zero is the number of decimal places, the character between the double quotes is the decimal separator)

  3. #3
    Join Date
    Oct 2007
    Posts
    7

    Re: Converting numbers to text

    I ended up using totext({@eventyear}, "####"). Worked like a charm. Thanks.

  4. #4
    Join Date
    Jul 2004
    Location
    Chennai, India
    Posts
    1,064

    Re: Converting numbers to text

    You can also use pixture function for the same
    Madhivanan

    Failing to plan is Planning to fail

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured