473,396 Members | 2,140 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

converting number to currency type

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
5 7104
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
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
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
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
guy
currency has gone away in .NET, use Decimal and CDe

hth guy
Jul 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: alien2_51 | last post by:
At some point after running this report the "Wholesale Price" column data type in the excel spread sheet changes from Currency to General... It seems to ba around the 300th or so row but varies......
0
by: Marcelo López | last post by:
Hello everybody. I'm working with an office pivot table and i have to convert from its currency type to a decimal (in C#) , operate with the result and then re-convert it to the currency type to...
3
by: Caesar Augustus | last post by:
Hello Tom, Long time listener, first time caller... I have been working with vb code to automate a salary increase process that not only rounds to the nearest penny but also rounds to the...
13
by: jm | last post by:
I am trying to use datepart to get the real name of the month like "April" or "APR" not just "4." I could not find it in the documentation. Sorry. Thank you.
0
by: Marcelo López | last post by:
Hello everybody. I'm working with an office pivot table and i have to convert from its currency type to a decimal (in C#) , operate with the result and then re-convert it to the currency type to...
5
by: Mukesh Kumar | last post by:
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...
11
by: Penfold | last post by:
I'd appreciate help converting student average test scores into grades. My problem is that I need to allocate one of about 20 grades (3a,3b,3c,4a,4b,4c etc through to 8c plus a couple of others)....
1
by: pebelund | last post by:
Hi I got an .aspx that got the following code (example) <td width="120"> <% = row %> </td> row takes a value from a SQL db, that is a string of numbers. On the webbsite I want this to show...
116
by: Dilip | last post by:
Recently in our code, I ran into a situation where were stuffing a float inside a double. The precision was extended automatically because of that. To make a long story short, this caused...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.