Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Rounding issue

Posted on 2013-01-25
6
Medium Priority
?
192 Views
Last Modified: 2013-03-21
I am trying to multiple a field. It's value is 0.0004932 in a formula, Crystal Reports keeps rounding that value to 0. If I do ToText(myfield, 10) It doesn't allow me to multiple the result as it is now a string. Can someone please help ? All I want to do is just multiple the original value of 0.0004932 within a formula without Crystal Reports converting.
0
Comment
Question by:mowit
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 38820300
I presume that this page will help:
http://crystaltricks.com/wordpress/?p=163
0
 

Author Comment

by:mowit
ID: 38820317
AnelIII, I need to do this in a formula, therefore this link doesn't help.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 38820347
a formula will retain the data type precisions used, so you need to make sure your input variables are indeed decimal.
other than that, it's only display format issues.
0
Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

 

Author Comment

by:mowit
ID: 38820383
Crystal shows the field is of datatype number.
0
 

Author Comment

by:mowit
ID: 38820404
Just looked at the XSD and the field is listed as decimal.
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 1000 total points
ID: 38821170
I agree with the above comment.  The values are saved but when you display them they may get rounded.  

Are you displaying the field on the report?
Did you formt it for more than 4 decimal places?
Did you set the rounding so it rounds at 5 decimals or more?

Right click the field.
You should see a NUMBER tab as the displayed tab.
If you don't then it is not a number
If you do select the appropriate format or choose custom to set the appropriate format.

Try using a fixed formula like
10000 * {@YourFormula}

mlmcc
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question