Author |
Topic |
tikus
Starting Member
31 Posts |
Posted - 2004-11-26 : 20:18:44
|
Hello, can somebody please show me how to set alternate row color in the report? For example, Odd row = white and Even Row = yellow. Thanks! |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-11-29 : 12:36:22
|
From BOL:quote: FormattingYou can use expressions to vary the appearance of report items in a report. The following expression, when used in the Color property of a text box, changes the color of the text depending on the value of the Profit field: =Iif(Fields!Profit.Value < 0, "Red", "Black")The following expression, when used in the BackgroundColor property of a report item in a data region, alternates the background color of each row between pale green and white: =Iif(RowNumber(Nothing) Mod 2, "PaleGreen", "White")
Tara |
 |
|
tikus
Starting Member
31 Posts |
Posted - 2004-11-29 : 18:14:42
|
Wow. Thanks! |
 |
|
gcowhsu
Starting Member
38 Posts |
Posted - 2005-01-20 : 18:23:01
|
What if I want to change the background color when the user mouses over the row?I want highlight the row that the user's mouse is over, is this possible? |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-01-20 : 18:26:35
|
I do not believe that this is possible with Reporting Services. There is no property that I can find to do this on a row. I guess you would do this in ASP.NET or whatever and not using Reporting Services to view this data.Tara |
 |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2005-01-20 : 18:52:01
|
You can do this in a web page via JavaScript, however, I couldn't really tell you how to go about getting this into an RS report, and I don't know how or if it would interfere with the RS web viewer control. Plus you'd have to remember to add code for the mouseout event so that the color changes back to the original.Frankly I doubt it's worth the hassle to provide such a feature. |
 |
|
Kristen
Test
22859 Posts |
Posted - 2005-01-21 : 12:47:35
|
I don't know anything about Reporting Services, but could you use CSS to change the behaviour of the TR tag?krsiten |
 |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2005-01-21 : 13:07:57
|
It depends. In Firefox, Mozilla, Opera, and a few other browsers you could set the CSS :hover attribute to do it without using JavaScript. IE doesn't use :hover except on <a> tags, so you'd have to use JS to do it for IE.I think there are also some limits on how you can embed HTML, CSS, and JS into a report. It's a little tougher than programming a regular ASP/ASP.Net app. |
 |
|
gcowhsu
Starting Member
38 Posts |
Posted - 2005-01-21 : 13:53:32
|
I can do the mouse overs outside or reporting services, I just wanted to know if I could do it without it. I have another question, is there anyway I can test to see if a value in the dataset is null then display one image with a certain URL link and then if there is something in then then display a diffrent image with a different URL link attached to it.Also, is there a way to hide one parameter and make some others user input. I tried clicking on the prompt thing and I got the famous parameter is read only. I was thinking about just making a dataset with just that one value so that the user wouldn't be able to change it.There is always the expression box when ever you want to edit a value of something and you can manually type stuff in. Is there a webpage that has coding for this, and all the commands that I can use. It makes me think that I can do a lot of things here because I can program different things. thanks for all the help |
 |
|
|