Solved

How to set alternating background colors in Reporting Services?

Posted on 2011-09-19
5
556 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 29

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction: This article is aimed at report developers who are used to developing reports using relational databases and have gotten a first-time assignment to develop reports on OLAP cubes. It demonstrates how to build a report using SQL Ser…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

752 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