开发者

Reporting Services Format as number

I'm trying to format a column in reporting services to display a number with thousand separator and with commas. The expression I'm using is the following:

=Format(Fields!Price.Value, "#,##0.00")

It works great. Also if I use the expression:

=FormatNumber(Fields!Price.Value, 2, true, false, true)

works great too. The PROBLEM is when converting to excel. The column displays in excel as expected but the format of the cell is General instead of number with thousand separator. As a result users cannot apply 开发者_开发问答formulas to the columns due to is treated as string (General formatting). I know I can convert in excel the column to Number format but I'd like that when converting to excel via reporting services the column just appears in number format.

Is it possible? Searching in google doesn't give me any clues.

Thanks in advance


The problem is that Format returns a string so that is what it is converting to in Excel.

To acheive what you want, simply format the item using the Format property. Click on the cell, open the property window and update the Format property to be #,##0.00

Even better, to make your application international, update the Language property of the report to be =User!Languageand then use N2 as your format property for the cell.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