-
February 12th, 2003, 09:33 PM
#11
Hi K.Babu,
Please help me!
* I have 2 tables following: EmployeeTb & DeparmentTb
- EmployeeTb contains fields: EmployeeID, EmployeeName, DeparmentID
- DepartmentTb contains fields: DeparmentID, DeparmentName, LeaderID
* Relations:
EmployeeTb.DepartmentID <--------> DepartmentTb.DepartmentID
DepartmentTb.LeaderID <--------> EmployeeTb.EmployeeID
* Note: DepartmentTb.LeaderID links to EmployeeTb.EmployeeID to describe Deparment Leader name.
* Data:
- EmployeeTb: (6 employees)
EmployeeID-------EmployeeName--------DepartmentID
1--------------------Employee1--------------1
2--------------------Employee2--------------2
3--------------------Employee3--------------2
4--------------------Employee4--------------1
5--------------------Employee5--------------1
6--------------------Employee6--------------1
- DepartmentTb: (2 department)
DepartmentID-------DepartmentName--------LeaderID
1- ---------------------Department1--------------3
2-----------------------Department2--------------5
* I have SQL statement:
SELECT e.EmployeeName, (SELECT e2.EmployeeName FROM EmployeeTb AS e2 WHERE e2.EmployeeID = e.LeaderID) AS LeaderName
FROM EmployeeTb e INNER JOIN DepartmentTb d ON e.DepartmentID = d.DepartmentID
Question:
I want to show following form:
EmployeeName---------------------LeaderName
Employee1--------------------------Employee5
Employee2--------------------------Employee3
Employee3--------------------------Employee3
Employee4--------------------------Employee5
Employee5--------------------------Employee5
Employee6--------------------------Employee5
How to I design in crystal report?
Thanks a lot!
Originally posted by K.Babu
Explain with more details about your requirement
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|