[英]Unable to write SSRS expression
My query result set is: 我的查询结果集是:
Eid Cycle1 Cycle2 Cycle3 Cycle4 CountOfCycle
1 0.75 0 0 0 2
The result in the SSRS report should be: SSRS报告中的结果应为:
Eid Cycle1 Cycle2 Cycle3 Cycle4 CountOfCycle
1 0.75 1 0 0 2
Depending on the countofcycles, 0s should be converted to 1s in the SSRS report.If there is a value already for the cycle, it should be left in that cycle. 根据周期数,SSRS报告中应将0转换为1,如果该周期已经有一个值,则应将该值保留在该周期中。 Another example:
另一个例子:
Eid Cycle1 Cycle2 Cycle3 Cycle4 CountOfCycle
1 0.75 0 0 0 3
SSRS report would be: SSRS报告将是:
Eid Cycle1 Cycle2 Cycle3 Cycle4 CountOfCycle
1 0.75 1 1 0 3
I am unable to code it in SSRS using expression.Depending on the value of CountOfCycle I have to convert 0s to 1s. 我无法使用表达式在SSRS中对其进行编码。根据CountOfCycle的值,我必须将0s转换为1s。 CountOfCycle is the number of cycles with some value other than 0.
CountOfCycle是具有一些非0值的循环数。
It's not entirely clear what your criteria is, but I think the expression would be: 尚不完全清楚您的标准是什么,但我认为表达式是:
Cycle2: 周期2:
If(Cycle2 = 0 AndAlso CountOfCycle >= 2, 1, Cycle2)
Cycle3: 周期3:
If(Cycle3 = 0 AndAlso CountOfCycle >= 3, 1, Cycle3)
And so on... 等等...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.