Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1025
  • Last Modified:

Crystal reports - parameter decimal positions

I want the users to be able to enter a parameter of .005 (or whatever it will be). The number would always have 3 decimal positions. When this is entered it comes in as .01. How can this be corrected?
0
qbjgqbjg
Asked:
qbjgqbjg
  • 2
1 Solution
 
mlmccCommented:
How do you know it comes in as 0.01?

Drop it on the report
Right click it
Click FORMAT OBJECT
Choose a format with at least 3 decimals or use CUSTOM

If you choose to customize
Set decimals to 1.000 and rounding to 0.001

mlmcc
0
 
qbjgqbjgConsultantAuthor Commented:
I had already tried that. It shows as 0.010 when formated with 3 decimal positions.
0
 
mlmccCommented:
Did you also change the rounding?

mlmcc
0
 
James0628Commented:
If you put the parameter on the report and change the decimals and rounding for that field to 3 places, then if you enter .005, you should see .005 on the report.  That works here.

 However, if you refresh the report, the parameter screen may round that to .01, and if you don't change it back to .005, the report will get the rounded value (.01) when it refreshes.

 When you run reports from CR 10, the format for number parameters comes from the default number format in CR.  I'm guessing that CR XI is the same.

 If you're running the report from CR, instead of a viewer or some other app, go to File > Options, select the Fields tab and click Number.  Select the Number tab and change the number of decimals and rounding there to 3, then OK your way out of those screens.  The next time you refresh the report, the parameter should show 3 decimal places.

 The problem is that you're changing the default that will be used for all number parameters and new numeric field formats in every report.  When you run any report with a number parameter, it will have 3 decimal places, and when you add a numeric field to a report, it will default to having 3 decimal places.  But that's the only way I know to change the parameter format.

 James
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now