P.Brian.Mackey P.Brian.Mackey - 1 year ago 277
C# Question

ReportingService2010 could not be found

I have:

private readonly ReportingService2010 _rs = new ReportingService2010();


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:


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

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

Answer Source

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


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
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download