Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rounding and suming

Status
Not open for further replies.

HowardHammerman

Instructor
Oct 11, 2001
640
US
I have created a report for a client based on an SQL accounting database using the latest version of Crystal. I am summing six columns to three group levels and a grand total. All is well except for one column my grand total is 2 cents higher than the grand total shown in the report provided by their accounting software. This is based on 217 records with a grand total of 104,207.24. Their grand total is 104,207.22.
I exported both sets of records to Excel and compared them. The raw data is the result of multiplying an integer (quantity) times a whole number (price) carried out to four decimals. Crystal is rounding to the nearest penny and then summing. Their program is summing and then rounding. The difference while small is annoying. Is there a way to make Crystal sum then round? Thanks in advance.


Howard Hammerman,
Crystal Training and Crystal Material
On-site classes and one-on-one coaching
Low-cost telephone/email support
 
maybe this will help.

right click on the field in the report.
select format field
click on the number tab
click on the custom style selection
click on the customize button
one of the options is rounding.
you can set it to 4 decimal places
you can then truncate/round the now accurate data in your other formulas
 
Unfortunately that did not work. Not because it is a bad solution but because I must have a data problem.

When I expanded the field in the detail section to six decimals I found that only the first two were being shown.
This is after I said to round to six decimals.

I am starting to think that the data is being rounded to two decimals as it is being read.

I changed the default number of decimals in the File/Options/Fields dialog box with no effect.

I wonder if it has something to do with the DSN we are using?


Howard Hammerman,
Crystal Training and Crystal Material
On-site classes and one-on-one coaching
Low-cost telephone/email support
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top