Report Viewer - setting decimal places for a text field value

I am using Report Viewer Control (rdlc) to create reports. One of my columns matters

=AVG(Fields!Reading.Value, "CellReading_Reading")

I get a value with 10 or more decimal places. But I want to round it to 3 decimal places. What is the expression for this?

Thank. Nlv

+3
source share
4 answers
FormatNumber(AVG(Fields!Reading.Value, "CellReading_Reading"),3)
+15
source
  • Right click text box
  • Choose a number
  • Choose a room from the category
  • Set Decimal Placesto 0
+2
source

cdonner , . , , 1 , ...

= FormatNumber ( (! Actual_Measurement.Value, "Measured_Result" ), 1) & ; "(" FormatNumber (First (Fields! Allowed_Min.Value, "Measured_Result_Details" ), 1) & ; "-" FormatNumber ( (! Allowed_Max.Value, "Measured_Result_Details" ), 1) & ; ")"

, , ...

15.3 (12 - 16)

... Actual_Measurement = 15.3, Allowed_Min = 12 Allowed_Max = 16

1 "Measured_Result_Details" 1 "Measured_Result" . "", " " "" - "Measured_Result_Details" "Measured_Result" . , 1 , , 1 !

0

, Math.Truncate:

=Math.Truncate(1000*(AVG(Fields!Reading.Value, "CellReading_Reading")))/1000

this .

.

0

Source: https://habr.com/ru/post/1731660/


All Articles