Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display Records vertically in Crystal reports.

Status
Not open for further replies.

rakeshjgd

Programmer
Oct 21, 2003
4
IN
My database looks some this like this

Name Arr_Time Dep_Time date
X 10.00 20.00 1/1/2004
X 11.00 20.00 2/1/2004
and so on till the end for all employees


I want to display records in this format.
Name day 1 day 2 day 3
X 10 11 13

I am using Crystal Reports 8.5 and SQL Server 2000
 
Try using a crosstab query, look in Help in SQL Server on how to use them, it is not too hard. Something like:

Transform Arr_Time
Select field1, field2, etc.
From yourTable
Pivot date

This is based on Access 97 syntax, it isn't complete, I am not sure I have the right fields for what you want to do, and I don't have SQL Server on my machine right now, but it should get you going in the right direction.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top