Change font color for a column when the value changes

ぃ、小莉子 提交于 2019-12-12 19:23:44

问题


if i have a column where the values are repeated across rows and i want to change the color of the font when the value changes, how do i do this?


回答1:


You can define an expression for the font color. In Visual Studio/Business Intellligence:

  1. Select the cell you want to alter the colour of the font in
  2. Navigate to the Color listing in the Properties, and select it
  3. Click the Dropdown arrow that appears next to the value it's current set to (typically Black)
  4. Under the Web tab, select Expression (top of the list) - the Edit Expression dialog will appear
  5. You can use the IIF in combination with the PREVIOUS function to compare values. IE:

    =IIF(Fields!Registrations.Value <> Previous(Fields!Registrations.Value), 
          "Black", 
          "Blue")
    

    If true, this expression will colour the font black -- if false, blue.



来源:https://stackoverflow.com/questions/3096455/change-font-color-for-a-column-when-the-value-changes

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