如何编写复杂的条件SRSS表达式

编程入门 行业动态 更新时间:2024-10-22 16:42:05
本文介绍了如何编写复杂的条件SRSS表达式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在SRSS中有一个结果集,就像我在下面提到的那样。我需要将不是 - 的元素四舍五入到一位小数。我如何在SRSS 2008报告服务中做到这一点。 名称Sio2 HRSG11 - HRSG12 - HRSG13 - HRSG14 1.0212 HRSG15 2.233 HRSG21 23.11 我是这样写的 IIf(Fields!SiO2Lab.Value<> - ,格式(Int(Fields!SiO2Lab.Value),N0),true) 但它给我输出像 名称Sio2 HRSG11 #Error HRSG12 #Error HRSG13 #Error HRSG14 1 HRSG15 2 HRSG21 23 底层SiO2的数据类型是NVarchar(最大值) 请帮帮我 问候 -pep

I have a result set in SRSS like I have mentioned below. I need to round the Elements which are not - to one decimal. How I can do this in SRSS 2008 reporting services. Name Sio2 HRSG11 - HRSG12 - HRSG13 - HRSG14 1.0212 HRSG15 2.233 HRSG21 23.11 I wrote like this IIf(Fields!SiO2Lab.Value <> "-",Format(Int(Fields!SiO2Lab.Value), "N0"),true) But it gives me the output like Name Sio2 HRSG11 #Error HRSG12 #Error HRSG13 #Error HRSG14 1 HRSG15 2 HRSG21 23 The underlying datatype of SiO2 is NVarchar(Max) Please help me Regards -pep

推荐答案

Name SiO2 HRSG11 - HRSG12 - HRSG13 - HRSG14 1.232 HRSG31 2.232 HRSG31 3.344 After writing the expression : IIf(Fields!SiO2Lab.Value <> "-",Format(Int(Fields!SiO2Lab.Value), "N0"),true) Name SiO2 HRSG11 #Error HRSG12 #Error HRSG13 #Error HRSG14 1.232 HRSG31 2.232 HRSG31 3.344

更多推荐

如何编写复杂的条件SRSS表达式

本文发布于:2023-11-28 15:33:17,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1642975.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:表达式   条件   SRSS

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!