简体   繁体   English

在获得csv输出时,内括号值将变为负数-SSRS 2008

[英]Inside bracket values goes to negative when getting a csv output - ssrs 2008

I have a matrix in ssrs 2008 and have an expression in one of its columns like: 我在ssrs 2008中有一个矩阵,并且在其中的一列中有一个表达式,例如:

= 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). 这很好,可以将值放入Jack(7.04)或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). Name是可为空的值,因此,如果为null,则此单元格的值就像(7.23)或(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. 我的问题是,当我运行报表并将输出作为csv文件时,名称为NULL的数据都将转换为负值,而在输出文件中没有括号,如-7.23或-6.11。 I would like to see them like on the report output, (7.23) etc, on the csv file as well. 我也希望在csv文件的报告输出,(7.23)等上看到它们。

Current csv output 当前的CSV输出

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. 请注意,它对于pdf或excel输出工作正常,仅对csv输出有效。 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 ')'. 编辑:似乎是因为'('字符而发生的。当我使用另一个字符,例如'['时,它正在工作。但是我应该使用普通的括号'('和')'。

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 & ")") 1.是否尝试使用文本框属性(文本框属性->数字->负数)2.请尝试使用if语句或switch语句=iif(Fields!score.Value>0,Fields!Name.Value & "(" & Fields!Score.Value & ")","(" & Fields!Score.Value & ")")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM