Print Page | Close Window

3 decimel places

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=8811
Printed Date: 05 May 2024 at 5:46pm


Topic: 3 decimel places
Posted By: Mayoflash
Subject: 3 decimel places
Date Posted: 06 Jan 2010 at 6:23am
CR 8.0
 
Currently on an engineering report the tolerence column has 2 decimal places (1.00). However, I need to increase this to 3 (1.000). How would I go about doing this?
 
Below is the current code used:
 
if {equip.cservice}= "Weigh Scale" or {equip.cservice} = "Weight Indicator Transmitter"
then left(cstr({toldetail.nupptol}),len(Cstr({toldetail.nupptol}))-1)
else Cstr({toldetail.nupptol})
 
Regards
 


-------------
Crystal Novice



Replies:
Posted By: kevlray
Date Posted: 07 Jan 2010 at 8:54am
Is it just needed to display an extra zero?  I see that the value displayed is a string.  It kinda depends what you are trying to achieve.  If the last digit is always going to be a zero, then you can add that to the end of the string. 

If the data field is not large enough on the data source, then that would have to be done at the data source.

Otherwise maybe it could be converted back into a number and the number of digits to right of the decimal could be set.


Posted By: Mayoflash
Date Posted: 07 Jan 2010 at 9:14am
Hello Kevlray,
 
The data source is as follows:
 
                 kg Tolerance Range
                -0.003 TO +0.003
 
However, the Crystal Report is as follows:
                
                 kg Tolerance Range
                 -0.00 TO +0.00
 
The decimal place is missing. How do I resolve?
 
Regards


-------------
Crystal Novice



Print Page | Close Window