Showing posts with label color. Show all posts
Showing posts with label color. Show all posts

Tuesday, March 27, 2012

changing colors in charts

Hello,
I'm trying to change the color of a chart region based on a report parameter
and I'm not having any luck. Can any one tell me where I change this? I see
all of the available color palattes, but I don't want to use those. The
regions need to be a specific color based on the report parameter option that
was choosen by the user.
ThanksYou will need RS 2000 with SP1 or later. In that case, you can control the
color of data points based on an expression. Please check the "Chart Styles"
section under 4.1.3 in the SP1 Readme:
http://download.microsoft.com/download/7/f/b/7fb1a251-13ad-404c-a034-10d79ddaa510/SP1Readme_EN.htm#_chart_enhancements
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"dataGirl" <dataGirl@.discussions.microsoft.com> wrote in message
news:324B9D30-B779-4402-9E68-9FC8FE0941FD@.microsoft.com...
> Hello,
> I'm trying to change the color of a chart region based on a report
> parameter
> and I'm not having any luck. Can any one tell me where I change this? I
> see
> all of the available color palattes, but I don't want to use those. The
> regions need to be a specific color based on the report parameter option
> that
> was choosen by the user.
> Thankssql

Changing color of the report parameter viewer tool bar

Hey peeps,
I am wondering to know if there is a way to change the color of the SQL
Report parameter strip when the report is rendered. I tried changing a few
classes in the Reportingservice.css file but those changes reflect only in
the outer region(the container of the report, not the frame). When the report
is rendered, a new css file named "8.00.743.00HtmlViewer.css" is generated
dynamically which is holding control to the class files used by different
items in that tool bar. How would I get access to this newly generated css
file or howelse could I change the color of the tool bar that contains items
like "Find", "Export" buttons. Awaiting your suggestion.
Thanks
BalajiThis is a multi-part message in MIME format.
--=_NextPart_000_007D_01C534BB.3A051EF0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: quoted-printable
RS SP1 has additional url access parameter Stylesheet that specifies a =style sheet to be applied to the HTML viewer..
You need to make your own file and save it to 'C:\Program =Files\Microsoft SQL Server\MSSQL\Reporting =Services\ReportServer\styles\custom.css'
Here is example:
http://servername/reportserver?/SampleReports/Report1&rs:Command=3DRender=
&rc:Stylesheet=3DCustom
The following style makes parameters row blue:
.MenuBarBkGnd
{
background-color: blue
}
PS:
New in SP2. The <HTMLViewerStyleSheet> property has been added to the =Reporting Services configuration file so that you can specify a new =default style sheet for your HTML viewer.
"Balaji" <Balaji@.discussions.microsoft.com> wrote in message =news:C57EAA6A-1B94-4DF4-9F13-01E3CD433401@.microsoft.com...
> Hey peeps,
> > I am wondering to know if there is a way to change the color of the =SQL > Report parameter strip when the report is rendered. I tried changing a =few > classes in the Reportingservice.css file but those changes reflect =only in > the outer region(the container of the report, not the frame). When the =report > is rendered, a new css file named "8.00.743.00HtmlViewer.css" is =generated > dynamically which is holding control to the class files used by =different > items in that tool bar. How would I get access to this newly generated =css > file or howelse could I change the color of the tool bar that contains =items > like "Find", "Export" buttons. Awaiting your suggestion.
> > Thanks
> Balaji
--=_NextPart_000_007D_01C534BB.3A051EF0
Content-Type: text/html;
charset="Utf-8"
Content-Transfer-Encoding: quoted-printable
=EF=BB=BF<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

RS SP1 has additional url access =parameter Stylesheet that specifies a style sheet to be applied to the HTML viewer..
You need to make your own file and save =it to 'C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer\styles\custom.css'
Here is example:
http://servername/reportserver?/SampleReports/Report1&rs:Com=mand=3DRender&rc:Stylesheet=3DCustom
The following style makes parameters =row blue:
.MenuBarBkGnd{ background-color: blue}
PS:
New in SP2. The property has =been added to the Reporting Services configuration file so that you can =specify a new default style sheet for your HTML viewer.
"Balaji" wrote in message news:C57EAA6A-1B94-4DF4-9F13-01E3CD433401@.microsoft.com...> =Hey peeps,> > I am wondering to know if there is a way to =change the color of the SQL > Report parameter strip when the report is =rendered. I tried changing a few > classes in the Reportingservice.css file =but those changes reflect only in > the outer region(the container of the =report, not the frame). When the report > is rendered, a new css file =named "8.00.743.00HtmlViewer.css" is generated > dynamically which is =holding control to the class files used by different > items in that tool =bar. How would I get access to this newly generated css > file or =howelse could I change the color of the tool bar that contains items > =like "Find", "Export" buttons. Awaiting your =suggestion.> > Thanks> Balaji

