Solved

How to access a field in a dataset from the other dataset query in ssrs?.

Posted on 2008-06-24
8
768 Views
Last Modified: 2008-09-14
I Need to access a field in a dataset from the other dataset in SSRS. can anyone tell me how to do it?
0
Comment
Question by:mshan
8 Comments
 
LVL 5

Expert Comment

by:catherinelouise
ID: 21857965
I have done this recently using the following syntax

(Fields!Field.Value, "DataSetName")

I believe you need to use aggregate functions with this data however, in my case I was retrieving a min and max value - do you need to get a single value?
0
 
LVL 5

Expert Comment

by:catherinelouise
ID: 21858100
I beg your pardon - I think I misunderstood your question actually, do you want a value from dataset A to appear in the actual query of dataset B?
0
 

Author Comment

by:mshan
ID: 21858388
Yes.Exactly.I have 2 datasets A and B each pulls data from 2 different functions.I need to get a field from A through dataset B. query in dataset A gives 4 columns and query in B gives 3 columns.I want to get a column from A in B along with its 3 columns
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 5

Accepted Solution

by:
catherinelouise earned 168 total points
ID: 21858841
I'm fairly sure this can't be done - a dataset is simply a query,and has the same syntax requirements that a query in query analyzer does.

If you need everything in one dataset for your report object, then I believe you need to find a  way to do this in the T-SQL.

Sorry!
0
 
LVL 12

Assisted Solution

by:jgv
jgv earned 166 total points
ID: 21858968
It can be done but it's pretty limited. You will need to use a function that includes the "scope" parameter. The scope must be the dataset name that you are trying to retrieve a field from. For example, this will retrieve the value of a field (SomeField) from the first record in another dataset (DatasetB).
=First(Fields!SomeField.Value, "DatasetB")

If you are trying to "join" the datasets so that you can include an extra column displaying another dataset's information then catherinelouise is correct that you would have to do this from the query.
0
 
LVL 18

Assisted Solution

by:chrismc
chrismc earned 166 total points
ID: 21859269
You can also do it through parameters, but you'd probably want to make it hidden.
This also assumes we are talking about just one value from dataset A.

When you set up a parameter you can say that it's default value comes from a dataset and then specify the field.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I recently went through setting up a JasperReports Server using the AWS EC2 instance, and this article will cover some basic administration tasks I had to perform.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now