change the color each time the name of the server changes

  • abdalah.mehdoini

    SSC Eights!

    Points: 853

    hello ,

    I have a report ssrs which gives me the state of the backup

    I would like to change the color of the line at each

    I change the name of the server

    who has an idea on a tip that can answer my need

    Sans titre



  • Lowell

    SSC Guru

    Points: 323442

    it depends on what you are after. one of the most common requests is to change every  other row for readability.

    an example:

    so in that example,the rownumber*() function needs teh Servername i think, instead of Nothing to change after each server name.



    =IIF(ROWNUMBER(ServerNameColumn) MOD 2, "LIGHTBLUE", "SILVER")


    • This reply was modified 6 months, 1 week ago by  Lowell.


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • abdalah.mehdoini

    SSC Eights!

    Points: 853

    I tried I had this error

    =IIF(ROWNUMBER(Fields!Serveur.Value) MOD 2, "LIGHTBLUE", "SILVER")

    Sans titre

  • Andrey

    Say Hey Kid

    Points: 691

    I would do the following:

    1. add another column to the query (DataSet)  with the following code:
    (DENSE_RANK() over (order by [Serveur]))%2 [n]

    it will enumerate all unique sql servers (column Serveur) with either 1 or 0

    2.  In the report use the following in FILL tab:

    =IIF(Fields!n.Value=1, "LIGHTBLUE", "SILVER")

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply