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
 Generating multipe reports using SSRS

Author  Topic 

bbasir
Yak Posting Veteran

76 Posts

Posted - 2008-04-13 : 16:14:16
I have one report that takes in a paremeter as employee id and then develops a report based on that id i.e. pdf report.

In my organization there are 100 employees. How can I modify that report or use some other technique to run the reports for all 100 employees by passing in those 100 employee id's?

I guess it has to be some automated way of doing this? as one doesnot want to enter 100 employee ids and create 100 reports one at a time.
I am using sql reporting servcices 2000

thanks

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-04-14 : 00:24:06
Are you saying you need to generate a single report for 100 employees? This can be achieved by making a single employeeid parameter through which you can pass more than one id at a time. the ids will be passed as a comma seperated string of values to db by the user. And in your stored procedure you can call a function to split the string into individual values, join onto this function to return the details you want. Yopu can get number of such table valued functions from net. Search inside forums for parsestring function as an example.

Alternatively you can also get details by using this query in sp

SELECT yourDetails from Employee WHERE ','+@EmpIDList + ',' like '%,'+ employeeid + ',%'
Where EmpIDList is multivalued parameter used in your report.
Go to Top of Page

bbasir
Yak Posting Veteran

76 Posts

Posted - 2008-04-14 : 01:52:15
Visakh, sorry for not being clear...

I want the report to run 100 times, so basically there will be one report for each of the employees.

Right now, one has to enter the employee id and a sql rs pdf report is generated as employee id is the input parameter.

For generating 100 reports that is time consuming as one has to pass every employee idd and run the report 100 times.

I want to have 100 pdfs which represent one report for each of the employee.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-04-14 : 04:30:42
I dont think this can be done from within report manager. But certainly you can write a .NET program to implement the webservice of SQL reporting services to invoke the report 100 times within a loop one for each employee.

http://support.microsoft.com/kb/875447

Go to Top of Page

bbasir
Yak Posting Veteran

76 Posts

Posted - 2008-04-14 : 12:42:00
Thanks Visakh, let me take a look at the web service functionality of the sql reporting services...
Go to Top of Page
   

- Advertisement -