Solved

Highlight First 10 Rows

Posted on 2014-04-28
7
501 Views
Last Modified: 2014-04-30
Hello,
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!
0
Comment
Question by:H-SC
  • 3
  • 2
  • 2
7 Comments
 
LVL 22

Expert Comment

by:plusone3055
ID: 40027638
http://technet.microsoft.com/en-us/library/aa337198(v=sql.100).aspx

To apply a background color

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

2.
On the Format menu, click Fill.

The Format dialog box opens with the Fill tab selected.

3.
In the Color area, select a color.

4.
Click OK..
0
 
LVL 1

Author Comment

by:H-SC
ID: 40027647
Sage,
I would only need the first 10 rows to be Yellow.  What would be the expression to do that?
0
 
LVL 22

Expert Comment

by:plusone3055
ID: 40027659
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 :(
0
3 Use Cases for Connected Systems

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

 
LVL 1

Accepted Solution

by:
jaisy99 earned 500 total points
ID: 40028315
=IIf(RowNumber(nothing)>10,"Transparent","Yellow")

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.
0
 
LVL 1

Author Comment

by:H-SC
ID: 40029432
jaisy99,
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?

=IIf(RowNumber(nothing)<11,"Yellow","Orange")
0
 
LVL 1

Expert Comment

by:jaisy99
ID: 40031023
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!
0
 
LVL 1

Author Comment

by:H-SC
ID: 40031887
jaisy99,
Got it!  Many thanks for the explanation.
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

Suggested Solutions

Title # Comments Views Activity
Data source in SSRS 2 51
SSRS and SQL server 4 60
Pivot not using aggregate yield error 3 53
Subreport Parameter using default not what is passed. 4 16
Have you ever had to extract data from a Microsoft SQL Server database and export it to an Excel file, but did not want to use a DTS package? The concept in this article is not new, but it is the answer and will also work on 64-bit SQL boxes.   …
Introduction In the following article I’ll be discussing and demonstrating several different ways of how images can be put on a report. I’m using SQL Server Reporting Services 2008 R2 CTP, more precisely version 10.50.1352.12, but the methods ex…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

785 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