Help with seeing vertical and horizontal lines of a table and setting background and text colors of eve and odd rows

Posted on 2012-04-02
Last Modified: 2012-04-03

How do  I see the  vertical and horizontal lines of a table and How do I set background and text colors of even and odd rows in my report?


Question by:vcharles
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
  • 4
  • 3
LVL 37

Accepted Solution

ValentinoV earned 500 total points
ID: 37799483
"How do  I see the  vertical and horizontal lines of a table "

Do you mean when the report is rendered?  You can use the Border properties to set the cell borders.

"How do I set background and text colors of even and odd rows in my report?"

For alternating coloring you can use the RowNumber function in an expression.  The following would be an example of a possible expression on the BackgroundColor property of a textbox (table cell):

=IIf(RowNumber("YourDataSet") Mod 2 = 0, "Blue", "Transparent")

More info:

Author Comment

ID: 37799513
Yes, I mean when they see the report, I need to be able to see how the colums are separated.
I am fairly new at this, will look for the borders property and set it as you suggested.
 where do I enter =IIf(RowNumber("YourDataSet") Mod 2 = 0, "Blue", "Transparent")

LVL 37

Expert Comment

ID: 37799550
The expression goes into the BackgroundColor property which you'll find as one of the properties of a textbox (i.e. cell in a tablix).

BTW: are you using the SSRS designer or .NET code (I noticed you've got the ASP.NET topic in your question as well as SSRS).
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.


Author Comment

ID: 37799753
I am using using SSRS, but thought they also use the same type of report (RDLC) with SQL.
I have another question, perhaps you can help me answer it on the same post or I can open another post.

Previously my data was in a table format with multiple records displayed, now I need to display one record per page, how do I modify my code.

For example:

Table Format:

Country   Address Zip   Item
BEL            xyz        112  Car
CAN           xyz        112  Car
DEU           xyz        112  Car
FRA           xyz         112  Car

Now I need

Record 1 of 4

Country    BEL
Address    xyz
Zip            112
Item         Car

Record 2 of 4

Country    CAN
Address    xyz
Zip            112
Item         Car

Record 3 of 4

Country    DEU
Address    xyz
Zip            112
Item         Car

Record 4 of 4

Country    FRA
Address    xyz
Zip            112
Item         Car

Below is the code I am currently using to display the data using a datatable:

 Dim FilteredDT As DataTable
 Dim DV As New DataView(dt, SearchCriteria, Nothing, DataViewRowState.CurrentRows)
        FilteredDT = DV.ToTable
 Dim reportDataSource As New Microsoft.Reporting.WinForms.ReportDataSource()
        reportDataSource.Name = "MyDataSet_Links"
        reportDataSource.Value = FilteredDT



Expert Comment

ID: 37800018

Author Comment

ID: 37800139
LVL 37

Expert Comment

ID: 37800148
If you have other questions (such as the one in comment 37799753) it's better to open other questions instead of putting them in an already open one...  That's more in line with the Problem/Solution philosophy.

You'll also attract more experts looking at the problem in question because they can then focus on just that one particular issue.

Author Comment

ID: 37800166
Got it. Thanks.

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Suggested Solutions

Introduction Earlier I wrote an article about the new lookup functions ( that ship with SQL Server 2008 R2.  In this article I’m going to show you another new feature of SSRS 2008 R2, this time in the vis…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

730 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