Showing posts with label background. Show all posts
Showing posts with label background. Show all posts

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

Change style for HTML Viewer - toolbar

Hi,
Is it possible to change properties such background colour for HTML viewer â'
toolbar?
I just want co customise report â's look to match our applicationâ's style
where report is displayed (we use frames).
ThanksHi
you can customise it by changing the properties in the file:
"Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\ReportManager\Styles\ReportingServices.css"
Soan
"Pendula" wrote:
> Hi,
> Is it possible to change properties such background colour for HTML viewer â'
> toolbar?
> I just want co customise report â's look to match our applicationâ's style
> where report is displayed (we use frames).
> Thanks
>|||"Pendula" <Pendula@.discussions.microsoft.com> wrote in message news:<29B698BD-3E9B-4117-A2DD-06C14F3BD296@.microsoft.com>...
> Hi,
> Is it possible to change properties such background colour for HTML viewer â'
> toolbar?
> I just want co customise report â's look to match our applicationâ's style
> where report is displayed (we use frames).
> Thanks
You can modify the stylesheet located:
\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\ReportServer\styles\htmlviewer.css
Andy Potter
Intellinet|||The htmlviewer.css file is not in the directory you specified.
Any reason why this file would not be created on install?
I did a search on the server and could not find the file.
Thanks
"Andrew Potter" wrote:
> "Pendula" <Pendula@.discussions.microsoft.com> wrote in message news:<29B698BD-3E9B-4117-A2DD-06C14F3BD296@.microsoft.com>...
> > Hi,
> >
> > Is it possible to change properties such background colour for HTML viewer â'
> > toolbar?
> > I just want co customise report â's look to match our applicationâ's style
> > where report is displayed (we use frames).
> >
> > Thanks
>
> You can modify the stylesheet located:
> \Program Files\Microsoft SQL Server\MSSQL\Reporting
> Services\ReportServer\styles\htmlviewer.css
> Andy Potter
> Intellinet
>|||Are you logged on as a member of the administrator group? I just double
checked on my server and I see it exactly as specified here.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Don H" <Don H@.discussions.microsoft.com> wrote in message
news:6D2088A1-2C43-4A6A-9D1B-0DDD5CB49C84@.microsoft.com...
> The htmlviewer.css file is not in the directory you specified.
> Any reason why this file would not be created on install?
> I did a search on the server and could not find the file.
> Thanks
> "Andrew Potter" wrote:
> > "Pendula" <Pendula@.discussions.microsoft.com> wrote in message
news:<29B698BD-3E9B-4117-A2DD-06C14F3BD296@.microsoft.com>...
> > > Hi,
> > >
> > > Is it possible to change properties such background colour for HTML
viewer -
> > > toolbar?
> > > I just want co customise report 's look to match our application's
style
> > > where report is displayed (we use frames).
> > >
> > > Thanks
> >
> >
> > You can modify the stylesheet located:
> >
> > \Program Files\Microsoft SQL Server\MSSQL\Reporting
> > Services\ReportServer\styles\htmlviewer.css
> >
> > Andy Potter
> > Intellinet
> >|||I am logged on as member of the admin group.
I did find in the RS SP1 readme that the new URL Access Parameters
can be used to add a custom stylesheet.
The property is: rc:Stylesheet
Do you have any idea how this gets set in the development environment?
Thanks,
Don
"Bruce L-C [MVP]" wrote:
> Are you logged on as a member of the administrator group? I just double
> checked on my server and I see it exactly as specified here.
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Don H" <Don H@.discussions.microsoft.com> wrote in message
> news:6D2088A1-2C43-4A6A-9D1B-0DDD5CB49C84@.microsoft.com...
> > The htmlviewer.css file is not in the directory you specified.
> > Any reason why this file would not be created on install?
> > I did a search on the server and could not find the file.
> >
> > Thanks
> >
> > "Andrew Potter" wrote:
> >
> > > "Pendula" <Pendula@.discussions.microsoft.com> wrote in message
> news:<29B698BD-3E9B-4117-A2DD-06C14F3BD296@.microsoft.com>...
> > > > Hi,
> > > >
> > > > Is it possible to change properties such background colour for HTML
> viewer -
> > > > toolbar?
> > > > I just want co customise report 's look to match our application's
> style
> > > > where report is displayed (we use frames).
> > > >
> > > > Thanks
> > >
> > >
> > > You can modify the stylesheet located:
> > >
> > > \Program Files\Microsoft SQL Server\MSSQL\Reporting
> > > Services\ReportServer\styles\htmlviewer.css
> > >
> > > Andy Potter
> > > Intellinet
> > >
>
>|||Unless I am mistaken, the presence of that file is moot.
The style sheet that controls the look of the html viewer toolbar
has been compiled into the ReportingServicesWebServer.dll
I don't believe that the htmlviewer.css file is used at all.
Please confirm.
Thanks,
Rob
"Bruce L-C [MVP]"
> Are you logged on as a member of the administrator group? I just double
> checked on my server and I see it exactly as specified here.
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Don H"
> > The htmlviewer.css file is not in the directory you specified.
> > Any reason why this file would not be created on install?
> > I did a search on the server and could not find the file.
> >
> > Thanks
> >
> > "Andrew Potter" wrote:
> >
> > > "Pendula"
> > > > Hi,
> > > >
> > > > Is it possible to change properties such background colour for HTML
> viewer - toolbar? I just want co customise report 's look to match our
application's
> style where report is displayed (we use frames).
> > > >
> > > > Thanks
> > >
> > >
> > > You can modify the stylesheet located:
> > >
> > > \Program Files\Microsoft SQL Server\MSSQL\Reporting
> > > Services\ReportServer\styles\htmlviewer.css
> > >
> > > Andy Potter
> > > Intellinet|||hi goinoutwest,
it looks to me that you are right. no meter what properties i am changing
in any of the ".css" files on reporting server / designer there is no changes
at all. Actually some properties can be changed on report manager but that is
not what I am after.
Regards
"goinoutwest" wrote:
> Unless I am mistaken, the presence of that file is moot.
> The style sheet that controls the look of the html viewer toolbar
> has been compiled into the ReportingServicesWebServer.dll
> I don't believe that the htmlviewer.css file is used at all.
> Please confirm.
> Thanks,
> Rob
>
> "Bruce L-C [MVP]"
> > Are you logged on as a member of the administrator group? I just double
> > checked on my server and I see it exactly as specified here.
> >
> > --
> > Bruce Loehle-Conger
> > MVP SQL Server Reporting Services
> >
> > "Don H"
> > > The htmlviewer.css file is not in the directory you specified.
> > > Any reason why this file would not be created on install?
> > > I did a search on the server and could not find the file.
> > >
> > > Thanks
> > >
> > > "Andrew Potter" wrote:
> > >
> > > > "Pendula"
> > > > > Hi,
> > > > >
> > > > > Is it possible to change properties such background colour for HTML
> > viewer - toolbar? I just want co customise report 's look to match our
> application's
> > style where report is displayed (we use frames).
> > > > >
> > > > > Thanks
> > > >
> > > >
> > > > You can modify the stylesheet located:
> > > >
> > > > \Program Files\Microsoft SQL Server\MSSQL\Reporting
> > > > Services\ReportServer\styles\htmlviewer.css
> > > >
> > > > Andy Potter
> > > > Intellinet
>
>

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