Skip to Content
avatar image
Former Member

Difference between Cstr and ToText

I am searching all over internet, what is the difference between Cstr and totext?

If they are same, then which one to use when?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jan 08, 2015 at 12:12 PM

    Hi Iti

    There is a difference. If you are familliar to Visual Basic family of functions then Cstr() will not be a new function for you.

    Since Crystal Reports supports Visual Basic syntax it also supports this function. Whereas ToText() is from Crystal Reports implementation though it is available in both Visual Basic and Crystal syntax.

    I don't remember if I had used Totext() as part of Visual Basic anytime.

    The functionality of both functions remains same though.

    Regards

    Nikhil Sabnis

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thank you for the details Nikhil,

      Actually I got this syntax :

      CSTR(totext(abs((number)/anothernumber*100),0))

  • Jan 07, 2015 at 10:48 AM

    Hi Iti,

    There isn't any difference between the two. Usage is completely based on personal choice!

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded