Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. how to change a color of particular word in the row in ssrs reports

how to change a color of particular word in the row in ssrs reports

Scheduled Pinned Locked Moved Database
sql-servertutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vinu 1111
    wrote on last edited by
    #1

    hi.. i've created an report in which i want to change the color of the particular word i've four words which i want to change the color john,steve,mike,and danial.. for these name where ever they appear in the row the color should change is it possible.. ??

    W 1 Reply Last reply
    0
    • V vinu 1111

      hi.. i've created an report in which i want to change the color of the particular word i've four words which i want to change the color john,steve,mike,and danial.. for these name where ever they appear in the row the color should change is it possible.. ??

      W Offline
      W Offline
      Wendelius
      wrote on last edited by
      #2

      Hi, You can use BackgroundColor-property to change the color and define an expression how the color is set. What comes to the color itself, you can for example resolve the color in the formula or add an extra field to your query which defines the color, like:

      SELECT ...
      CASE
      WHEN LOWER(table.NameField) LIKE '%john%' THEN 'Red'
      WHEN LOWER(table.NameField) LIKE '%steve%' THEN 'Blue'
      ...
      ELSE 'White'
      END AS BackgroundColor,
      ...
      FROM ...

      Now each row should have a color field which you can use in the expression for the BackgroundColor-property. If you want to do this in more elegant way you can create a table for the name/color pairs and use that table for lookups and possibly create a small T-SQL function for the logic.

      The need to optimize rises from a bad design.My articles[^]

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups