0

wuz up guys, didnt know where to post this topic.
Well here is my problem

how can I change a varchar to number in crystal report
the value has a "-" dash in it and I wanted to convert this to number so I can display the number to arabic.

for example is 1-324 will be converted to a number.
is this possible?
tnx in advance

2
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by Kusno
0

Hi doods,
Let me help you....

Stringvar S;
Numbervar N;

S := "1-324";

N := ToNumber(replace(s,"-",""));

the result is : 1,324.00.

to conver it to Arabic, eehmmmm :-/

Thanks.

0

tnx for the reply kusno but the "-" is needed for the report.
and another question is that if there is a zero in front of the number for example 0112233, crystal doesnt shows the zero in front, it only shows the 112233 numbers.
Do you have any ideas about this?

0

I don't get at with what you want. If you want to convert it to numeric, of course you need to remove character symbol.
But, you want to display it in an report, so you don't need to convert it anymore....

For last case, I didn't see if Crystal Report can display it to 0112233.
I think, you can use Reporting Services instead of Crystal Report because Reporting Services can use VB format.

Thanks.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.