cancel
Showing results for 
Search instead for 
Did you mean: 

Difference between Cstr and ToText

Former Member
0 Kudos

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

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

Accepted Solutions (1)

Accepted Solutions (1)

nikhil_sabnis2
Active Participant
0 Kudos

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

Former Member
0 Kudos

Thank you for the details Nikhil,

Actually I got this syntax :

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

Answers (1)

Answers (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Iti,

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

-Abhilash

Former Member
0 Kudos

Ok, Thanks Abhilash.

I saw few people using Cstr(totext(number)), thats why I am confused.

abhilash_kumar
Active Contributor
0 Kudos

Hi Iti,

The syntax doesn't make sense to me too!

It should just be one of totext(number) or cstr(number).

-Abhilash