--=_NextPart_000_007D_01C534BB.3A051EF0--

Changing color of the details depending on the value of the field

Hello !
I am using Reporting Services with SQL Server 2000 (SP3).
I am trying to build in dynamic coloring into my report depending on the
value in a certain field. Query already returns name of the color I would
like to use as an additional field (color conditions are driven by range of
data certain value falls into and stored in the database ). I simple need to
pick color stored in this field( it is Dataset field Color) and apply to
particular cell (possibly entire row) when rendering report. Colors are
returned as names: GREEN,RED,GREY etc.
Is there an easy way to accomplish this in Reporting Services?
Any help would be greatly appreciated.
IgorSelect the cell you want to colorize according to the value. Change the
BackColor property and use a VB expression instead of a hard-coded
color. Use the equal sign "=" in order to use a VB expression, just
like this :
=Fields!Color.Value
Since Green, Red and Gray are know colors, they will be authorized.
You also can do something like this (if my sales rate is under 50%, I
colorize in Red, otherwise, in green) :
=IIF(Fields!SalesRate.Value < 50, "Red", "Green")|||Thanks a lot Julich! It worked perfectly! I would actually like to stored
color logic inside that database so that query returns color instead of
having RS making this decisions.
Thanks again,
Igor
"Julich" <julich@.gmail.com> wrote in message
news:1118320972.223994.206500@.z14g2000cwz.googlegroups.com...
> Select the cell you want to colorize according to the value. Change the
> BackColor property and use a VB expression instead of a hard-coded
> color. Use the equal sign "=" in order to use a VB expression, just
> like this :
> =Fields!Color.Value
> Since Green, Red and Gray are know colors, they will be authorized.
> You also can do something like this (if my sales rate is under 50%, I
> colorize in Red, otherwise, in green) :
> =IIF(Fields!SalesRate.Value < 50, "Red", "Green")
>

Thursday, March 22, 2012

Changing a fields backgroung color IIF

Hi All,
I need to change the backgroung color to a field in the background property...

=iif(Fields!act_shp_dt.Value <> Fields!prm_shp_dt.Value , " Late ","")
This is the field and I want it to change color if the statement is true. Can anyone help?
Thank you in advanced, Kerrie

I never attempted this on a per cell basis but it should work;
Create a function in the code section, something like this...
function getColor(s1 as string, s2 as string) as String
getColor = iif((s1 <> s2), "Red", "White")
end function
then call the function from your textbox like this...
<BackgroundColor>=Code.getColor(Fields!act_shp_dt.Value , Fields!prm_shp_dt.Value )</BackgroundColor>
|||you code seems fine but make sure you use the colors you want to show:
=iif(Fields!act_shp_dt.Value <> Fields!prm_shp_dt.Value , " <some_color>","<some_color>")

Changing a field background color IIF.....

Hi All,
I need to change the backgroung color to a field in the background property....

=iif(Fields!act_shp_dt.Value <> Fields!prm_shp_dt.Value , " Late ","")

This is the field and I want it to change color if the statement is true. Can anyone help?

Thank you in advanced, Kerrie

You have a misunderstand.
You should put a label or something like that and in the backgroud propertie put the expression.
=iif(Fields!act_shp_dt.Value <> Fields!prm_shp_dt.Value , "Blue","Red")
That's all|||Thank You so much for your help. That did it!!!Big Smile

Wednesday, March 7, 2012

Change the forecolor of the field on the report.

Hi,

I trying to change the color of the text based on a condition using sql server 2005 reporting services. Some thing like this.IIF(Fields!OrderYear.Value < 2000,"Red","Black"). But not able to achieve this.. how can I do that?

Where are you putting this expression? Make sure the expression is on the font color property, not on value.

|||

Yes, you are right. Thank You.

Change the color on a piece of text

Below is the pice of code that I use to produce results that look like this

[4] [5] [1]

what I would like to do is is make it look like this:

[4] [5] [1]

Basically anything that >3 = Green

= "[" & CStr(Count(IIf (Trim(Fields!NOB_Pickup_L_D_T.Value) = "Y", 1, Nothing))) &

"] [" & CStr(Count(IIf (Trim(Fields!NOB_Pickup_L_D_T.Value) = "N", 1, Nothing))) &

