Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Lookup Function. Have you tried it? Expand / Collapse
Author
Message
Posted Tuesday, October 02, 2012 1:56 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: 2 days ago @ 3:26 AM
Points: 156, Visits: 567

Hi geniuses!

I'm stuck here with a Lookup function in SSRS.

Can anybody give me an example of this function?

Thanks

Best Regards to all!
Post #1367273
Posted Tuesday, October 02, 2012 6:29 PM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Today @ 12:57 PM
Points: 740, Visits: 790
davdam8 (10/2/2012)

Hi geniuses!

I'm stuck here with a Lookup function in SSRS.

Can anybody give me an example of this function?


See if this helps: http://technet.microsoft.com/en-us/library/ee210531.aspx

HTH,
Rob
Post #1367356
Posted Wednesday, October 03, 2012 10:07 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: 2 days ago @ 3:26 AM
Points: 156, Visits: 567

Hi!

I believe that I've used correctly the Lookup function, but it doesn't retrieve the correct result.
Going to be hard to explain, but here it goes:

DataSet1 (from DataSource1) with ProjectName, from table: MSP.PROJECT (contains PROJ_UID, ProjectName,...)
DataSet2 (from DataSource2) with StageName, from view: MSP.WORKFLOWSTATUS (contains PROJ_UID, STAGE_UID, StageName,...)

Result sample:
from DataSet1
PROJECT NAME
Proj A
Proj B
Proj C

from DataSet2
STAGE NAME
Proposal in Consideration
Waiting for Validation
Selection
In Execution
...

In a cell from my tablix I got this expression:
=Lookup(Fields!PROJ_UID.Value,Fields!PROJ_UID.Value,Fields!StageName.Value, "DataSet2")
(basically I want to expose the stage of the project)

Knowing that:
Proj A is in Stage Name "Proposal in Consideration"
Proj B is in Stage Name "Waiting for Validation"
Proj C is in Stage Name "Selection"

... the result I got, for each one of the project, Stage Name = "Proposal in Consideration"


Any solution/explanation?

Big Thanks
Best Regards
Post #1367828
Posted Wednesday, October 03, 2012 12:22 PM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Today @ 12:57 PM
Points: 740, Visits: 790
Rather than using the Lookup() function, can you join the tables in your SELECT?

Rob
Post #1367945
Posted Monday, October 08, 2012 6:53 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, March 12, 2013 7:23 AM
Points: 114, Visits: 386
Hi,
Go to this link look up explained with example
http://www.bi-rootdata.com/2012/10/lookup-function-in-ssrs.html
Post #1369782
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse