SSRS Cell Colour Dependent on Another Cell Value

吃可爱长大的小学妹 提交于 2019-12-11 15:42:33

问题


I'm trying change a cell background colour depending on another cell value, or if the cell value has zero I want a dash like this "-".

This is the formula I'm using, and currently the cell I want to have the dash in when the other cell is at Zero is showing 0.00

=IIF(Fields!RateAmount.Value = 0,"-",(switch(Fields!PercentageDifference.Value <= -10, "Red",
Fields!PercentageDifference.Value >= 10, "Red", True, "Green")))

When searching on here all I can find is an answer for googlesheets, if you do know of a post, please fele free to let me know!

Any help would be very well received! Cheers all


回答1:


I'm not sure you can change the background color in the same expression you're putting the dash "-".

I would try to change your expression with =IIF(Fields!RateAmount.Value = 0,"-","(other text when it's not a dash)")

Then, in properties of your cell, go to BackgroundColor and put something like =switch(Fields!PercentageDifference.Value <= -10, "Red", Fields!PercentageDifference.Value >= 10, "Red", True, "Green")



来源:https://stackoverflow.com/questions/52757766/ssrs-cell-colour-dependent-on-another-cell-value

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!