"] [" & CStr(Count(IIf (Trim(Fields!NOB_Pickup_L_D_T.Value) = "NA", 1, Nothing)))& "]"

Thanks,

Rick

Is that output text all within the same textbox? If so, you can't change the colour of just part of it, you have to change the colour of all the text within the textbox.

|||

Yes the result is in one text box. Yes, I do know how to change all the text via an expression. But I just wanted to change a piece as shown in the example

Thanks!

|||

That was what i said in my reply: you *cannot* change only a subset of the text in a textbox. To achieve what you want, you will have to have multiple textboxes to make up your string and change the text in the appropriate one.

Change the color of the chart items

Does anybody know how to change the color of the chart items? I dont want to
use the default palette that the reporting have. I want to change the color
of the bars and the pie chart.SQL Server 2000 Reporting Services SP1 added support in this area.
Using the Chart Properties dialog you will need to navigate to
Data Tab : Values : Edit
Edit Chart Value Dialog : Appearance Tab : Series Style button
Style Properties dialog
--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Nelson" <Nelson@.discussions.microsoft.com> wrote in message
news:4A94A89C-9297-4508-AF08-060CB3CC86E7@.microsoft.com...
> Does anybody know how to change the color of the chart items? I dont want
> to
> use the default palette that the reporting have. I want to change the
> color
> of the bars and the pie chart.|||Bruce,
I followed the navigation steps that you mentioned, but still
couldnt figure out what next to do in order to define explicit color to
the series, rather than allowing it to be defaulted which it is doing
now.
I have downloaded the SP1 and installed the same, but still not sure
how to implement individual color of my choice,
An, earlier response is appriciated.
Thanks,|||If you have not done yet, please read this section in the SP1 readme about
using colors in charts:
http://download.microsoft.com/download/7/f/b/7fb1a251-13ad-404c-a034-10d79ddaa510/SP1Readme_EN.htm#_chart_enhancements
You may also search this newsgroup for chart color related posting, e.g.:
*
http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=c8620b23-0340-4d35-a154-4a797ecfab2f&sloc=en-us
*
http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=73b9ddf6-58a7-4088-955b-9a03a4d56efa&sloc=en-us
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Srini" <turlsri1@.yahoo.com> wrote in message
news:1103664443.478130.45620@.c13g2000cwb.googlegroups.com...
> Bruce,
> I followed the navigation steps that you mentioned, but still
> couldnt figure out what next to do in order to define explicit color to
> the series, rather than allowing it to be defaulted which it is doing
> now.
> I have downloaded the SP1 and installed the same, but still not sure
> how to implement individual color of my choice,
> An, earlier response is appriciated.
> Thanks,
>|||Thanks,
I appriciate the early response, will go through the
articles.

change the background color in table in report

I have a table that i need to display data
for each row I want the background color to be diff
anybody knowhow to do it ?

color
blank
color
blank

i am not at work right now but if iam not mistaken the syntax is:

iif(rowcount(nothing)=2, " GRAY " , nothing)

|||thank you|||

I tried using this property but it gives me error RowCount not declared

where should I write this event ?

|||

Try using RowNumber instead of RowCount.

The code is placed in the background color property. Choose the color dropdown and look for the <Expression> option. Select that, and add your code there.

|||

If I need to see one yes one no like

1111 [visible]

2222 [invisible]

3333 [visible]

4444 [invisible]

......

I change the property Visibility-Initial visibility = expression = IIF(parameter="SOMETHING", FALSE,TRUE) with this I can hide the DATA but I need to hide the Field too (with border and everything), in preview it looks very good but If I deploy the report change and show the field with borders.

MARCOS Sad

|||

I do not see alternate rows gray .

In that expression what does "nothing" stand for .

I just copied that statement in my code

Do I need to replace it with some values

change the background color in table in report

I have a table that i need to display data
for each row I want the background color to be diff
anybody knowhow to do it ?

color
blank
color
blank

i am not at work right now but if iam not mistaken the syntax is:

iif(rowcount(nothing)=2, " GRAY " , nothing)

|||thank you|||

I tried using this property but it gives me error RowCount not declared

where should I write this event ?

|||

Try using RowNumber instead of RowCount.

The code is placed in the background color property. Choose the color dropdown and look for the <Expression> option. Select that, and add your code there.

|||

If I need to see one yes one no like

1111 [visible]

2222 [invisible]

3333 [visible]

4444 [invisible]

......

I change the property Visibility-Initial visibility = expression = IIF(parameter="SOMETHING", FALSE,TRUE) with this I can hide the DATA but I need to hide the Field too (with border and everything), in preview it looks very good but If I deploy the report change and show the field with borders.

