Click here to Skip to main content
16,011,685 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello All,

I have an stored procedure which takes a single date as a parameter and generates an output onto a SSRS table.

But if I have use a date range and yet separate the output into multiple tables, how to do that?
What I mean to say is that the output will be a separate tables(dynamically) per date of the date range selected.

Please help.

Thanks & Regards
Sujith Narayanan
Posted
Comments
Sandeep Mewara 29-Mar-11 15:23pm    
Still now clear on what are you aiming to achieve here.

Having multiple tables is ok. You can do it. You can also set multiple datasources in your SSRS. Now what?
Sujith_N 30-Mar-11 12:08pm    
Ok let me rephrase the entire scenario. I have a table in database that has a date column. Now when I run a query to fetch data on a date range it will show a long list of records . I want this to be broken into multiple output tables on the report screen so that when I export it to excel from the SQL Server report it should come in different WorkSheets. One Sheet per date from the date range that is been selected.

1 solution

You need nested SP.

The first would take the date range and run a cursor each time calling the existing SP for that date.
 
Share this answer
 
Comments
Sujith_N 30-Mar-11 12:09pm    
Ok let me rephrase the entire scenario. I have a table in database that has a date column. Now when I run a query to fetch data on a date range it will show a long list of records . I want this to be broken into multiple output tables on the report screen so that when I export it to excel from the SQL Server report it should come in different WorkSheets. One Sheet per date from the date range that is been selected.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900