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

x
?
Solved

Stored Procedure passed to Crystal is rounding decimal places

Posted on 2014-03-06
3
Medium Priority
?
357 Views
Last Modified: 2014-03-08
I have a stored procedure.  When I run it on SQL server I see all 5 decimal places.  However, when I bring the data from this stored procedure into my crystal report, the data is being rounded to 2 decimal places.  I have formatted the field on the report to show 4 decimal places, but all I see is the rounded number.  Any idea on how to see 4 decimal places on my report?
0
Comment
Question by:maverick0728
  • 2
3 Comments
 
LVL 26

Expert Comment

by:Kurt Reinhardt
ID: 39910758
Are you using any kind of conditional formatting on the field?  There's an issue in Crystal Reports where the default number of decimals (typically 2) supercedes conditional formatting for the number of decimal places.  I ran into this when I was trying to conditionally show 4 decimals for some records and 2 for others.  I had to first set the default number of places to 4 then conditionally change the value based on my business rules.
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 total points
ID: 39910995
Do you also have the rounding set to 4 decimals?

mlmcc
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 39914869
Rhinok also made that suggestion.  You should have accepted his comment as the answer
I can reopen the question so you can change the answer you acceted
p
mlmcc
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

916 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