PC Review


Reply
Thread Tools Rate Thread

converting number to currency type

 
 
=?Utf-8?B?TXVrZXNoIEt1bWFy?=
Guest
Posts: n/a
 
      6th May 2004
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

 
Reply With Quote
 
 
 
 
Jon Skeet [C# MVP]
Guest
Posts: n/a
 
      6th May 2004
Mukesh Kumar <(E-Mail Removed)> 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 - <(E-Mail Removed)>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
 
Reply With Quote
 
=?Utf-8?B?TXVrZXNoIEt1bWFy?=
Guest
Posts: n/a
 
      6th May 2004
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
 
Reply With Quote
 
=?Utf-8?B?TXVrZXNo?=
Guest
Posts: n/a
 
      6th May 2004
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
 
Reply With Quote
 
Jon Skeet [C# MVP]
Guest
Posts: n/a
 
      6th May 2004
Mukesh Kumar <(E-Mail Removed)> 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 - <(E-Mail Removed)>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
 
Reply With Quote
 
=?Utf-8?B?Z3V5?=
Guest
Posts: n/a
 
      6th May 2004
currency has gone away in .NET, use Decimal and CDe

hth guy
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Make Table Query is converting currency field to a number in the t =?Utf-8?B?Q3VydCBKb2huc29u?= Microsoft Access Queries 4 16th Jan 2006 05:40 PM
Converting Currency Field to Number Melih Microsoft Access Queries 2 12th Sep 2004 10:36 PM
Currency and Number data type Mary Ann Microsoft Access Queries 7 25th Mar 2004 12:47 PM
Converting to Currency TYPE in .NET Marcelo López Microsoft C# .NET 0 7th Oct 2003 08:08 PM
Converting Currency Type Marcelo López Microsoft Dot NET 0 7th Oct 2003 08:07 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:55 AM.