Report Parameter - dataset

  • I'm creating a report that does some calculation for all the months. I wrote a Stored Proc that does it and takes Month as a Parameter and created a dataset for it. But i have to execute the same SP for all 12 months, means 12 times in the same report with different month as a Parameter. Does it mean i have to create 12 datasets with different Report Parameters ? Is there any other better way to do it like automating Parameters in a single dataset ?

    any help would be appreciated. Thanks.

     

  • If you are using dot net as your dev platform you can have multiple "data Tables" in one Dataset and addres them like so:

    DataGrid1.DataSource = DataSet.Tables(0)

    DataGrid2.DataSource = DataSet.Tables(1) etc.

    You should be able to execute your proc for all the months and return the Dataset with all 12 resultsets to the report.

    You could also return all the data (for all 12 months) in one temp table to the report and then have "month" as a filter on the report. This way you can avoid making 12 different calls to the DB.

    Hope this helps

     

    Peet Schultz

  • Why can u get the whole year as ds , add column of month and filter your table by month??? 

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply