Solved

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
8
357 Views
Last Modified: 2012-04-03
Hello,

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?

Thanks,

victor
0
Comment
Question by:vcharles
  • 4
  • 3
8 Comments
 
LVL 37

Accepted Solution

by:
ValentinoV earned 500 total points
Comment Utility
"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: http://msdn.microsoft.com/en-us/library/ms159225(v=sql.100).aspx
0
 

Author Comment

by:vcharles
Comment Utility
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")

Thanks,
0
 
LVL 37

Expert Comment

by:ValentinoV
Comment Utility
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).
0
 

Author Comment

by:vcharles
Comment Utility
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
        ReportViewer2.LocalReport.DataSources.Clear()
        ReportViewer2.LocalReport.DataSources.Add(reportDataSource)
        ReportViewer2.LocalReport.Refresh()
        ReportViewer2.RefreshReport()

Thanks,

Victor
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 7

Expert Comment

by:dhawalseth
Comment Utility
0
 

Author Comment

by:vcharles
Comment Utility
Thanks!
0
 
LVL 37

Expert Comment

by:ValentinoV
Comment Utility
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.
0
 

Author Comment

by:vcharles
Comment Utility
Got it. Thanks.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now