P.Brian.Mackey P.Brian.Mackey - 12 days ago 10
C# Question

ReportingService2010 could not be found

I have:

private readonly ReportingService2010 _rs = new ReportingService2010();


Error:

The type or namespace name 'ReportingService2010' could not be found (are you missing a using directive or an assembly reference?)


I setup a reference to the SSRS service. The reference does not give me access to ReportingService2010 as I expect. The closest thing is:

MySsrsServiceNamespace.ReportingService2010SoapClient


How am I supposed to use the
ReportingService2010
class? MSDN lists this class vaguely.

Please note I tried using
ReportingService2010SoapClient
. This class does not match the documentation for ReportingService2010. For example,
ListChildren()
only accepts 4 parameters and the Url property does not exist.

Answer

Either create a proxy class and include it in your application or add a web reference to ReportingService. The tutorial is available there:

http://technet.microsoft.com/en-us/library/ms155134.aspx

Note that if you are going for proxy class and you are using more than one endpoint (ReportExecution, ReportingService) you should generate proxy classes on different namespaces, otherwise you will get clashes.

Did you do it by web reference? If so, try using WSDL at the command line. Command line syntax:

wsdl /language:CS /n:"Microsoft.SqlServer.ReportingServices2010" http://serverName/reportserver/ReportService2010.asmx?wsdl