MARCOS Sad

|||

I do not see alternate rows gray .

In that expression what does "nothing" stand for .

I just copied that statement in my code

Do I need to replace it with some values

Saturday, February 25, 2012

Change text color

Dear all,

May I know how can I change a text color if the data meet certain condition?

Thanks in advance

Levine

You can set this in the properties window.
Click on the textbox you want to change and then click in the "Color" box.. select the dropdown in that field and clickon "Expression..".

Then use a formula such as:

=IIF( Sum(Fields!Hours.Value)>=7 , "Black", "Crimson")

The expression builder can assist you with your own data fields etc.

Change Subtotal background color.

I created a Matrix report with subtotals.
It would be easier to read if the subtotals were shaded.
How do I shade the subtotal box. Not the lable box.
I can see the box labled totals and it is shaded it is the real total box
that I need to shade.
Thank you
Scott BurkeScott,
Using the inscope() function with the names of the matrix rows you are able
to tell when the row is a subtotal or not, then place the iif function in the
background color and sometimes the font color.
If you need more help I can find my code example. Last contract have to dig
it up.
Reeves
"Scott Burke" wrote:
> I created a Matrix report with subtotals.
> It would be easier to read if the subtotals were shaded.
> How do I shade the subtotal box. Not the lable box.
> I can see the box labled totals and it is shaded it is the real total box
> that I need to shade.
> Thank you
> Scott Burke|||Thanks for your time. However, Visual Sudioes has an error and shut down.
now the report I was working on is gone........
I will try your suggestion when I rebuild the report
Thanks again.
Scott Burke
"Reeves Smith" wrote:
> Scott,
> Using the inscope() function with the names of the matrix rows you are able
> to tell when the row is a subtotal or not, then place the iif function in the
> background color and sometimes the font color.
> If you need more help I can find my code example. Last contract have to dig
> it up.
> Reeves
>
> "Scott Burke" wrote:
> > I created a Matrix report with subtotals.
> >
> > It would be easier to read if the subtotals were shaded.
> >
> > How do I shade the subtotal box. Not the lable box.
> >
> > I can see the box labled totals and it is shaded it is the real total box
> > that I need to shade.
> >
> > Thank you
> > Scott Burke|||On May 31, 8:38 am, Scott Burke <ScottBu...@.discussions.microsoft.com>
wrote:
> Thanks for your time. However, Visual Sudioes has an error and shut down.
> now the report I was working on is gone........
> I will try your suggestion when I rebuild the report
> Thanks again.
> Scott Burke
> "Reeves Smith" wrote:
> > Scott,
> > Using the inscope() function with the names of the matrix rows you are able
> > to tell when the row is a subtotal or not, then place the iif function in the
> > background color and sometimes the font color.
> > If you need more help I can find my code example. Last contract have to dig
> > it up.
> > Reeves
> > "Scott Burke" wrote:
> > > I created a Matrix report with subtotals.
> > > It would be easier to read if the subtotals were shaded.
> > > How do I shade the subtotal box. Not the lable box.
> > > I can see the box labled totals and it is shaded it is the real total box
> > > that I need to shade.
> > > Thank you
> > > Scott Burke
Also, you could try an expression similar to this in the background
color property:
=iif(Fields!FieldName.Value Like "subtotal*", "Yellow", "White")
Where FieldName can be from an adjacent cell.
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||Hi EMartinez,
I tried that but it did not work.
I tried the expression : =iif(Fields!textbox6.Value ='Total','lightgrey','transparent')
The box next to it is named "textbox6" with a value of
"Fields!magazinename.value"
The errror is "out of scope".
I am trying to referance the box name or the contents in the box?
Scott Burke
"EMartinez" wrote:
> On May 31, 8:38 am, Scott Burke <ScottBu...@.discussions.microsoft.com>
> wrote:
> > Thanks for your time. However, Visual Sudioes has an error and shut down.
> > now the report I was working on is gone........
> >
> > I will try your suggestion when I rebuild the report
> > Thanks again.
> > Scott Burke
> >
> > "Reeves Smith" wrote:
> > > Scott,
> >
> > > Using the inscope() function with the names of the matrix rows you are able
> > > to tell when the row is a subtotal or not, then place the iif function in the
> > > background color and sometimes the font color.
> >
> > > If you need more help I can find my code example. Last contract have to dig
> > > it up.
> >
> > > Reeves
> >
> > > "Scott Burke" wrote:
> >
> > > > I created a Matrix report with subtotals.
> >
> > > > It would be easier to read if the subtotals were shaded.
> >
> > > > How do I shade the subtotal box. Not the lable box.
> >
> > > > I can see the box labled totals and it is shaded it is the real total box
> > > > that I need to shade.
> >
> > > > Thank you
> > > > Scott Burke
>
> Also, you could try an expression similar to this in the background
> color property:
> =iif(Fields!FieldName.Value Like "subtotal*", "Yellow", "White")
> Where FieldName can be from an adjacent cell.
> Hope this helps.
> Regards,
> Enrique Martinez
> Sr. Software Consultant
>|||OK. I found the answear. Please try NOT to laught too loud. It will hurt
my feelings.
On the totals box there is an arrow in the upper right corner. If you click
on the arrow you will get the properties of the total box itself. Click
anywhere else in the box adn you get the properties of the subtotal label box.
Have fun over the weekend.
Scott Burke
"EMartinez" wrote:
> On May 31, 8:38 am, Scott Burke <ScottBu...@.discussions.microsoft.com>
> wrote:
> > Thanks for your time. However, Visual Sudioes has an error and shut down.
> > now the report I was working on is gone........
> >
> > I will try your suggestion when I rebuild the report
> > Thanks again.
> > Scott Burke
> >
> > "Reeves Smith" wrote:
> > > Scott,
> >
> > > Using the inscope() function with the names of the matrix rows you are able
> > > to tell when the row is a subtotal or not, then place the iif function in the
> > > background color and sometimes the font color.
> >
> > > If you need more help I can find my code example. Last contract have to dig
> > > it up.
> >
> > > Reeves
> >
> > > "Scott Burke" wrote:
> >
> > > > I created a Matrix report with subtotals.
> >
> > > > It would be easier to read if the subtotals were shaded.
> >
> > > > How do I shade the subtotal box. Not the lable box.
> >
> > > > I can see the box labled totals and it is shaded it is the real total box
> > > > that I need to shade.
> >
> > > > Thank you
> > > > Scott Burke
>
> Also, you could try an expression similar to this in the background
> color property:
> =iif(Fields!FieldName.Value Like "subtotal*", "Yellow", "White")
> Where FieldName can be from an adjacent cell.
> Hope this helps.
> Regards,
> Enrique Martinez
> Sr. Software Consultant
>|||Scott,
I'm not laughing as I did not even know that existed, thanks for the find.
Reeves
"Scott Burke" wrote:
> OK. I found the answear. Please try NOT to laught too loud. It will hurt
> my feelings.
> On the totals box there is an arrow in the upper right corner. If you click
> on the arrow you will get the properties of the total box itself. Click
> anywhere else in the box adn you get the properties of the subtotal label box.
> Have fun over the weekend.
> Scott Burke
> "EMartinez" wrote:
> > On May 31, 8:38 am, Scott Burke <ScottBu...@.discussions.microsoft.com>
> > wrote:
> > > Thanks for your time. However, Visual Sudioes has an error and shut down.
> > > now the report I was working on is gone........
> > >
> > > I will try your suggestion when I rebuild the report
> > > Thanks again.
> > > Scott Burke
> > >
> > > "Reeves Smith" wrote:
> > > > Scott,
> > >
> > > > Using the inscope() function with the names of the matrix rows you are able
> > > > to tell when the row is a subtotal or not, then place the iif function in the
> > > > background color and sometimes the font color.
> > >
> > > > If you need more help I can find my code example. Last contract have to dig
> > > > it up.
> > >
> > > > Reeves
> > >
> > > > "Scott Burke" wrote:
> > >
> > > > > I created a Matrix report with subtotals.
> > >
> > > > > It would be easier to read if the subtotals were shaded.
> > >
> > > > > How do I shade the subtotal box. Not the lable box.
> > >
> > > > > I can see the box labled totals and it is shaded it is the real total box
> > > > > that I need to shade.
> > >
> > > > > Thank you
> > > > > Scott Burke
> >
> >
> > Also, you could try an expression similar to this in the background
> > color property:
> > =iif(Fields!FieldName.Value Like "subtotal*", "Yellow", "White")
> > Where FieldName can be from an adjacent cell.
> > Hope this helps.
> >
> > Regards,
> >
> > Enrique Martinez
> > Sr. Software Consultant
> >
> >|||On Jun 1, 1:59 pm, Scott Burke <ScottBu...@.discussions.microsoft.com>
wrote:
> OK. I found the answear. Please try NOT to laught too loud. It will hurt
> my feelings.
> On the totals box there is an arrow in the upper right corner. If you click
> on the arrow you will get the properties of the total box itself. Click
> anywhere else in the box adn you get the properties of the subtotal label box.
> Have fun over the weekend.
> Scott Burke
> "EMartinez" wrote:
> > On May 31, 8:38 am, Scott Burke <ScottBu...@.discussions.microsoft.com>
> > wrote:
> > > Thanks for your time. However, Visual Sudioes has an error and shut down.
> > > now the report I was working on is gone........
> > > I will try your suggestion when I rebuild the report
> > > Thanks again.
> > > Scott Burke
> > > "Reeves Smith" wrote:
> > > > Scott,
> > > > Using the inscope() function with the names of the matrix rows you are able
> > > > to tell when the row is a subtotal or not, then place the iif function in the
> > > > background color and sometimes the font color.
> > > > If you need more help I can find my code example. Last contract have to dig
> > > > it up.
> > > > Reeves
> > > > "Scott Burke" wrote:
> > > > > I created a Matrix report with subtotals.
> > > > > It would be easier to read if the subtotals were shaded.
> > > > > How do I shade the subtotal box. Not the lable box.
> > > > > I can see the box labled totals and it is shaded it is the real total box
> > > > > that I need to shade.
> > > > > Thank you
> > > > > Scott Burke
> > Also, you could try an expression similar to this in the background
> > color property:
> > =iif(Fields!FieldName.Value Like "subtotal*", "Yellow", "White")
> > Where FieldName can be from an adjacent cell.
> > Hope this helps.
> > Regards,
> > Enrique Martinez
> > Sr. Software Consultant
Glad you solved the problem. Let me know if I can be of greater
assistance.
Regards,
Enrique Martinez
Sr. Software Consultant

