Traderhut Games
Traderhut Games

Reputation: 1292

Dataset from a Dataset in SSRS

I laid out the report, and I do a query that returns 30+ rows for a given period of time. One for each workflow. Now, I want to take that dataset (so the query only runs once) and define 6 datasets from it that filter it based on a single selected row. I will populate 8 boxes on the form for each of those datasets.

It appears that when you create a new dataset, it wants to go back to the datasource and ask you about all the data from that one again.

I was able to create a dataset that is a filtered view of the query and figured I could live with creating 6 datasets that ran the query each time filtering it differently each time. So, I need to do a 'copy' on the dataset and 'paste' it back in as a new dataset that is the same as the other one except with a new name.

I also need to set the default values for the Start/End date to be the 1st of last quarter, and the first day of this quarter. Is there a way to create calculated default values or do I need to do a query to return that?

Upvotes: 0

Views: 268

Answers (1)

Kostya
Kostya

Reputation: 1605

if you are using table objects to create your report. you could use just 1 data set and add your filters to the table accordingly. just go to tablix properties>> filters tab.

for default values you can create expressions like for the first day of the current quarter:

=switch(DatePart(DateInterval.Quarter,today()) = 1, cstr(year(today))+"-01-01",
DatePart(DateInterval.Quarter,today()) = 2, cstr(year(today))+"-04-01",
DatePart(DateInterval.Quarter,today()) = 3, cstr(year(today))+"-07-01",
DatePart(DateInterval.Quarter,today()) = 4, cstr(year(today))+"-10-01") 

Upvotes: 2

Related Questions