1

In a field of my groupfooter section of a table I am writing This,

=FormatPercent(IIf((Fields!TotalTask_p1.Value+Fields!SuperVisorsCode.Value)>0,(Fields!TotalCommittedTask_p1.Value+Fields!SuperVisorsCode.Value)/(Fields!TotalTask_p1.Value+Fields!SuperVisorsCode.Value),0))

It is not raising any build error. But when I preview the report it shows "#Error" in that field. What should be done?

Mimi
  • 389
  • 4
  • 19

1 Answers1

1

You need make sure both the divider value are non zero and also make sure the right conversion is done lots of time thee error raise in ssrs expression is due to the fact that conversion is not done.And also make sure the all the values in column are numeric.

 =FormatPercent(IIF((CInt(Fields!TotalTask_p1.Value) + CInt(Fields!SuperVisorsCode.Value)) > 0 ,    
  (CInt(Fields!TotalCommittedTask_p1.Value) + CInt(Fields!SuperVisorsCode.Value))/(Cint(Fields!TotalTask_p1.Value) + CInt(Fields!SuperVisorsCode.Value))
  ,0))
Mahesh
  • 8,694
  • 2
  • 32
  • 53
  • Can you see what is error message in bottoms error window – Mahesh Feb 10 '15 at 05:40
  • ‘textbox80’ contains an error: Input string was not in a correct format. – Mimi Feb 10 '15 at 05:43
  • can you do one thing create 1 separate columns in tablix temprorry and put `IIF((CInt(Fields!TotalTask_p1.Value) + CInt(Fields!SuperVisorsCode.Value)) > 0 , (CInt(Fields!TotalCommittedTask_p1.Value) + CInt(Fields!SuperVisorsCode.Value))/(Cint(Fields!TotalTask_p1.Value) + CInt(Fields!SuperVisorsCode.Value)) ,0)` in that box and let me know what happens And does any of the column contains null value ? – Mahesh Feb 10 '15 at 05:45
  • No, there is no any null value. and still showing #Error in the seperate columns. and the error msg : The Value expression for the textbox ‘textbox95’ contains an error: Input string was not in a correct format. – Mimi Feb 10 '15 at 05:56
  • Ok so now both the values in two separate columns `CInt(Fields!TotalCommittedTask_p1.Value) + CInt(Fields!SuperVisorsCode.Value)` in one column and `(Cint(Fields!TotalTask_p1.Value) + CInt(Fields!SuperVisorsCode.Value)` in another column. Sorry I can not reproduce the same issue at my end thats why you need narrow down the expression which is causing error. – Mahesh Feb 10 '15 at 05:59
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/70612/discussion-between-mimi-and-coder-of-code). – Mimi Feb 10 '15 at 06:04