By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,081 Members | 862 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,081 IT Pros & Developers. It's quick & easy.

converting number to currency type

P: n/a
hi

I am trying to pass range parameters to crystal reports from my .net environment. The start and end values of the range parameters are of currency type. I need to convert the number to currency data type for which I am using CCur function provided by .Net, but it throws an error stating "The name 'CCur' does not exist in the class or namespace.

Any help would be appreciated. Thanks in advance

Mukes

Jul 21 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Mukesh Kumar <mu*****@yahoo.com> wrote:
I am trying to pass range parameters to crystal reports from my .net
environment. The start and end values of the range parameters are of
currency type. I need to convert the number to currency data type for
which I am using CCur function provided by .Net, but it throws an
error stating "The name 'CCur' does not exist in the class or
namespace.


I haven't heard of CCur before, and it doesn't appear in the MSDN index
except under scripting. Could you say where you saw that it was
provided by .NET?

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #2

P: n/a
hi Jon

Please search for CCur in MSDN and select the option Currency(crystal syntax). It is not available in the index. If you have any other option to convert from number to currency then please help me

Thanks in advanc

Mukesh
Jul 21 '05 #3

P: n/a
Jon

I believe CCur is a function of visual basic for application which can be used in crystal reports. but is there any equivalent in .net Framework

Sorry and thanks

Mukesh
Jul 21 '05 #4

P: n/a
Mukesh Kumar <an*******@discussions.microsoft.com> wrote:
Please search for CCur in MSDN and select the option Currency(crystal
syntax). It is not available in the index.
That's a function within Crystal Syntax for formulas - it's not a
method within a .NET type.
If you have any other
option to convert from number to currency then please help me.


You can use the "C" standard numeric format specifier, eg

using System;

public class Test
{
static void Main()
{
Console.WriteLine ("{0:C}", 1.5);
}
}
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #5

P: n/a
guy
currency has gone away in .NET, use Decimal and CDe

hth guy
Jul 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.