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).
What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.


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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

707 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