Reputation: 889
I can't seem to find a clear answer as to how to import the proper namespace for ReportingService http://msdn.microsoft.com/en-us/library/aa258073(v=SQL.80).aspx.
I tried to follow the instruction here http://msdn.microsoft.com/en-us/library/aa237438(v=sql.80).aspx but there is no Add Web Service option showing when I create a console application.
There is a service account. Should I just use that instead?
Upvotes: 4
Views: 12541
Reputation: 7720
Just right click on your project item and select "Add Service Reference"
As an alternative solution you can generate the code with the wsdl.exe tool, it is generally what I do for SSRS.
For example from the VS command prompt:
wsdl /language:CS /n:"Microsoft.SqlServer.ReportingServices2010" http://<Server Name>/reportserver/reportservice2010.asmx?wsdl
More details on how to create the Web Service Proxy for SSRS.
Upvotes: 1
Reputation: 44595
you have a full example on how to do this from a Console Application in MSDN, here: ReportExecutionService.Render Method which also requires you to read this one: http://msdn.microsoft.com/en-us/library/ms160695.aspx
in general if you create a .NET 4 Console App you can right click on References in Solution Explorer and select Add Service Reference, it works also with Web Services, not only for WCF.
For a Report Server running SSRS 2005 or 2008 the web service to reference has this form:
scroll the pages I linked above to find the console application example starting like this...
static void Main(string[] args)
{
ReportExecutionService rs = new ReportExecutionService();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
rs.Url = "http://myserver/reportserver/ReportExecution2005.asmx";
...
...
Upvotes: 6