Multiple datasets in report

Posted on 2012-09-20
Last Modified: 2012-09-21

 I have developed a report model from which I have created a report.  The report contains two tables/tablices/tablix each pointing to it's own dataset.  The fields that make up both datasets are taken from the model.

I am using the same fieldnames in each dataset.

I want to show different results in each tablx e.g

dataset 1:  select * from country where salesteam='Active

dataset 2: select * from country where salesteam='Inactive'

Each dataset has a prompt parameter for address

My problem is that when I'm prompted to enter the address to search by ,  the second dataset ignores the search criteria and brings back everything.  Can anyone suggest how to go about this?  Can the two tables use the same dataset but using expression to limit the result e.g iif(field!status.value='Active',field!status.value,"") in the first table and iif(field!status.value='InActive',field!status.value,"") in the second table
Question by:turaks
    LVL 39

    Accepted Solution

    You can use the expressions or even do it right in your sql query:

    select *, case when status = 'Inactive' then '' as FormattedStatus end from country where salesteam = 'active'

    Also there is a row filter on the Tablix so that you can set your row filter to just pull back what you want from the same dataset.
    LVL 2

    Assisted Solution

    Step 1) : Create a  Dataset ‘Country’ with the Query ‘Select * from Country’.

    Step 2) : Set the Dataset Name= ‘Country’  tables/tablices/tablix (Data region) Which you created.

    Step 3) : Go to the FIRST  table and took the  tablix properties and set  salesteam =  Active  in the filer tab.

    Step 4) : Go to the SECOND  table and took the  tablix properties and set  salesteam =  Inactive in the filer tab.
    LVL 21

    Expert Comment

    by:Alpesh Patel
    You can do it by different dataset.

    Create 2 different data set for Active and Inactive.

    Put 2 Matrix and give different Dataset name to property of matrix.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
    In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
    Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
    Viewers will learn how the fundamental information of how to create a table.

    755 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

    26 Experts available now in Live!

    Get 1:1 Help Now