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.
Author |
Topic |
chriskhan2000
Aged Yak Warrior
544 Posts |
Posted - 2004-11-18 : 17:13:39
|
Is it possible to reference objects from one dataset to another? For example I have 2 datasets. I want to use a where clause for one dataset where it will reference an object from another dataset. Example:Dataset 1Select ID, Name, Department FROM EmployeeDataset 2Select Job_Title, LocationFROM Detail_ContactI want to be able to reference ID from dataset 1 and have Job_Title and Location tied to that ID. Example:Select ID, Job_Title, LocationFrom Detail_ContactWHERE ID = ObjRS("ID")GROUP BY ID |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2004-11-18 : 17:17:08
|
Why not write a view, stored procedure, or query that joins these tables together and returns the results? Then you can use one dataset in RS and pull the columns as needed. |
 |
|
chriskhan2000
Aged Yak Warrior
544 Posts |
Posted - 2004-11-23 : 16:26:46
|
The problem is that I'm creating a report with a navigation link. First the user will be able to click on the Name of the Employee from first dataset and that will give them another report with more detail of that employee. That's why I need to know how to reference the object from another dataset. Any ideas? I know how to do it in asp for web, but not sure how it's done in Reporting Services.In ASP i just reference an object using ObjRS("ObjectName"). |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-11-23 : 17:06:01
|
Sounds like what you need is RS parameters. You can pass the same value from a parameter to multiple data sets.Tara |
 |
|
chriskhan2000
Aged Yak Warrior
544 Posts |
Posted - 2004-11-24 : 12:05:56
|
Can you please explain? When the user clicks on the name in one report, how does it use the parameter to get to the detail information in another report? I've been using reporting services for about a month and a half now, and I haven't got it all down yet.Any help or suggestion is greatly appreciated. |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2004-11-24 : 12:17:43
|
You're jumping to another report, right? When you setup the navigation, you tell it the parameter names. These names should match the calling reports parameter names.Tara |
 |
|
chriskhan2000
Aged Yak Warrior
544 Posts |
Posted - 2004-11-24 : 14:54:26
|
Yes, I'm jumping to another report designed just for detail information of that individual that the user clicks on.I will try that. Thanks. |
 |
|
|
|
|
|
|