0

I have a matrix in ssrs 2008 and have an expression in one of its columns like:

= Fields!Name.Value & "(" & Fields!Score.Value & ")"

This is working fine and bringing the values inside the brackets like Jack(7.04) or John(6.39). Name is a nullable value, so if it is null then the value for this cell is simply like (7.23) or (6.11). My problem is that when I run the report and take the output as a csv files, the data who has NULL as their names are all converted to negative values without brackets in the output file like -7.23 or -6.11. I would like to see them like on the report output, (7.23) etc, on the csv file as well.

Current csv output

Jack(7.04)
John(6.39)
-7.23
-6.11

What I want

Jack(7.04)
John(6.39)
(7.23)
(6.11)

Note that it is working fine for pdf or excel outputs, it is only happening for csv outputs. How can I fix it? Any help would be appreciated.

Edit: It seems like it is happening because of '(' character. It is working when I use another, like '['. But I am supposed to use normal brackets '(' and ')'.

Eray Balkanli
  • 7,752
  • 11
  • 48
  • 82
  • Are you using excel for viewing the produced CSV file? Try using notepad. I think this issue is related to your editor or CSV visualizator. – alejandro zuleta Apr 19 '16 at 18:55
  • Yes, you are right. When I use notepad, I see them like (7.04), but when I use excel then I see them -7.04. It seems like I need to use something different than regular brackets. Thanks – Eray Balkanli Apr 19 '16 at 23:21

1 Answers1

0

it's just a comment i don't have enough reputations to make comment.

Here are couple of thoughts. 1. Did you try with the text box properties (Text box properties -> Number -> Negative numbers) 2. Try with if statement or switch statement=iif(Fields!score.Value>0,Fields!Name.Value & "(" & Fields!Score.Value & ")","(" & Fields!Score.Value & ")")

Hari
  • 192
  • 2
  • 12