Solved

How to set alternating background colors in Reporting Services?

Posted on 2011-09-19
5
550 Views
Last Modified: 2012-05-12
I'm having row data in matrix with groups. I'm using the following expression to change the background color of alternate rows.

=IIf( RunningValue (Fields!FieldName, CountDistinct, Nothing) MOD 2, Color1, Color2)

The above expression works fine when it is used in matrix with groups also but when the calculation field is not zero. If calcuation field is zero it is getting wrong colours. I'm also having dummy values for the fields that are not having actual values. Those values are hidden from the report. Any help on this would be appreciated. Thanks ActualData
0
Comment
Question by:JRevathi
5 Comments
 
LVL 28

Accepted Solution

by:
sammySeltzer earned 34 total points
ID: 36559937
= IIf(RowNumber(Nothing) Mod 2 = 0, "Color1", "Color2")
0
 
LVL 9

Assisted Solution

by:mimran18
mimran18 earned 33 total points
ID: 36560334
0
 
LVL 27

Assisted Solution

by:planocz
planocz earned 33 total points
ID: 36569866
Here's a couple of examples that might help you in your search:

Change font color when looking for a special  condestion
Place this code in your code tab window of the report.
 Public Function CheckForInactive(ByVal Str As String) As Boolean
        If InStr(UCase(Trim(Str)), UCase("inactive")) > 0 Then
            Return True
        End If
        Return False
    End Function

Then place this code in each textbox color properties that you are checking for inactive
=IIF(code.CheckForInactive(Fields!MyTextbox.Value)=True,"Red","Black")
*--------------------------------------------------------------------------------------------------*
Color Rows in detail fields
Background .... =IIF(RowNumber(Nothing) Mod 2 = 1, "White", "Silver")

0
 
LVL 100

Expert Comment

by:mlmcc
ID: 36998447
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A recent questions about how to add SSRS named instances, couldn't find any that talks about SQL server 2008, anyway I decided to help by creating some screen shots. The installation is straightforward, you just pop the SQL server 2008 installati…
It is helpful to note: This is a cosmetic update and is not required, but should help your reports look better for your boss.  This issue has manifested itself in SSRS version 3.0 is where I have seen this behavior in.  And this behavior is only see…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question