April 28, 2009 at 7:08 am
Hi
I have a one query
select E.FullName,E.DepartmentID,S.NoOfWorkingDays,F.Percentage,S.CalculatedAmount
from Employee E left join T5052_P009 S on E.EmployeeID=S.EmployeeID left join T5052_C010 F on
E.EmployeeID=F.EmployeeID WHERE (E.CompanyID = 1) AND ( E.EmployeeId in ( 145, 190, 203, 204, 239, 258, 259, 261, 262, 306, 308, 309, 416, 417 )) group by E.DepartmentID,E.FullName,S.NoOfWorkingDays,F.Percentage,S.CalculatedAmount
execute this query below output wil show
Ben Miller29NULLNULLNULL
David Bradley29NULLNULLNULL
Eric Hagins29NULLNULLNULL
Eric Kurjan29NULLNULLNULL
Frank Pellow29NULLNULLNULL
Fukiko Ogisu29NULLNULLNULL
Gail Erickson29NULLNULLNULL
Gordon Hee29NULLNULLNULL
Jae Pak29NULLNULLNULL
Jian Shuo Wang29NULLNULLNULL
John Wood29NULLNULLNULL
Jossef Goldberg29NULLNULLNULL
dasda dadasda31NULLNULLNULL
qeqeq eqweqe45NULLNULLNULL
but i want
DepID = 29
Ben Miller29NULLNULLNULL
David Bradley29NULLNULLNULL
Eric Hagins29NULLNULLNULL
Eric Kurjan29NULLNULLNULL
Frank Pellow29NULLNULLNULL
Fukiko Ogisu29NULLNULLNULL
Gail Erickson29NULLNULLNULL
Gordon Hee29NULLNULLNULL
Jae Pak29NULLNULLNULL
Jian Shuo Wang29NULLNULLNULL
John Wood29NULLNULLNULL
Jossef Goldberg29NULLNULLNULL
depID =31
dasda dadasda31NULLNULLNULL
depID =45
qeqeq eqweqe45NULLNULLNULL
please help me
Regards
S.Senthilnathan
April 28, 2009 at 7:49 am
Why you want it that way ..?. If you want it for reporting purpose, you can do it in front end application.
April 28, 2009 at 8:24 am
If this is for a report, then I would suggest returning the DepID as part of the result set. You can then just add the DepID as the group header.
BJC
April 28, 2009 at 10:47 pm
hi
iam using report viewer give me sample
April 28, 2009 at 10:48 pm
hi
Any sample for reportviewer
May 11, 2009 at 10:18 am
The following is good article on reporting services. If you look at the screen shot of the report wizard, all you would have to do is add the dep id that you referenced in the "group>" and then add the rest of the records to the detail. If this is not clear, please let me know.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply