Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 Get field value from query based off other field

Author  Topic 

chasingvertigo
Starting Member

5 Posts

Posted - 2011-01-06 : 14:16:48
I have a report which pulls all of it's data from a stored procedure, and need to add a field to each row of this report based off a value in the returned dataset. I can't modify that stored procedure.

An example is if I had a report to show person details, one field shows the Person_ID field, but I need to add a Person_Name field, which is pulled from the database.

I've created a query which contains (SELECT Person_Name from Persons WHERE Person_ID = @Person_ID), but I'm not sure how I can run this for every person I want to display on the report.

Is it possible to run a value-setting query based off the value of another textbox, or anything that would do the equivalent?
   

- Advertisement -