Print Page | Close Window

Formatting Numbers Help

Printed From: Crystal Reports Book
Category: Crystal Reports .NET 2003
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=5796
Printed Date: 04 May 2025 at 8:37am


Topic: Formatting Numbers Help
Posted By: jrs1234
Subject: Formatting Numbers Help
Date Posted: 16 Mar 2009 at 2:18pm
Hello,
 
I have a numeric field for vacation that comes into my CR and I need to add in a decimal place ..
 
data coming in could be:
 
4250 --> needs to look like this:  42.50
928 -->needs to look like this : 9.28
 
I have tried totext() but that is not giving me what I need. I would think this would be a simple thing .. unless I am missing something (and obviousl I am!)..
 
Thanks,
JennConfused



Replies:
Posted By: lockwelle
Date Posted: 18 Mar 2009 at 6:26am

You say could be like that...will it always be? 

I guess I build a formula.  I would check the totext to see if it has a decimal in it, if so, leave it alone, if not, divide by 100.  this should work for preformatted values and non formatted, but if 4250 comes in and that is the value you want OR it can come in as 4250 and you want 42.50 or 425, you are going to need an identifier of some sort to know how much to divide by.
 
Hope this helped


Posted By: jrs1234
Date Posted: 18 Mar 2009 at 6:38am
Thanks - that helped and I was able to create the formula and all is good. I really appreciate it !!!



Print Page | Close Window