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

  • 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..

    ??

  • I'm not sure, but you could wrap those in words in html tags and render reports in html mode.

  • Hi Vinyak,

    you can achieve this by writing a custome code vb.net which checks names in john,steve,mike,and danial ... if present then returns certain value say 1 . based on the value u can change the color of the text

  • 1. do you want to change color of row or word

    2. will this word come in any particular column or any of the existing columns

  • 1. Are these names, field values that are being returned from your db?

    2. Are you using SSRS 2008?

  • You can't really control the format of individual words in a text box before SSRS 2008. In 2008 you can use the Create Placeholder option in a text box to create different formating.

    If you Google ssrs create placeholder or something like that you should find what you want.

  • Hi,

    you can change their colors.

    right click on that particular text box go to properties and click on fill color

    in that write following code

    iff( field!name.value='Steve',"colorname") if u want for more names then go for switch.

    hope this helps you

  • thanku .. nandu it has worked for me..

    but can i do in this way.

    in single row

    steave : hi good morning jhon :fine steave:what are u doing

  • as I already said, you can if you wrap them in html tags. You could use Replace() in you SQL query.

  • sorry.. i dont know how to do that..

    that's i've asked once again..

  • ok, that's why we're here.

    Right click on your placeholder in SSRS and click Placeholder Properties.

    Within the general tab, choose radio button "HTML - Interpret ..." and click OK.

    Now go to your SQL query or stored proc that feeds your data set and find the field containing John and Steve etc.

    Wrap it like that:

    REPLACE(T.YourField, 'John','<font color="red">John</font>') as YourField

    Rerun your report.

  • this is my sp

    REPLACE(Comments, 'vinni','<font color="red">raki</font>') as comment

    where ever i encounter vinni it has replaced with raki

    and the output is displayed like this

    asdf <font color="red">raki</font> : adlfkja;<font color="red">raki</font> :adfa adf adf adf adf adf adf adf

  • did you do the first step?

    are you running SSRS 2005?

  • ya i have done the first step

    selected the HTML radio button

    and

    i'm using ssrs 2008 enterprice edition..

  • If you're a 100% sure then I'm clueless as I have it working right now in front of my eyes.

    Select the placeholder, view properties F4, MarkupType should say HTML.

Viewing 15 posts - 1 through 15 (of 21 total)

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