0

Iam developing a report where I need to provide special effects on 1st few columns. How can I color code or provide 3D effect for first five rows of a table in SSRS? Also, count of values in these columns?

For example:

    My date    count

        A                  3
         B                  4
         C                   1
          D                   1
          E                   5
          F                   6
          G                   7

Now, I should color rows start from A to E and get total count of that ( e.g. 14 in this case)

How can I I acheive this?

AskMe
  • 2,495
  • 8
  • 49
  • 102

2 Answers2

3

While Strawberryshrub's answer would probably work just fine, there's an easier way that can get you the same result. You should be able to use the SSRS function RowNumber to indicate which rows should be colored. Try the following expression in the background color property for that row.

=IIF(RowNumber(Nothing) < 6, "Green", "No Color")

Also, for the count that you need, you should be able to use a similar pattern.

=SUM(IIF(RowNumber(Nothing) < 6, Fields!count.Value, 0))
Steve-o169
  • 2,066
  • 1
  • 12
  • 21
1

One possible option is to cathegorize your first column with an calculated field:

'Name: CustomCathegory
=IIF(Fields!MyDae.Value = "A" Or 
     Fields!MyDae.Value = "B" Or 
     Fields!MyDae.Value = "C" Or 
     Fields!MyDae.Value = "D" Or 
     Fields!MyDae.Value = "E", "Cathegory1", "CathegoryElse")

Now you can use the row coloring (font or background) and use the following expression:

=IIF(Fields!CustomCathegory = "Cathegory1", "Blue", "Black")

You can also sum by CustomCathegory (textbox outside the detail section)

=Sum(IIF(Fields!CustomCathegory = "Cathegory1", Fields!Count.Value, 0))

or group your table by CustomCathegory and add header or footer with the sum per CustomCathegory

Strawberryshrub
  • 3,301
  • 2
  • 11
  • 20