Highlight First 10 Rows

I am using microsoft sql report builder 3.0 to build my rdlc report and have a basic table on my report that I need to highlight only the first 10 rows of data with a yellow background color.  How can this be done?

Thanks in advance!
Who is Participating?
jaisy99Connect With a Mentor Commented:

Make sure view properties is checked.
Highlight the entire row.
Find the background fill on the properties box on the right hand side of your screen.
Instead of selecting a color, click expression
Add the above expression.

Hope that helps.

To apply a background color

In Report Builder design mode, select a text box or cell(s).

On the Format menu, click Fill.

The Format dialog box opens with the Fill tab selected.

In the Color area, select a color.

Click OK..
H-SCAuthor Commented:
I would only need the first 10 rows to be Yellow.  What would be the expression to do that?
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

I'm not sure if you could ONLY highlight the first 10 rows.. I know you can Alternate rows
like this

IIF(RowNumber(Nothing) Mod 2 = 0, "Yellow", "White")

you could try the Logic  

IIF(RowNumber(Nothing) Mod <=10 , "Yellow")

but you might be out of luck :(
H-SCAuthor Commented:
Many thanks, this is very close to a solution.  For some reason when I test.  It colors all rows...in the case below it made all of the rows orange.  Any ideas?

Hmm, not sure.  I just pasted it into mine and it worked.  You might want to double check that only the detail row was highlighted before you pasted your expression into the Fill Background Color in the properties box.  The reason is that the properties box view changes depending on which area of the report you have highlighted or selected.  For instance, if the entire table is highlighted, then the fill may apply to the whole table.  That is my best guess though.  Sorry not more help.  

The easiest way to highlight the detail row is to click the associated grey portion of the table's border just to the left of your detail cells.  The border is not always visible, you may have to click within the table to view it.

Good luck!
H-SCAuthor Commented:
Got it!  Many thanks for the explanation.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.