user1518464
user1518464

Reputation: 1

Decimals in Crystal Reports

I spent a few days with a problem that is not how to solve it. I'm doing a report in Crystal Reports with Visual Studio 2010 and it works correctly so far all I have to show decimals, which magically always rounded to the nearest integer, ie if the number is 13.80 rounded to the 14, when I want to leave 13.80.

The stored procedure that retrieves the database retrieves the data correctly. The report and created a variable called "normal" to have a little formula created, that is:

if {pr_recuperar_apuntes_trabajador2; 1.tipo_apunte} = '3 'then

            {pr_recuperar_apuntes_trabajador2; 1.Quantity};

This makes all that proves is that the "tipo_apunte" is the number 3 to show the amount, if it shows nothing. I imagine that the problem is in the formula, but not how to fix it.

Upvotes: 0

Views: 13677

Answers (2)

Hariharan Anbazhagan
Hariharan Anbazhagan

Reputation: 1329

Right click the object and select Format Object. Then click on Customize Button in the window which you get. Then you can see the following dialog box.
rounding decimal

In the above window select the rounding option as 0.01 and Decimals as 1.00 (just for example, u can adjust even more). So that your value will not be rounded for 2 digits. Your value will remain as 13.80

Upvotes: 8

craig
craig

Reputation: 26262

Select the field. Click the 'Increase Decimals' button twice.

enter image description here

Upvotes: 3

Related Questions