SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Using lookup in SSRS or array formula


Using lookup in SSRS or array formula

Author
Message
SceloM
SceloM
Old Hand
Old Hand (373 reputation)Old Hand (373 reputation)Old Hand (373 reputation)Old Hand (373 reputation)Old Hand (373 reputation)Old Hand (373 reputation)Old Hand (373 reputation)Old Hand (373 reputation)

Group: General Forum Members
Points: 373 Visits: 190
Hi community

I am hoping you can assist me with this one.

I have two datasets in my report which I want to 'combine'.
One dataset has a set of managers with their staff and the other has manager, staff, booked time.

Here is an example:
Dataset1:
Manager Staff
Mngr1 staff1
Mngr1 staff2
Mngr1 staff3

Dataset2:
Manager Staff BookedTime
Mngr1 Staff1 20
Mngr1 Staff2 10

Required view:
Manager Staff BookedTime
Mngr1 Staff1 20
Mngr1 Staff2 10
Mngr1 Staff3 0

So basically I want to lookup the manager in Dataset2 from Dataset1 and return ALL the manager's employees.
If the employee has not booked time I will then have 0 under the time.

Is this possible in SSRS?
I tried using the Lookup function but I am not getting it right (by the way I am using MS SQL 2008 R2).

Thank you
SceloM
SceloM
Old Hand
Old Hand (373 reputation)Old Hand (373 reputation)Old Hand (373 reputation)Old Hand (373 reputation)Old Hand (373 reputation)Old Hand (373 reputation)Old Hand (373 reputation)Old Hand (373 reputation)

Group: General Forum Members
Points: 373 Visits: 190
I solved this issue.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search