Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 Reporting One page for each month

Author  Topic 

angela4eva
Starting Member

4 Posts

Posted - 2008-12-22 : 12:03:08
Guys,
I have a report now that takes parameters and employeedid,month,year as parameters and returns a simple report.Now I want to change the report to take paramters employeeid,begmonth,endmonth,begyear and endyear.Now i want the report to create one page for each month
below is teh stored procedure that I using currently and it calls another stored procedure that take year and month paramters...
We cannot use cursors in our organization... Please help how to accomplish this
thanks
StoredprocedureMAIN
Select Employeedid ,IMonth ,Iyear ,Salary,caseid From Employees

Where Caseid=@caseid
and Iyear<@begyear
and Iyear>=@endyear
and IMONTH=<@begmonth
and Imonth>=@EndMonth


Exec SpCalculatevalues
/*this is the stored proc i am calling from procedure
/*As you can see it only take in a single value
/*above I changed it to give a range..Can
/*I call this stored procedure multiple times with month year value
/* we are phohibited from using cursors in our organization
@caseid=@caseid
,@IMonth=@IMonth
,@IYear=@IYear

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-12-29 : 01:05:08
you dont need to call procedure multiple times. just call it once and you get data for each month between the range you chose. then in report add a grouping based on month and year. then place a page break after grouping (the option is available in grouping properties).Oncve you do this, you will automatically get each months data in separate page in the report.
Go to Top of Page
   

- Advertisement -