在报告服务器中的格式数量为0。##

发布于 2025-01-25 17:25:45 字数 422 浏览 2 评论 0原文

我正在遇到一个困扰我几天的问题。 我一直在通过0。##,#。##,编号格式等在线搜索,但是没有结论,

我在报告服务器中设置了一个报告,并且有一个名为“可用帐户”的列, 可能具有123个数字; ; 123.4; 123.45; 123.4567; 0

我创建格式规则的方式是0. ##; 0。##; 0

123 - > 123。我不想要这种格式,我希望

下面的123 都很好,我非常好对这些格式满意。

123.4 --> 123.4
123.45 --> 123.45
123.45670 --> 123.46
0 --> 0 

有没有任何人想指导我修改这个问题?预先感谢!!

I'm encountering an issue that bothers me a lot for days.
I've been searching online via 0.##, #.##, number formatting, etc., but with no conclusion

I'm setting up a report in report server and there's a column called 'account available',
which might has a number like 123; ;123.4; 123.45; 123.4567; 0

My way to create a formatting rule is 0.##; 0.##; 0

123-->123. I DON'T WANT this formatting, I would like it to be 123

Below are all good, i'm very satisfied with these formatting.

123.4 --> 123.4
123.45 --> 123.45
123.45670 --> 123.46
0 --> 0 

is there any kind person who would like to guide me to modify this issue? thanks a lot in advance!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

淡笑忘祈一世凡恋 2025-02-01 17:25:45

这个问题是Excel中的错误。

该数字在SSR中呈罚款,但是如果您在Excel 123中将相同的格式字符串应用于123。,如您所发现的那样。

要在Excel中解决此错误,您必须使用表达式来基于数字是否是整数来设置格式。当出口到Excel Excel时,该显示如预期的。

您可以在格式属性中使用此类表达式。

=IIF(Fields!myNumberField.Value = CINT(Fields!myNumberField.Value)
    , "0"
    , "0.##; 0.##; 0"
    )

在SSR中,看起来像这样...

”“在此处输入图像说明”

当导出到Excel时,看起来像

“在此处输入映像”

在这两个图像中,左列是未施加的数据,右列具有应用格式表达式。

最后
在几个地方提到了此错误,但我不确定是否已报告 - 可能值得自己检查和报告。

Excel数字格式仅在必要时显示小数

< a href =“ https://superuser.com/questions/1645944/number-format-excel-bug”> https://superuser.com/questions/1645944/number-format-format-format-excel-excel-celcel-bug

This issue is a bug in Excel.

The number renders fine in SSRS but if you apply the same format string to a cell in Excel 123 is returned as 123. as you found out.

To get around this bug in Excel you have to use an expression to set the format based on if the number is an integer or not. When exported to excel this displays as expected.

You can use an expression such as this in the format property.

=IIF(Fields!myNumberField.Value = CINT(Fields!myNumberField.Value)
    , "0"
    , "0.##; 0.##; 0"
    )

In SSRS it looks like this...

enter image description here

When Exported to Excel it looks like this

enter image description here

In both images, the left column is the unformatted data and the right column has the format expression applied.

Finally:
This bug is mentioned in several places but I'm not sure if it has been reported - it may be worth checking and reporting it yourself.

Excel number format to only show decimals when necessary

https://superuser.com/questions/1645944/number-format-excel-bug

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文