converting number to currency type

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Mukesh Kumar said:
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?
 
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
 
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
 
Mukesh Kumar said:
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);
}
}
 
Back
Top