Writing Code
 Crystal Reports Forum : Crystal Reports .NET 2003 : Writing Code
Message Icon Topic: Removing commas from arithmetic operations Post Reply Post New Topic
Author Message
scottghelfi
Newbie
Newbie


Joined: 22 Dec 2009
Location: United States
Online Status: Offline
Posts: 2
Quote scottghelfi Replybullet Topic: Removing commas from arithmetic operations
    Posted: 04 Jan 2010 at 11:55am

Hi,

I am performing some basic arithmetic operations on numerical values.

For example,
 
Local NumberVar UL := ToNumber ({?UpperLimit});
//taking a user entered parameter and making it a numerical variable
 
UL := UL * 1.05;
// I want to get a value that is 105% of the parameter. I am passing this on to some chart macros
 
The problem that I am having is that a number like 6000 is fine and dandy, but as soon as I perform a math operation on it, it becomes 6,300 instead of 6300.
 
How can I get an result of 6300, or failing that, what code do I use to remove commas from a numeric variable?
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 03 Feb 2010 at 8:23am
If you are just talking about displaying the comma or not, that is an display option for the field. 
 
There are several different ways to 'not' display the comma.  If you do not want it displayed for all numbers.  Go to File, Options, Fields, Number (I am assuming it is a number field), Click on the Number tab and choose a format without a comma.
 
I hope this helps.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.047 seconds.