SSRS - Related datasets
-
quarta-feira, 22 de agosto de 2012 14:15
Hi,
I have two Datasets: Dataset1 and Dataset2.
Dataset1 retrieves only one record (Fields are - For example -: ID, Name)
Dataset2 need to retrieves some records based on the ID field of the first Dataset.
Note that both Datasets fields are used on Placeolder expresions (On TextBox), I mean, not within table, charts...
Is that possible? If so how?
Regards,
Bader
Todas as Respostas
-
quarta-feira, 22 de agosto de 2012 14:46
create a parameter
name para_YourTable_Id
type integer
Default value -> Dataset1.Id
Then in dataset 2, change your query for
select whatEverField
From WhatEverTable
where Id = @para_YourTable_Id
Alex
- Sugerido como Resposta Charlie LiaoMicrosoft Contingent Staff, Moderator quinta-feira, 30 de agosto de 2012 01:18
- Marcado como Resposta Charlie LiaoMicrosoft Contingent Staff, Moderator quinta-feira, 30 de agosto de 2012 10:07
-
sexta-feira, 24 de agosto de 2012 08:13Moderador
Hi Bader,
In your scenario, Alex’s suggestion is exactly right. Add a filter to dataset2 can also give you the same result. Add a filter into dataset2 like below:
Expression: ID
Operator: =
Value: @para_YourTable_IdBesides, you can use lookup function in the textbox to do it. The expression looks like below:
=lookup(fields!ID.Value, fields!ID.Value, fields!ColumnName.Value, ”DataSet2”)
For more information about lookup function, please see:
http://msdn.microsoft.com/en-us/library/ee210531.aspxIf you have any questions, please feel free to ask.
Regards,
Charlie LiaoTechNet Subscriber Support
If you are TechNet Subscription user and have any feedback on our support quality, please send your feedbackhere.- Marcado como Resposta Charlie LiaoMicrosoft Contingent Staff, Moderator quinta-feira, 30 de agosto de 2012 10:07

