007
007

Reputation: 2186

SSRS - Pass MDX parameter value to SQL query

I have a EmployeeID parameter:

="[Employee].[Employee Id].&[12345678912345]" 

I have a SQL query that calls for EmployeeID parameter like this:

Where...AND (EmployeeID = @EmployeeID)

I then go into the sql dataset's parameters list and set EmployeeID's value to:

=LEFT(RIGHT(Parameters!EmoloyeeID.Value,15),14)

This should give 12345678912345. EmployeeID column in SQL table has datatype of nvarchar(25).

Now when I use lookup to connect Cube's dataset (dataset of the tablix I am working on) with this SQL dataset,

=Lookup(Cube's EmployeeName field, SQL's EmployeeName field, SQL's EmployeeStatus, "SQLDataSet")

I get no output. I get blank. (I know for fact that there is data because when I execute SQL query in SSMS with EmployeeID declared to 12345678912345, I get right EmployeeeName (matches with Cube's EmployeeName value) and EmployeeStatus values.

What am I doing wrong? Am I doing something wrong to EmployeeID parameter's value manipulation?

Upvotes: 1

Views: 998

Answers (1)

Elizabeth
Elizabeth

Reputation: 109

Is this a typo? =LEFT(RIGHT(Parameters!EmoloyeeID.Value,15),14)

Just want to check to ensure it's not a simple fix :-)

Upvotes: 1

Related Questions