Sunday, February 19, 2012

Change row background color when column value changes

I am looking for a way to alternate the row color when a value in a
column changes. I am using a simple table report. The output of which
looks like
Application Name Version Usages
MicroStation 8.1.2.1 10
MicroStation 8.9.2.1 4
MicroStation 9.1.1.1 1
MS Word 8.0.0.0 1
MS Word 9.1.2.1 2
Excel 9.1.2.1 2
What I want to do is have the background color change when the
Application Name value changes. In this case the rows for MicroStation
and Excel would be the same color and MS Word would have another color.
In ASP.NET I would do this by creating some temp variables to keep
track of the previous row value and the current color. When the row
value changes I would flip the current color value. But I am not sure
how to have variables in Reporting ServicesUse the Previous function to compare the previous row:
Previous(Fields!ApplicationName.Value)
--
RDA Corp
Business Intelligence Evangelist Leader
www.rdacorp.com
"mkellerm" wrote:
> I am looking for a way to alternate the row color when a value in a
> column changes. I am using a simple table report. The output of which
> looks like
> Application Name Version Usages
> MicroStation 8.1.2.1 10
> MicroStation 8.9.2.1 4
> MicroStation 9.1.1.1 1
> MS Word 8.0.0.0 1
> MS Word 9.1.2.1 2
> Excel 9.1.2.1 2
> What I want to do is have the background color change when the
> Application Name value changes. In this case the rows for MicroStation
> and Excel would be the same color and MS Word would have another color.
> In ASP.NET I would do this by creating some temp variables to keep
> track of the previous row value and the current color. When the row
> value changes I would flip the current color value. But I am not sure
> how to have variables in Reporting Services
>|||It isn't that simple, as I also need to know what the previous rows
background color was. and I can't find a way to pull that value into
the expression
Steve Mann wrote:
> Use the Previous function to compare the previous row:
> Previous(Fields!ApplicationName.Value)
> --
> RDA Corp
> Business Intelligence Evangelist Leader
> www.rdacorp.com
>
> "mkellerm" wrote:
> > I am looking for a way to alternate the row color when a value in a
> > column changes. I am using a simple table report. The output of which
> > looks like
> >
> > Application Name Version Usages
> > MicroStation 8.1.2.1 10
> > MicroStation 8.9.2.1 4
> > MicroStation 9.1.1.1 1
> > MS Word 8.0.0.0 1
> > MS Word 9.1.2.1 2
> > Excel 9.1.2.1 2
> >
> > What I want to do is have the background color change when the
> > Application Name value changes. In this case the rows for MicroStation
> > and Excel would be the same color and MS Word would have another color.
> >
> > In ASP.NET I would do this by creating some temp variables to keep
> > track of the previous row value and the current color. When the row
> > value changes I would flip the current color value. But I am not sure
> > how to have variables in Reporting Services
> >
> >|||mkellerm,
I don't know if this will meet your needs, but perhaps it will spark an
idea. Also, this function works in SQL Server 2005, but probably not in
SQL Server 2000.
SQL Statement:
SELECT rowID, DENSE_RANK() OVER (ORDER BY applicationName) AS groupID,
applicationName, version, usages FROM applications
Results:
rowID groupID applicationName version usages
-- -- -- -- --
6 1 Excel 9.1.2.1 2
1 2 MicroStation 8.1.2.1 10
2 2 MicroStation 8.9.2.1 4
3 2 MicroStation 9.1.1.1 1
4 3 MS Word 8.0.0.0 1
5 3 MS Word 9.1.2.1 2
Then make your background color an expression like:
=Iif(Fields!groupID.Value Mod 2 = 0,"Transparent","LightYellow")
That will alternate the row color when the value changes. If you need 3
colors, use a Switch like:
=Switch(Fields!groupID.Value Mod 3 =0,"Transparent",Fields!groupID.Value Mod 3 =1,"LightYellow",Fields!groupID.Value Mod 3 = 2,"Gainsboro")
Hope that helps a little.
-Josh
mkellerm wrote:
> It isn't that simple, as I also need to know what the previous rows
> background color was. and I can't find a way to pull that value into
> the expression
>
> Steve Mann wrote:
> > Use the Previous function to compare the previous row:
> >
> > Previous(Fields!ApplicationName.Value)
> >
> > --
> > RDA Corp
> > Business Intelligence Evangelist Leader
> > www.rdacorp.com
> >
> >
> > "mkellerm" wrote:
> >
> > > I am looking for a way to alternate the row color when a value in a
> > > column changes. I am using a simple table report. The output of which
> > > looks like
> > >
> > > Application Name Version Usages
> > > MicroStation 8.1.2.1 10
> > > MicroStation 8.9.2.1 4
> > > MicroStation 9.1.1.1 1
> > > MS Word 8.0.0.0 1
> > > MS Word 9.1.2.1 2
> > > Excel 9.1.2.1 2
> > >
> > > What I want to do is have the background color change when the
> > > Application Name value changes. In this case the rows for MicroStation
> > > and Excel would be the same color and MS Word would have another color.
> > >
> > > In ASP.NET I would do this by creating some temp variables to keep
> > > track of the previous row value and the current color. When the row
> > > value changes I would flip the current color value. But I am not sure
> > > how to have variables in Reporting Services
> > >
> > >|||Josh,
Thanks, this looks promissing, but where does the DENSE_RANK function
come from SQL 2005 says it is unrecognized function name,
-Marcus
Josh wrote:
> mkellerm,
> I don't know if this will meet your needs, but perhaps it will spark an
> idea. Also, this function works in SQL Server 2005, but probably not in
> SQL Server 2000.
> SQL Statement:
> SELECT rowID, DENSE_RANK() OVER (ORDER BY applicationName) AS groupID,
> applicationName, version, usages FROM applications
> Results:
> rowID groupID applicationName version usages
> -- -- -- -- --
> 6 1 Excel 9.1.2.1 2
> 1 2 MicroStation 8.1.2.1 10
> 2 2 MicroStation 8.9.2.1 4
> 3 2 MicroStation 9.1.1.1 1
> 4 3 MS Word 8.0.0.0 1
> 5 3 MS Word 9.1.2.1 2
> Then make your background color an expression like:
> =Iif(Fields!groupID.Value Mod 2 = 0,"Transparent","LightYellow")
> That will alternate the row color when the value changes. If you need 3
> colors, use a Switch like:
> =Switch(Fields!groupID.Value Mod 3 => 0,"Transparent",Fields!groupID.Value Mod 3 => 1,"LightYellow",Fields!groupID.Value Mod 3 = 2,"Gainsboro")
> Hope that helps a little.
> -Josh
>
> mkellerm wrote:
> > It isn't that simple, as I also need to know what the previous rows
> > background color was. and I can't find a way to pull that value into
> > the expression
> >
> >
> > Steve Mann wrote:
> > > Use the Previous function to compare the previous row:
> > >
> > > Previous(Fields!ApplicationName.Value)
> > >
> > > --
> > > RDA Corp
> > > Business Intelligence Evangelist Leader
> > > www.rdacorp.com
> > >
> > >
> > > "mkellerm" wrote:
> > >
> > > > I am looking for a way to alternate the row color when a value in a
> > > > column changes. I am using a simple table report. The output of which
> > > > looks like
> > > >
> > > > Application Name Version Usages
> > > > MicroStation 8.1.2.1 10
> > > > MicroStation 8.9.2.1 4
> > > > MicroStation 9.1.1.1 1
> > > > MS Word 8.0.0.0 1
> > > > MS Word 9.1.2.1 2
> > > > Excel 9.1.2.1 2
> > > >
> > > > What I want to do is have the background color change when the
> > > > Application Name value changes. In this case the rows for MicroStation
> > > > and Excel would be the same color and MS Word would have another color.
> > > >
> > > > In ASP.NET I would do this by creating some temp variables to keep
> > > > track of the previous row value and the current color. When the row
> > > > value changes I would flip the current color value. But I am not sure
> > > > how to have variables in Reporting Services
> > > >
> > > >|||Marcus,
Not sure what is going on there... The DENSE_RANK function works just
fine for me. This MSDN page has a sample query that uses the
AdventureWorks database. Does this change anything?
http://msdn2.microsoft.com/en-us/library/ms173825.aspx
-Josh
mkellerm wrote:
> Josh,
> Thanks, this looks promissing, but where does the DENSE_RANK function
> come from SQL 2005 says it is unrecognized function name,
> -Marcus
> Josh wrote:
> > mkellerm,
> >
> > I don't know if this will meet your needs, but perhaps it will spark an
> > idea. Also, this function works in SQL Server 2005, but probably not in
> > SQL Server 2000.
> >
> > SQL Statement:
> > SELECT rowID, DENSE_RANK() OVER (ORDER BY applicationName) AS groupID,
> > applicationName, version, usages FROM applications
> >
> > Results:
> > rowID groupID applicationName version usages
> > -- -- -- -- --
> > 6 1 Excel 9.1.2.1 2
> > 1 2 MicroStation 8.1.2.1 10
> > 2 2 MicroStation 8.9.2.1 4
> > 3 2 MicroStation 9.1.1.1 1
> > 4 3 MS Word 8.0.0.0 1
> > 5 3 MS Word 9.1.2.1 2
> >
> > Then make your background color an expression like:
> > =Iif(Fields!groupID.Value Mod 2 = 0,"Transparent","LightYellow")
> >
> > That will alternate the row color when the value changes. If you need 3
> > colors, use a Switch like:
> > =Switch(Fields!groupID.Value Mod 3 => > 0,"Transparent",Fields!groupID.Value Mod 3 => > 1,"LightYellow",Fields!groupID.Value Mod 3 = 2,"Gainsboro")
> >
> > Hope that helps a little.
> >
> > -Josh
> >
> >
> > mkellerm wrote:
> > > It isn't that simple, as I also need to know what the previous rows
> > > background color was. and I can't find a way to pull that value into
> > > the expression
> > >
> > >
> > > Steve Mann wrote:
> > > > Use the Previous function to compare the previous row:
> > > >
> > > > Previous(Fields!ApplicationName.Value)
> > > >
> > > > --
> > > > RDA Corp
> > > > Business Intelligence Evangelist Leader
> > > > www.rdacorp.com
> > > >
> > > >
> > > > "mkellerm" wrote:
> > > >
> > > > > I am looking for a way to alternate the row color when a value in a
> > > > > column changes. I am using a simple table report. The output of which
> > > > > looks like
> > > > >
> > > > > Application Name Version Usages
> > > > > MicroStation 8.1.2.1 10
> > > > > MicroStation 8.9.2.1 4
> > > > > MicroStation 9.1.1.1 1
> > > > > MS Word 8.0.0.0 1
> > > > > MS Word 9.1.2.1 2
> > > > > Excel 9.1.2.1 2
> > > > >
> > > > > What I want to do is have the background color change when the
> > > > > Application Name value changes. In this case the rows for MicroStation
> > > > > and Excel would be the same color and MS Word would have another color.
> > > > >
> > > > > In ASP.NET I would do this by creating some temp variables to keep
> > > > > track of the previous row value and the current color. When the row
> > > > > value changes I would flip the current color value. But I am not sure
> > > > > how to have variables in Reporting Services
> > > > >
> > > > >

Tuesday, February 14, 2012

Change Pie chart color

Hi,

I am using SQL Server 2005 Reporting Services.

I need to change the Pie chart data element colors depending on the value

for the data element.

eg: Yes should be in Green and No in RED

Assuming that you have two data fields / values in the chart, one for Yes and one of No - you could just edit the data values, go to the appearance tab, click on the series styles button and set the Fill Color to Green and Red, respectively.

-- Robert