Solved

How to set alternating background colors in Reporting Services?

Posted on 2011-09-19
5
554 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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

Suggested Solutions

Written by Valentino Vranken. Introduction: The first step of creating a SQL Server Reporting Services (SSRS) report involves setting up a connection to the data source and programming a dataset to retrieve data from that data source.  The data…
Written by Valentino Vranken. Introduction: In a previous article (http://www.experts-exchange.com/articles/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Reporting-On-Data-From-Stored-Procedures-part-1.html) I announced that I would writ…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

821 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