Most of the time RS.EXE is used to carry out administrative tasks like upload/download report, create data source, assign roles etc. For executing the report (rendering) we mostly use Report Manager or applications (Web or Windows). One option that many people don’t consider is using RS.EXE to render the report.
One scenario where I had to use RS.EXE for rendering was when I had to create a tool to do build verification test (Should I call deployment verification? :)) for SSRS. We have a MSI which uses RSS script to deploy a report and set data source. Once it is deployed we had to manually run the report to verify that it renders without any issues. I wanted to automate this rendering part by using RS.EXE.
So I created a RSS script as below
and the command line call as
rs -i e:\test\BVT.rss -s http://MyReportServer/reportserver
When I ran the command, it had thrown errors like
error BC30002: Type ‘ExecutionHeader’ is not defined.
error BC30002: Type ‘ExecutionInfo’ is not defined.
error BC30456: ‘Render ‘ is not a member of ‘Microsoft.SqlServer.ReportingServices2005.ReportingService2005’.
error BC30456: ‘LoadReport’ is not a member of ‘Microsoft.SqlServer.ReportingServices2005.ReportingService2005’.
This is because the SSRS web service has two end points, one for management and another for execution. By default RS.EXE uses the management endpoint to execute the RSS script. You can override this by passing the required endpoint as parameter. In my case I had to call the Execution endpoint to render the report. So the call should have been like
rs -i e:\test\BVT.rss -s http://MyReportServer/reportserver -e Exec2005
Have a look at the below one from MSDN for more detail on SSRS webservice endpoints