cancel
Showing results for 
Search instead for 
Did you mean: 

Values are automatically rounded after 15 posts

Former Member
0 Kudos

Hello,

we are working with a MySQL Database 5.0.18. To access of this database we use a MySQL ODBC 3.51 Driver. In the database is the value 8012115284696055 fromTyp bigint (20) When we paste this field in the report, we get the value 8012115284696060, but we need a not rounded value. What can we do?

Thank you.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Morning Daniel,

I am not sure which formula will set on your situation however here are few examples taken from CR help file. See if anyone of them suits your needs. Alternatively, you can right click on the field and click on the Number tab and setup the layout of the number by clicking on Customize button.

Round(2345.23456,4)

Returns 2345.2346.

Round(2345.23456,3)

Returns 2345.235.

Round(2345.23456,2)

Returns 2345.23.

Round(2345.23456,0)

Returns 2345.

Round(2345.23456,-1)

Returns 2350.

Round(2345.23456,-2)

Returns 2300.

Round(2345.23456,-3)

Returns 2000.

Round(1.234499,3)

Returns 1.234.

Round(1.234500,3)

Returns 1.235.

Hope this helps

Regards

Jehanzeb

Former Member
0 Kudos

Hello Jehanzeb,

thank you for your message, but this is not the cause.

The value ist an integer. Decimal place = 0.

We have already tried to format this field, without success.

When we make a formula and convert the integer to a text (ToText), the result remains the same.

I try to clarify my problem with the screenshot:

Link: [http://s2b.directupload.net/file/d/1589/qcneptm4_jpg.htm]

Have you any idea???

Maybe a bug in the software???

Regards

Daniel

Former Member
0 Kudos

Can you convert the number into a string and display it unless you are using it for other calculations?

Here I have found something which might help you a little. taken from another source

"

The fix there was to actually convert the number to a string (VARCHAR) within the database, so the value that CR got was a string, instead of a number. That may or may not be an option for you, depending on your circumstances.

If you simply want to show the value on a report, you could try creating a formula like the following:

+CStr ({table.field} / 100000, "#") ++

CStr (Round ({table.field} - (Truncate ({table.field} / 100000) * 100000)), "00000")

Make the formula name whatever you want. Replace every {table.field} with your field name and put that formula on the report. The formula just tries to split the number into two pieces, convert each piece to a string and concatenate them back together. No guarantees!"

Let me know if the above helps?

Regards

Jehanzeb

Former Member
0 Kudos

Morning Jehanzeb,

thank you very much for your help. This was the solution.

Regards

Daniel Pakura

Former Member
0 Kudos

Daniel I am happy that it has resolved your issue. Personally I don't think I should be getting the praise for this as I did not knew it myself.

However your question has taught me a new thing. So in theory I should be thanking you for your question.

)

Regards

Jehanzeb

Answers (0)