I am deploying a lot of report lately. And so to I kept code and version clear and understanding, Ill like to have one stored procedure per report. Mostly time I need more data sets for one reports. Is there possibility to I have more then one data set in report SSRS for calling only one stored procedure for that report. (I am using remote reports hosted on Sql Report Server 2008 ).
I uses familiar Issue whit sample console application for creating multiple CSV files from SQL using one stored procedure. snipes of code looks something like this:
SqlConnection conn = new SqlConnection(strConn);
SqlCommand command = new SqlCommand("sp_ado_pos_data", conn);
command.CommandType = CommandType.StoredProcedure;
command.Parameters.Add("@skl_id", SqlDbType.Int).Value = 158;
SqlDataAdapter adapter = new SqlDataAdapter(command);
DataSet ds = new DataSet();
adapter.Fill(ds);
for (int i = 0; i < ds.Tables.Count; i++)
{
string datoteka = (string.Format(@"{0}tablea{1}.csv", direktorij, i));
DataTable tabela = ds.Tables[i];
//Here I fill datasets with multiple results from one stored proc.
CreateCSVFile(tabela,datoteka );
Console.WriteLine("Generišem tabelu {0}", datoteka);
}