SQLTeam.com | Weblogs | Forums

Multiple Queries vs A stored proc


#1

Hi Everyone,

I know SRSS can only have a limited number of Datasets..
I am running a report that is split into 12 months.. I would need 12 Datasets that are querying 12 separate dates.
I was wondering...
Could I make a Stored proc and embed a Date parameter inside an expression?
kinda like pre-selected date ranges that do not require user input on dates?

Hopefully this makes sense
Lend me your thoughts please

Thanks,

M


#2

You could have one stored proc that returns all the data for all the 12 months.. Include the Date or the month as a column. Then, you can create 12 datasets, all from the same query. A dataset has an option to apply a filter to the query, and you can use that to filter the data for the month for which you are creating the dataset.

A better way, in my opinion, is to apply the filter on the tablix. A tablix also allows you to filter the data. So you would have just one dataset and each tablix would filter the data for the month that it is interested in.


#3

Just looked at the filter option
So I could stretch the date to a year and filter out the months with a tablix filter
This is great!

Thanks James!