Report Server Web Service Methods Download

Transcript
Table of Contents
Methods +
Authorization Methods
Data Sources and Connection Methods
Linked Reports Methods
Model Methods - Report Server Web Service
Rendering and Execution Methods
Report History Methods
Report Parameters Methods
Report Server Namespace Management Methods
Report Server Web Service Endpoints
Report Server Web Service Methods
Scheduling Methods
Subscription and Delivery Methods
.NET Framework +
Building Applications Using the Web Service and the .NET Framework
Calling Web Service Methods
Creating the Web Service Proxy
Omitting Values for Optional Web Service Objects
Passing Device Information Settings to Rendering Extensions
Reporting Services Delivery Extension Settings
Reporting Services Properties - Report Server Item Properties
Reporting Services Properties - Report Server System Properties
Reporting Services Properties
Setting the Url Property of the Web Service
Supplying Web Service Method Arguments
Using Secure Web Service Methods
Using the RSClientPrint Control in Custom Applications
Web Service Authentication
Accessing the SOAP API
Report Server Web Service
The Role of SOAP in Reporting Services
Authorization Methods
3/24/2017 • 1 min to read • Edit Online
You can use these methods to manage tasks, roles, and policies on the report server.
METHOD
ACTION
CreateRole
Adds a new role to the report server database. This method
=applies to native mode only.
DeleteRole
Deletes a role from the report server database. This method
applies to native mode only.
GetPermissions
Returns the user permissions that are associated with a
particular item in the report server database or SharePoint
library.
GetPolicies
Returns the policies that are associated with a particular item
in the report server database or SharePoint library.
GetRoleProperties
Returns role metadata properties and a collection of
associated tasks.
GetSystemPermissions
Returns the user's system permissions. This method applies to
native mode only.
GetSystemPolicies
Returns the system policies, including groups and roles with
which they are associated. This method applies to native mode
only.
InheritParentSecurity
Deletes the policies that are associated with a particular item
in the report server database and sets the security policies for
the item to those of its parent.
IsSSLRequired
Returns a Boolean value that indicates whether the Secure
Socket Layer (SSL) protocol is required to use the
ReportService2010 end point.
ListRoles
Returns the names and descriptions of roles that are managed
by the report server.
ListSecureMethods
Returns a list of Simple Object Access Protocol (SOAP)
methods in the ReportExecution2005 endpoint that require a
secure connection when invoked. The
SecureConnectionLevel setting of the report server is used
to determine which methods are returned.
ListTasks
Returns the tasks that are managed by the report server.
SetPolicies
Sets the policies that are associated with a specified item.
METHOD
ACTION
SetRoleProperties
Sets role metadata properties and associates a set of tasks
with a role. This method applies to native mode only.
SetSystemPolicies
Sets the system policy that defines groups and their
associated roles. This method applies to native mode only.
See Also
Building Applications Using the Web Service and the .NET Framework
Report Server Web Service
Report Server Web Service Methods
Technical Reference (SSRS)
Data Sources and Connection Methods
3/24/2017 • 1 min to read • Edit Online
You can use these methods to set and manage data source connections and credentials.
METHOD
ACTION
CreateDataSource
Creates a new data source in the report server database or
SharePoint library.
DisableDataSource
Disables a data source that is enabled.
EnableDataSource
Enables a data source that is disabled.
GetDataSourceContents
Returns the contents of a data source.
GetItemDataSourcePrompts
Gets the data source prompts for a specified item.
GetItemDataSources
Returns the data sources for an item in the catalog.
ListDependentItems
Returns a list of catalog items that reference a specified
catalog item.
ListSubscriptionsUsingDataSource
Returns a list of subscriptions that are associated with a given
data source.
SetDataSourceContents
Sets the connection properties that are associated with a data
source.
SetItemDataSources
Sets the data sources for an item in a report server database
or SharePoint library.
TestConnectForDataSourceDefinition
Tests the connection for a data source. This method supports
the direct testing of the data source.
TestConnectForItemDataSource
Tests the connection for a data source. This method supports
the testing of published data sources that are used by reports
or models and shared data sources.
See Also
Building Applications Using the Web Service and the .NET Framework
Report Server Web Service
Report Server Web Service Methods
Technical Reference (SSRS)
Linked Reports Methods
3/24/2017 • 1 min to read • Edit Online
You can use these methods to create and manage linked items.
METHOD
ACTION
CreateLinkedItem
Adds a new linked item to the report server database.
GetItemLink
Returns the name of the item whose item definition is used for
the specified linked item.
ListDependentItems
Returns a list of the items that are linked to a specified item.
SetItemLink
Specifies the catalog item that is used for the item definition of
an existing linked item.
See Also
Building Applications Using the Web Service and the .NET Framework
Report Server Web Service
Report Server Web Service Methods
Technical Reference (SSRS)
Model Methods - Report Server Web Service
3/24/2017 • 1 min to read • Edit Online
You can use these methods to manage models.
METHOD
ACTION
GenerateModel
Generates a default model on top of a shared data source.
GetModelItemPermissions
Retrieves the user permissions that are associated with the
model item.
GetModelItemPolicies
Retrieves the policies that are associated with a model item.
GetUserModel
Returns the semantic piece of a model for the current user.
InheritModelItemParentSecurity
Deletes the policies that are associated with a model item and
causes the model item to inherit the policies from its parent.
ListModelDrillthroughReports
Lists drillthrough reports that are associated with an entity in
a model.
ListModelItemChildren
Returns an array of model item child elements.
ListModelItemTypes
Returns a list of supported model item types.
ListModelPerspectives
Lists models and perspectives that are available to the user.
RegenerateModel
Updates an existing model based on changes to the data
source schema.
RemoveAllModelItemPolicies
Deletes all policies that are associated with model items in the
specified model.
SetModelDrillthroughReports
Associates a set of drillthrough reports together with a model.
SetModelItemPolicies
Sets security policies on a model item.
See Also
Building Applications Using the Web Service and the .NET Framework
Report Server Web Service
Report Server Web Service Methods
Technical Reference (SSRS)
Rendering and Execution Methods
3/24/2017 • 1 min to read • Edit Online
You can use these methods to manage item execution and caching, and report rendering.
METHOD
ACTION
FlushCache
Invalidates the cache for an item.
GetCacheOptions
Returns the cache configuration for an item and the settings
that describe when the cached copy of the item expires.
GetExecutionOptions
Returns the execution option and associated settings for an
individual item.
ListExecutionSettings
Returns a list of supported execution settings.
Render
Processes the specified report and renders it in a specified
format.
SetCacheOptions
Configures an item to be cached and provides settings that
specify when the cached copy of the item expires.
SetExecutionOptions
Sets execution options and associated execution properties for
a specified item.
UpdateItemExecutionSnapshot
Generates an item execution snapshot for a specified item.
See Also
Building Applications Using the Web Service and the .NET Framework
Report Server Web Service
Report Server Web Service Methods
Technical Reference (SSRS)
Report History Methods
3/24/2017 • 1 min to read • Edit Online
You can use these methods to create and manage item history snapshots.
METHOD
ACTION
CreateItemHistorySnapshot
Generates an item history snapshot of a specified catalog item.
DeleteItemHistorySnapshot
Deletes an individual item history snapshot for a specified
catalog item.
GetItemHistoryLimit
Returns the item history snapshot limit for a specified catalog
item.
GetItemHistoryOptions
Returns the item history snapshot option setting and
properties generated for a catalog item.
ListItemHistory
Returns a list of item history snapshots and their properties
for a specified catalog item.
SetItemHistoryLimit
Specifies how many snapshots of an item the report server
retains.
SetItemHistoryOptions
Sets item history options that specify when an item history
snapshot is created for a specified catalog item.
See Also
Building Applications Using the Web Service and the .NET Framework
Report Server Web Service
Report Server Web Service Methods
Technical Reference (SSRS)
Report Parameters Methods
3/24/2017 • 1 min to read • Edit Online
You can use these methods to set and retrieve parameters for reports.
METHOD
ACTION
GetItemParameters
Returns parameter properties for a specified item. This method
can also be used to validate parameter values against
parameters for a specified item.
ListParameterStates
Returns a list of supported parameter states.
ListParameterTypes
Returns a list of supported parameter types.
SetItemParameters
Sets parameter properties for a specified item.
See Also
Building Applications Using the Web Service and the .NET Framework
Report Server Web Service
Report Server Web Service Methods
Technical Reference (SSRS)
Report Server Namespace Management Methods
3/24/2017 • 2 min to read • Edit Online
The Report Server Management Web service contains methods that you can use to manage reports, folders, and
resources in the report server database.
METHOD
ACTION
CancelJob
Cancels execution of a job.
CreateFolder
Adds a folder to the report server database or SharePoint
library.
CreateCatalogItem
Adds a new item to a report server database or SharePoint
library. This method applies to the Report, Model, Dataset,
Component, Resource, and DataSource item types.
M:ReportService2010.ReportingService2010.CreateReportEditS
ession(System.String,System.String,System.Byte[],ReportService
2010.Warning[]@)
Creates a new report edit session.
DeleteItem
Removes an item from the report server database or
SharePoint library.
FindItems
Returns the items in the report server database or SharePoint
library that match the specified search criteria.
FireEvent
Triggers an event based on the supplied parameters.
GetExtensionSettings
Returns a list of settings for a given extension.
GetItemType
Retrieves the type of an item in the report server database or
SharePoint library, if the item exists.
GetProperties
Returns the values of one or more properties on an item in
the report server database or SharePoint library.
GetItemDefinition
Retrieves the definition or content for an item. This method
applies to the Report, Model, Dataset, Component,
Resource, and DataSource item types.
GetItemReferences
Returns a list of catalog item references associated with an
item.
GetReportServerConfigInfo
Returns information on the connected report server instance
or all the report server instances in a scale-out deployment.
GetSystemProperties
Returns one or more system properties.
ListChildren
Gets a list of children of a specified folder.
METHOD
ACTION
ListDatabaseCredentialRetrievalOptions
Returns a list of supported credential retrieval options.
ListEvents
Returns a list of event extensions as they appear in the report
server configuration file.
ListJobs
Returns a list of jobs running on the report server.
ListExtensions
Returns a list of extensions that are configured for a given
extension type.
ListExtensionTypes
Returns a list of supported extension types.
ListItemTypes
Returns a list of supported catalog item types.
ListJobActions
Returns a list of supported job actions.
ListJobStates
Returns a list of supported job states.
ListJobTypes
Returns a list of supported job types.
ListParents
Retrieves parent items for the given item.
ListSecurityScopes
Returns a list of supported security scopes.
Logoff
Logs out the current user making Web service requests. This
method only applies to native mode.
LogonUser
Logs on a user and authenticates a user request to the Report
Server Web service. This method only applies to native mode.
SetItemReferences
Sets the catalog items associated with an item.
MoveItem
Moves and/or renames an item.
SetProperties
Sets one or more properties of an item.
SetItemDefinition
Sets the definition or content for a specified item. This method
applies to the Report, Model, Dataset, Component,
Resource, and DataSource item types.
SetSystemProperties
Sets one or more system properties in the report server or
SharePoint farm.
ValidateExtensionSettings
Validates Reporting Services extension settings.
See Also
Building Applications Using the Web Service and the .NET Framework
Report Server Web Service
Report Server Web Service Methods
Technical Reference (SSRS)
Report Server Web Service Endpoints
3/24/2017 • 2 min to read • Edit Online
The Report Server Web service provides several endpoints for managing a report server as well as executing and
navigating reports.
The Management Endpoints
There are three endpoints available for managing objects on a report server, ReportService2005,
ReportService2006, and ReportService2010. The ReportService2005 endpoint is used for managing objects on a
report server that is configured for native mode. The ReportService2006 endpoint is used for managing objects on
a report server that is configured for SharePoint integrated mode. The ReportService2010 endpoint merges the
functionalities of ReportService2005 and ReportService2006 and can manage objects on a report server that that
are configured for either native or SharePoint integrated mode.
IMPORTANT
When a report server is configured for SharePoint integrated mode, the ReportService2005 APIs will return an
rsOperationNotSupportedSharePointMode error. If the report server is configured for native mode, the
ReportService2006 APIs will return an rsOperationNotSupportedNativeMode error. Similarly, when mode-specific APIs in
ReportService2010 are used on unintended modes, the APIs will return the respective errors.
NOTE
The ReportService2005 and ReportService2006 endpoints are deprecated in SQL Server 2008 R2. The ReportService2010
endpoint includes the functionalities of both endpoints and contains additional management features.
If the report server is configured for native mode or SharePoint integrate mode, the WSDL for the management
endpoint can be accessed using one of the following URL:
http://<Server Name>/ReportServer/ReportService2010.asmx?wsdl
For more information, see Accessing the SOAP API.
The Execution Endpoint
The ReportExecution2005 endpoint makes it easy for developers to customize report processing and rendering
from a report server in both native and SharePoint integrated modes. The endpoint includes classes and methods
that existed in earlier versions of the Report Server Web service. In addition, many new classes and methods have
been added to the Report Server Web service that are exposed through the execution endpoint.
The WSDL for the management endpoint can be accessed using the following URL:
http://<Server Name>/ReportServer/ReportExecution2005.asmx?wsdl
If the report server is configured for SharePoint integrate mode, the WSDL can be accessed using the following
URL:
http://<Server Name>/<Site Name>/_vti_bin/ReportServer/ReportExecution2005.asmx?wsdl
For more information, please see Accessing the SOAP API.
SharePoint Proxy Endpoints
When a report server is configured for SharePoint integrated mode and the Reporting Services Add-in has been
installed, a set of proxy endpoints are installed on the SharePoint server. The proxy endpoints are the primary API
for developing report solutions when a report server is configured for SharePoint integrated mode. When
developing against the proxy endpoints, the Reporting Services Add-in manages the exchange of credentials
between the SharePoint server and the report server in Trusted account authentication mode. When developing
against the report server endpoints, the calling application will have to manage the credential exchange in Trusted
account authentication mode. The following table lists the endpoints that are installed with the Reporting Services
Add-in.
PROXY ENDPOINT
DESCRIPTION
ReportService2006
Provides the APIs for managing a report server that is
configured for SharePoint integrate mode.
Note: This endpoint is deprecated in SQL Server 2008 R2.
ReportService2010
Provides the APIs for managing a report server that is
configured for either native or SharePoint integrated mode.
ReportExecution2005
Provides the APIs for running and navigating reports.
ReportServiceAuthentication
Provides the APIs for authenticating users against a report
server when the SharePoint Web application is configured for
Forms Authentication.
The following are example URLs for referencing the proxy endpoints on a SharePoint site.
http://<Server Name>/<Site Name>/_vti_bin/ReportServer/ReportService2010.asmx
http://<Server Name>/<Site Name>/_vti_bin/ReportServer/ReportExecution2005.asmx
http://<Server Name>/<Site Name>/_vti_bin/ReportServer/ReportServiceAuthentication.asmx
See Also
Building Applications Using the Web Service and the .NET Framework
Report Server Web Service Methods
3/24/2017 • 1 min to read • Edit Online
The Report Server Web services include several categories of methods that are based on component features.
These methods are provided through several Web service endpoints (three for report management and one for
report execution) which are exposed as members of the ReportingService2010 and ReportExecutionService
classes. These classes can be generated through a proxy class tool such as wsdl.exe, which is included with the
Microsoft .NET Framework SDK. For more information about the Report Server Web services and the .NET
Framework, see Building Applications Using the Web Service and the .NET Framework.
Endpoints and Methods
The following table lists the endpoints of the Report Server Web service, and the categories of methods provided
by the ReportingService2010 endpoint. For information on the methods available in the other endpoints, see
Technical Reference (SSRS).
TOPIC
DESCRIPTION
Report Server Web Service Endpoints
Describes the management and execution endpoints of the
Report Server Web service.
Report Server Namespace Management Methods
Describes methods that you can use to manage the report
server database. Specifically you can manage folders and
resources and set item properties.
Authorization Methods
Describes methods that you can use to manage tasks, roles,
and policies.
Data Sources and Connection Methods
Describes methods that you can use to set and manage data
source connection and credential information for reports.
Report Parameters Methods
Describes methods that you can use to set and retrieve
parameters for reports.
Model Methods - Report Server Web Service
Describes methods that you can use to manage models.
Rendering and Execution Methods
Describes methods that you can use to manage report
execution, rendering, and caching.
Report History Methods
Describes methods that you can use to create and manage
report history snapshots.
Scheduling Methods
Describes methods that you can use to create and manage
shared schedules and cache refresh plans that are used by
the report server.
Subscription and Delivery Methods
Describes methods that you can use to create and manage
subscriptions and report delivery.
Linked Reports Methods
Describes methods that you can use to create and manage
linked reports.
See Also
Accessing the SOAP API
Building Applications Using the Web Service and the .NET Framework
Report Server Web Service
Technical Reference (SSRS)
Scheduling Methods
3/24/2017 • 1 min to read • Edit Online
You can use these methods to create and manage shared schedules for report execution and delivery, and to cache
refresh plans utilized by the report server.
METHOD
ACTION
CreateCacheRefreshPlan
Creates a cache refresh plan for an item.
CreateSchedule
Creates a new shared schedule.
DeleteCacheRefreshPlan
Deletes a cache refresh plan.
DeleteSchedule
Deletes a shared schedule based on a specific schedule ID.
GetCacheRefreshPlanProperties
Returns the properties of the specified cache refresh plan.
GetScheduleProperties
Returns the values of properties of a shared schedule.
ListCacheRefreshPlans
Returns a list of the cache refresh plans associated with a
catalog item.
ListScheduledItems
Returns a list of items that are associated with a shared
schedule.
ListSchedules
Returns a list of all shared schedules at the report server or
the SharePoint site.
ListScheduleStates
Returns a list of supported schedule states.
PauseSchedule
Pauses the execution of a given schedule.
ResumeSchedule
Resumes a shared schedule that has been paused.
SetCacheRefreshPlanProperties
Sets the properties of a cache refresh plan.
SetScheduleProperties
Sets the value of properties of a shared schedule.
See Also
Building Applications Using the Web Service and the .NET Framework
Report Server Web Service
Report Server Web Service Methods
Technical Reference (SSRS)
Subscription and Delivery Methods
3/24/2017 • 1 min to read • Edit Online
You can use these methods to create and manage subscriptions and delivery of catalog items.
METHOD
ACTION
CreateDataDrivenSubscription
Creates a data-driven subscription for a specified item.
GetDataDrivenSubscriptionProperties
Returns the properties for a data-driven subscription.
CreateSubscription
Creates a subscription for the specified item in the report
server database or SharePoint library.
DeleteSubscription
Deletes a subscription from the report server database.
GetSubscriptionProperties
Returns the properties of a subscription.
ListMySubscriptions
Retrieves a list of subscriptions that have been created by the
current user of the report server or SharePoint site for the
given catalog item.
ListSubscriptions
Retrieves a list of subscriptions that have been created for a
given item.
PrepareQuery
Returns a data set containing the fields retrieved by the
delivery query for a data-driven subscription.
SetDataDrivenSubscriptionProperties
Sets the values of properties of a data-driven subscription.
SetSubscriptionProperties
Sets the values of properties of a subscription.
See Also
Building Applications Using the Web Service and the .NET Framework
Report Server Web Service
Report Server Web Service Methods
Technical Reference (SSRS)
Building Applications Using the Web Service and
the .NET Framework
3/24/2017 • 2 min to read • Edit Online
With the Microsoft .NET Framework, you can use familiar programming constructs, such as methods,
primitive types, and user-defined complex types to work with Web services. The .NET Framework contains an
infrastructure and tools you can use to create Web service clients that can call any World Wide Web
Consortium (W3C) standards-compliant Web service.
A Report Server Web service client is any component or application that communicates with a report server
using Simple Object Access Protocol (SOAP) messages.
To create a Report Server Web service client using the .NET Framework, follow these basic steps:
1. Create a proxy class for the Web service.
To do this, add a proxy class or Web reference to your development project, reference the proxy class
in your client code, and create an instance of that proxy. For more information, see Creating the Web
Service Proxy.
2. Authenticate the Web service client with the report server.
To do this, set the service object's Credentials property equal to the credentials of an authenticated user
on the report server. For more information, see Web Service Authentication.
3. Call the method of the proxy class corresponding to the Web service operation that you want to invoke.
To do this, call a Web service method and supply the necessary arguments. For more information
about the Web service methods, see Report Server Web Service Methods. For more information about
calling, see Calling Web Service Methods.
In This Section
TOPIC
DESCRIPTION
Creating the Web Service Proxy
Describes the ways to add a proxy class to your project
using Microsoft .NET Framework.
Web Service Authentication
Describes how calls to the Report Server Web service are
authenticated.
Calling Web Service Methods
Describes how to use the SOAP API to call Web service
methods in Microsoft Visual Studio.
Setting the Url Property of the Web Service
Explains how to programmatically direct your Web service
proxy to a new server URL after you have created your
Web reference.
Supplying Web Service Method Arguments
Describes how to invoke a Web service method and supply
method arguments.
TOPIC
DESCRIPTION
Omitting Values for Optional Web Service Objects
Describes how to omit values for optional Web service
objects.
Using Secure Web Service Methods
Describes the SecureConnectionLevel setting and the
way in which it affects the use of the Reporting Services
SOAP API.
Passing Device Information Settings to Rendering
Extensions
Describes the device information settings that are used to
render reports to different formats.
Reporting Services Delivery Extension Settings
Describes the settings that are used to deliver reports
using report server e-mail.
Using Reporting Services SOAP Headers
Explains the use of SOAP headers in Reporting Services.
Introducing Exception Handling in Reporting Services
Provides information about the way in which Reporting
Services handles errors.
See Also
Report Server Web Service
Technical Reference (SSRS)
Calling Web Service Methods
3/24/2017 • 1 min to read • Edit Online
When you use a Microsoft .NET Framework proxy class to call Web service operations, you do so by using the
methods of that class. These methods respond like any other method of a class in the .NET Framework class library.
All Web service methods have public access and require you to supply the appropriate number of arguments and
argument types. After you have created an instance of the proxy class in your project, you can call the methods to
perform reporting operations via the report server. The following C# code illustrates the use of the ListChildren
method of the ReportingService2010 proxy class. The code is used to make a recursive call to the Web service that
returns an array of CatalogItem objects that contains a list of all items in the report server database:
Dim rs As New ReportingService2010()
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim items As CatalogItem() = rs.ListChildren("/", True)
ReportingService2010 rs = new ReportingService2010();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
CatalogItem[] items = rs.ListChildren("/", true);
See Also
Building Applications Using the Web Service and the .NET Framework
Report Server Web Service
Technical Reference (SSRS)
Creating the Web Service Proxy
3/24/2017 • 4 min to read • Edit Online
A client and a Web service can communicate using SOAP messages, which encapsulate the input and output
parameters as XML. A proxy class maps parameters to XML elements and then sends the SOAP messages over a
network. In this way, the proxy class frees you from having to communicate with the Web service at the SOAP level
and allows you to invoke Web service methods in any development environment that supports SOAP and Web
service proxies.
There are two ways to add a proxy class to your development project using the Microsoft .NET Framework: with
the WSDL tool in the .NET Framework, and by adding a Web reference in Microsoft Visual Studio. The following
sections discuss this subject in further detail.
Adding the Proxy Using the WSDL Tool
The .NET Framework SDK includes the Web Services Description Language tool (Wsdl.exe), which enables you to
generate a Web service proxy for use in the .NET Framework development environment. The most common way to
create a client proxy in languages that support Web services (currently C# and Microsoft Visual Basic) is to use the
WSDL tool.
To add a proxy class to your project using Wsdl.exe
1. From a command prompt, use Wsdl.exe to create a proxy class, specifying (at a minimum) the URL to the
Report Server Web service.
For example, the following command prompt statement specifies a URL for the management endpoint of
the Report Server Web service:
wsdl /language:CS /n:"Microsoft.SqlServer.ReportingServices2010" http://<Server
Name>/reportserver/reportservice2010.asmx?wsdl
The WSDL tool accepts a number of command-prompt arguments for generating a proxy. The preceding
example specifies the language C#, a suggested namespace to use in the proxy (to prevent name collision if
using more than one Web service endpoint), and generates a C# file called ReportingService2010.cs. If the
example had specified Visual Basic, the example would have generated a proxy file with the name
ReportingService2010.vb. This file is created in the directory from which you run the command.
2. Compile the proxy class into an assembly file (with the extension .dll) and reference it in your project, or add
the class as a project item.
NOTE
When you add a proxy class to your project manually, you need to add a reference to System.Web.Services.dll. If you
add the proxy using a Web reference in Visual Studio .NET, the reference is automatically created for you. For more
information, see "Adding the Proxy Using a Web Reference in Visual Studio" later in this topic.
After you add the proxy class as an item to your project, the associated file appears in Solution Explorer.
3. To call the service programmatically, create an instance of the proxy class.
The following code example shows the syntax for creating an instance of the ReportingService2010 proxy
class in a project:
Dim service As New ReportingService2010()
ReportingService2010 service = new ReportingService2010();
For more information about the Wsdl.exe tool, including its full syntax, see "Web Services Description Language
Tool" in the .NET Framework SDK documentation. For a full explanation of Web service proxies, see "Creating an
XML Web Service Proxy" in the .NET Framework SDK documentation.
Adding the Proxy Using a Web Reference in Visual Studio
A Web reference enables a project to consume one or more Web services. Visual Studio enables users to add Web
service references to projects by following a few simple steps.
To add a Web reference to a project
1. In Solution Explorer, select the project that will consume the Web service.
2. On the Project menu, click Add Web Reference.
The Add Web Reference dialog box opens.
3. In the URL field, enter the complete path to the Report Server Web service.
A simplified URL for the report execution endpoint of the Report Server Web service might look like this:
http://<Server Name>/reportserver/reportexecution2005.asmx
The URL contains the domain in which the Report Server Web service is deployed, the name of the folder
containing the service, and the name of the discovery file for the service. For a complete description of the
different URL elements, see Accessing the SOAP API.
A description of the methods and properties provided by the Web service appears in the Browser pane on
the left.
NOTE
For more information about the items associated with the Report Server Web service, see Report Server Web Service
Methods.
4. Verify that your project can use the Report Server Web service, and that you have appropriate permission to
access the report server.
5. In the Web reference name field, enter a name that you will use in your code to access the Report Server
Web service programmatically.
6. Select the Add Reference button to create a reference in your application to the Web service.
The new reference appears in Solution Explorer under the Web References node for the active project,
named as specified in the Web reference name field.
7. In Solution Explorer, expand the Web References folder to note the namespace for the Web reference
classes that are available to the items in your project.
After adding a Web reference to your project, the associated files are displayed in a folder within the Web
References folder of Solution Explorer.
After you add the Web reference, use the following syntax to create an instance of the proxy class:
Dim rs As New myNamespace.myReferenceName.ReportExecutionService()
rs.Url = "http://<Server Name>/reportserver/reportexecution2005.asmx?wsdl"
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
myNamespace.myReferenceName.ReportExecutionService rs = new
myNamespace.myReferenceName.ReportExecutionService();
rs.Url = "http://<Server Name>/reportserver/reportexecution2005.asmx?wsdl"
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
You can also add a using (Import in Visual Basic) directive to the Report Server Web service reference. If you use
this directive, you do not need to fully qualify the types in the namespace. To do this, add the following code to
your file:
Import myNamespace.myReferenceName
using myNamespace.myReferenceName;
See Also
Report Server Web Service
Building Applications Using the Web Service and the .NET Framework
Technical Reference (SSRS)
Omitting Values for Optional Web Service Objects
3/24/2017 • 1 min to read • Edit Online
Properties of several of the Report Server Web service complex types have an accompanying property known as
the Specified property. The name of the property consists of the original property name with the word "Specified"
appended to it. The presence of this property indicates that a value for the original property may sometimes be
omitted. This is a direct result of the translation from the Web Service Description Language (WSDL) to a .NET
Framework proxy class. For example, the Web service property Enabled of the complex type DataSourceDefinition
has an accompanying property named EnabledSpecified. If you are building an application and do not want to set a
value for the Enabled property, you do not have to supply a value for Enabled; the default value of true is used.
However, you still need to set EnabledSpecified to false. If you supply a value for the Enabled property, you need to
set EnabledSpecified equal to true. This is the case for writable properties. For read-only properties, you do not
need to take any action.
IMPORTANT
Failure to specify a property using the above-mentioned technique can result in unpredictable Web service behavior.
The data types that usually require you to handle the additional Specified property are Boolean, DateTime, and
Enumeration.
For an example, see CreateDataSource method.
See Also
Building Applications Using the Web Service and the .NET Framework
Technical Reference (SSRS)
Passing Device Information Settings to Rendering
Extensions
3/24/2017 • 1 min to read • Edit Online
In Reporting Services, device information settings are used to pass rendering parameters to a rendering extension.
Settings in the Report Server Web service are passed as a DeviceInfo XML element and processed by the report
server. Because device information settings have default values, they are considered optional arguments in the
rendering process. However, you can use device information settings to customize rendering and to override the
default values that are supplied by the server.
You can specify device information settings in a variety of ways. Programmatically, you can use the Render
method. If you are accessing a report through its URL, you can specify device information as URL parameters. You
can also edit the device information settings in the Reporting Services configuration files to specify rendering
parameters globally. For more information about specifying rendering parameters globally, see Customize
Rendering Extension Parameters in RSReportServer.Config.
Passing Device Information Using the Render Method
To pass device information settings to a rendering extension, use the
M:Microsoft.WSSUX.ReportingServicesWebService.RSExecutionService2005.ReportExecutionService.Ren
der(System.String,System.String,[email protected],[email protected],[email protected],Microsoft.WSSUX.Rep
ortingServicesWebService.RSExecutionService2005.Warning[]@,System.String[]@) method. For example,
the following XML string can be passed to the Render method to create an HTML fragment when rendering to
HTML.
<DeviceInfo>
<HTMLFragment>True</HTMLFragment>
</DeviceInfo>
When a report is rendered as an HTML fragment, the content of the report is contained within a TABLE element
without the use of an HTML or BODY element. You can use the HTML fragment to incorporate the report into an
existing HTML document. For more information about device information settings for HTML output, see HTML
Device Information Settings.
Passing Device Information Using URL Access
You can also pass device information settings through URL access. Device information settings are passed as URL
parameters. The following URL access string can be passed to the report server to generate a rendered report
without the HTML viewer toolbar.
http://<Server Name>/reportserver?/SampleReports/Sales Order
Detail&rs:Command=Render&rs:Format=HTML4.0&rc:Toolbar=False
For more information, see Specify Device Information Settings in a URL.
See Also
Device Information Settings for Rendering Extensions (Reporting Services)
Customize Rendering Extension Parameters in RSReportServer.Config
Building Applications Using the Web Service and the .NET Framework
Reporting Services Delivery Extension Settings
3/24/2017 • 2 min to read • Edit Online
Reporting Services includes an e-mail delivery extension and a file share delivery extension. E-mail delivery
provides a way to send a report to individual users or groups through e-mail. File share delivery enables you to
automatically send rendered reports to a share on your network. You can use either one of the supported delivery
extensions with standard subscriptions or data-driven subscriptions. You pass delivery settings that are specific to
the type of delivery extension whenever you call the
CreateSubscription,CreateDataDrivenSubscription,SetSubscriptionProperties, and
SetDataDrivenSubscriptionProperties methods. To retrieve a list of delivery settings programmatically, use the
GetExtensionSettings method.
NOTE
Delivery extension settings are case-sensitive.
E-Mail Delivery Settings
The following table lists the e-mail delivery settings for subscriptions that use report server e-mail.
SETTING
VALUE
TO
The e-mail address that appears on the To line of the e-mail
message. Multiple e-mail addresses are separated by
semicolons. Required.
CC
The e-mail address that appears on the Cc line of the e-mail
message. Multiple e-mail addresses are separated by
semicolons. Optional.
BCC
The e-mail address that appears on the Bcc line of the e-mail
message. Multiple e-mail addresses are separated by
semicolons. Optional.
ReplyTo
The e-mail address that appears in the Reply-To header of
the e-mail message. The value must be a single e-mail
address. Optional.
IncludeReport
A value that indicates whether to include the report in the email delivery. A value of true indicates that the report is
delivered in the body of the e-mail message.
RenderFormat
The name of the rendering extension to use to generate the
rendered report. The name must correspond to one of the
visible rendering extensions installed on the report server. This
value is required if the IncludeReport setting is set to a value
of true.
Priority
The priority with which the e-mail message is sent. Valid
values are LOW, NORMAL, and HIGH. The default value is
NORMAL.
SETTING
VALUE
Subject
The text in the subject line of the e-mail message.
Comment
The text included in the body of the e-mail message.
IncludeLink
A value that indicates whether to include a link to the report
in the body of the e-mail.
File Share Delivery Settings
The following table lists the file share delivery settings for subscriptions.
SETTING
VALUE
FILENAME
The name of the file that is saved to disk.
FILEEXTN
Indicates whether to include a file extension for the rendered
report. The value is either true or false.
PATH
The folder path or UNC file share path to which to save the
report.
RENDER_FORMAT
The format of the report that is saved to disk.
USERNAME
The username required to access the network resource or disk.
PASSWORD
The password required to access the network resource or disk.
WRITEMODE
The write mode to use when accessing the disk. Valid values
are None, Overwrite, and AutoIncrement.
See Also
Technical Reference (SSRS)
Building Applications Using the Web Service and the .NET Framework
Reporting Services Properties - Report Server Item
Properties
3/24/2017 • 4 min to read • Edit Online
Item properties are properties that are specific to items in the report server database. Such items include reports,
linked reports, folders, resources, models, and data sources.
The following item property names are reserved. You cannot create user-defined properties of the same name. You
can read or modify many of these properties using the Report Server Web service methods.
Item Properties
The following properties apply to all items in the report server database.
PROPERTY
DESCRIPTION
CreatedBy
The name of the user who originally added the item to the
report server database.
CreationDate
The date and time the item was added to the report server
database.
Description
The description of the item.
Hidden
A value that indicates whether the item is visible and available
to users.
ID
The ID of an item in the report server database.
ModifiedBy
The name of the user who last modified the item in the report
server database.
ModifiedDate
The date and time the user last modified the item.
Name
The name of an item in the report server database.
Path
The full path name of the item. The path of any item in the
report server database has a maximum character length of
260.
Size
The size, in bytes, of an item in the report server database.
Type
The type of an item in the report server database.
VirtualPath
The virtual path to an item in the report server database. The
value of the VirtualPath property is the path under which a
user expects to see the item. For example, a report called
report1, which is located in the user's personal My Reports
folder, has a virtual path of /My Reports. The actual path of
the item is /Users/username/My Reports.
Folder Properties
In addition to the item properties listed previously, the following property applies to folders in the report server
database.
PROPERTY
DESCRIPTION
Reserved
A value returned by the GetProperties method for folders that
are reserved by the report server. Reserved folders include
Users, My Reports, and /. Reserved folders cannot be modified
or removed.
Report Properties
In addition to the item properties listed previously, the following properties apply to reports in the report server
database.
PROPERTY
DESCRIPTION
Language
The language used in a report. The value is a language code
defined in the Internet Engineering Task Force (IETF) RFC1766
specification. The first part is a two-character designation of
the basic language. The second part is separated by a hyphen
and designates the variation or dialect of the language. If a
value is not specified in the Style element associated with the
Body element in the report definition, the default value is the
language of the report server.
ReportProcessingTimeout
The time-out, in seconds, for an individual report. If this value
is set, the report server attempts to stop the processing of a
report when the specified time has elapsed. Valid values are -1
through 2,147,483,647. If the value is -1, the report does not
time out during processing. If the value is null, the value of
the system property ReportProcessingTimeout is used for
the report processing time-out. The default value is null. For
more information, see Report Server System Properties.
ExecutionDate
The date and time at which a report snapshot was last created
for a report.
CanRunUnattended
A value that indicates whether a report can be run unattended
on a schedule. If this property is set to true, default values for
report parameters are defined and data source credentials are
stored with the report, or credential retrieval option is set to
None. If this property is set to false, the prerequisites for
running a report unattended are not met. Please see
Configure the Unattended Execution Account (SSRS
Configuration Manager) for more information.
HasParameterDefaultValues
A value that indicates whether the report has valid default
values set for all report parameters. The value is also true if a
report does not have report parameters. If this property set to
false, one or more report parameters do not have a valid
default value.
PROPERTY
DESCRIPTION
HasDataSourceCredentials
A value that indicates that the credential retrieval option set
for all data sources associated with the report is either None
or Store. If this property is set to false, a credential retrieval
option set for one of the data sources associated with the
report is either Integrated or Prompt.
IsSnapshotExecution
A value that indicates whether the report is a snapshot.
HasScheduleReadyDataSources
A value that indicates whether the data sources of a report are
configured to support scheduled execution. If this property is
set to false, users cannot subscribe to the report.
Resource Properties
In addition to the item properties listed previously, the following property applies to resources in the report server
database.
PROPERTY
DESCRIPTION
MimeType
The MIME type of a resource in the report server database.
See Also
Building Applications Using the Web Service and the .NET Framework
Report Server Web Service
Technical Reference (SSRS)
Reporting Services Properties - Report Server
System Properties
3/24/2017 • 2 min to read • Edit Online
The following system property names are reserved. You cannot create user-defined properties of the same name.
You can read or modify many of these properties using the Web service methods.
Properties
PROPERTY
DESCRIPTION
SiteName
The name of the report server site displayed on the user
interface. The default value is Microsoft Report Server. This
property can be an empty string. The maximum length is
8,000 characters.
SystemSnapshotLimit
The maximum number of snapshots that are stored for a
report. Valid values are -1 through 2,147,483,647. If the value
is -1, there is no snapshot limit.
SystemReportTimeout
The default report processing timeout value, in seconds, for all
reports managed in the report server namespace. This value
can be overridden at the report level. If this property is set,
the report server attempts to stop the processing of a report
when the specified time has expired. Valid values are -1
through 2,147,483,647. If the value is -1, reports in the
namespace do not time out during processing. The default
value is 1800.
UseSessionCookies
Indicates whether the report server should use session cookies
when communicating with client browsers. The default value is
true.
SessionTimeout
The length of time, in seconds, that a session remains active.
The default value is 600.
EnableMyReports
Indicates whether the My Reports feature is enabled. A value
of true indicates that the feature is enabled.
MyReportsRole
The name of the role used when creating security policies on
user's My Reports folders. The default value is My Reports
Role.
EnableExecutionLogging
Indicates whether report execution logging is enabled. The
default value is true.
ExecutionLogDaysKept
The number of days to keep report execution information in
the execution log. Valid values for this property include 0
through 2,147,483,647. If the value is 0 entries are not
deleted from the Execution Log table. The default value is 60.
PROPERTY
DESCRIPTION
SnapshotCompression
Defines how snapshots are compressed. The default value is
SQL. The valid values are as follows:
SQL = Snapshots are compressed when stored in the report
server database. This is the current behavior.
None = Snapshots are not compressed.
All = Snapshots are compressed for all storage options, which
include the report server database or the file system.
EnableClientPrinting
Determines whether the RSClientPrint ActiveX control is
available for download from the report server. The valid values
are true and false. The default value is true. For more
information about additional settings that are required for this
control, see Enable and Disable Client-Side Printing for
Reporting Services.
EnableIntegratedSecurity
Determines whether integrated security is supported for
report data source connections. The default is True. The valid
values are as follows:
True = Integrated security is enabled.
False = Integrated security is not enabled. Report data
sources that are configured to use integrated security will not
run.
EnableRemoteErrors
Includes external error information (for example, error
information about report data sources) with the error
messages that are returned for users who request reports
from remote computers. Valid values are true and false. The
default value is false. For more information, see Enable
Remote Errors (Reporting Services).
See Also
GetSystemProperties
SetSystemProperties
Building Applications Using the Web Service and the .NET Framework
Report Server Web Service
Technical Reference (SSRS)
Reporting Services Properties
3/24/2017 • 1 min to read • Edit Online
The report server defines a set of system properties that are global to the report server and a set of item properties
that are associated with an individual item stored in the report server database. Properties defined by the report
server cannot be deleted, and in some cases they are read-only. An application can extend system properties and
item properties by adding additional user-defined properties to the system and item properties.
The following Web service methods retrieve and set SQL Server Reporting Services properties.
METHOD
ACTION
GetProperties
Returns the values of one or more properties on an item in
the report server database.
GetSystemProperties
Returns one or more system properties.
SetProperties
Sets one or more properties of an item in the report server
database.
SetSystemProperties
Sets one or more system properties.
In This Section
TOPIC
DESCRIPTION
Report Server Item Properties
Describes the item-specific properties in Reporting Services.
Report Server System Properties
Describes the system-specific properties in Reporting Services.
See Also
Building Applications Using the Web Service and the .NET Framework
Report Server Web Service
Technical Reference (SSRS)
Setting the Url Property of the Web Service
3/24/2017 • 1 min to read • Edit Online
At any time in your Microsoft .NET Framework applications, you can modify the base URL of the Report Server
Web service to which your application is currently directed. To do this, simply set the Url property of the service
object. For example:
Dim rs As New ReportingService2010()
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
rs.Url = "http://<Server Name>/reportserver/ReportService2010.asmx"
ReportingService2010 service = new ReportingService2010();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
rs.Url = "http://<Server Name>/reportserver/ReportService2010.asmx";
The following example retrieves a report definition from one report server and uses that definition to create an
identical report on a different report server:
Imports System
Imports System.Web.Services.Protocols
Class Sample
Public Shared Sub Main()
Dim rs As New ReportingService2010()
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
' Set the base Web service URL of the source server
rs.Url = "http://<Server Name>/reportserver/ReportService2010.asmx"
Dim reportName As String = "/SampleReports/Company Sales"
Dim reportDefinition As Byte() = Nothing
Try
' Get the report definition of a report on a source server
reportDefinition = rs.GetItemDefinition(reportName)
' Set the base Web service URL of the destination server
rs.Url = "http://<Server Name>/reportserver/ReportService2010.asmx"
' Create a copy of the report on the destination server
Dim warnings As Warning() = {}
rs.CreateCatalogItem("Report", "Company Sales Copy", "/", False, reportDefinition, Nothing, warnings)
Catch e As SoapException
Console.WriteLine(e.Detail.InnerXml.ToString())
End Try
End Sub 'Main
End Class 'Sample
using System;
using System.Web.Services.Protocols;
class Sample
{
public static void Main()
{
ReportingService2010 rs = new ReportingService2010();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
// Set the base Web service URL of the source server
rs.Url = "http://<Server Name>/reportserver/reportservice2010.asmx";
string reportName = "/SampleReports/Company Sales";
byte[] reportDefinition = null;
try
{
reportDefinition = rs.GetItemDefinition(reportName);
// Set the base Web service URL of the destination server
rs.Url = "http://<Server Name>/reportserver/ReportService2010.asmx";
// Create a copy of the report on the destination server
Warning[] warnings = {};
rs.CreateCatalogItem("Report", "Company Sales Copy", "/", false, reportDefinition, null, out
warnings);
}
catch (SoapException e)
{
Console.WriteLine(e.Detail.InnerXml.ToString());
}
}
}
For more information about creating the initial Web service proxy, see Creating the Web Service Proxy.
See Also
CreateCatalogItem
GetItemDefinition
Building Applications Using the Web Service and the .NET Framework
Report Server Web Service
Supplying Web Service Method Arguments
3/24/2017 • 1 min to read • Edit Online
A Report Server Web service method sends a request to the service at a given URL using SOAP over HTTP. The
service receives the request, processes it, and then returns a response. These requests and responses are in the
form of XML documents.
Optional Parameters
In some cases, a Web service method can have optional input parameters. Even if an input parameter for a Web
service method is optional, you must still include it and set the parameter value to null (Nothing in Visual Basic).
Setting a parameter value to null sets the element value for that parameter in the SOAP request to null.
The following example uses the CreateFolder method to create a new folder named Product Sales in the Sales
folder. By supplying a null value for the folder properties, no user-specific properties are supplied for the folder:
// C#
rs.CreateFolder("Product Sales", "/Sales", null);
Complex Data Types
The core class of the Report Server Web service is ReportingService2010, which you use to invoke the SOAP
operations or Web methods of the proxy class. To support this class and its methods, Reporting Services includes
user-defined, complex data types that are specific to the input and output parameters of the Web service methods.
These complex data types are part of the generated proxy class, which you can use when developing in the
Microsoft .NET Framework environment.
When you generate a proxy class, the complex data types that are defined in the WSDL file are represented by the
classes of the proxy, which include properties that correspond to the various SOAP elements of the complex data
types. Sequences of these data types become arrays of objects that you can enumerate through in your code. This
eliminates the need to work directly with the XML structures sent in SOAP messages. The .NET Framework handles
that translation for you.
See Also
Building Applications Using the Web Service and the .NET Framework
Report Server Web Service
Technical Reference (SSRS)
Using Secure Web Service Methods
3/24/2017 • 1 min to read • Edit Online
Certain Report Server Web service methods may require a secure connection when you invoke them. The methods
that require a secure connection are determined by the SecureConnectionLevel setting in the
RSReportServer.config file. The value of the setting is an integer value with a valid range of 0 and higher. The
following table describes these values.
LEVEL
DESCRIPTION
0
Not secure. Calls made to the Reporting Services SOAP API do
not require a secure connection.
Greater than 0
Secure. All calls made to the Reporting Services SOAP API
require a secure connection.
You can use the ListSecureMethods method of the Web service to return a list of Web service methods that require
a secure connection according to the current configuration of the report server. In an SSL scenario, you should
evaluate the list of methods that are returned by ListSecureMethods and change the scheme name of the Web
service URI to "https" or "http" depending on the method being called.
See Also
Building Applications Using the Web Service and the .NET Framework
Report Server Web Service
Using the RSClientPrint Control in Custom
Applications
4/14/2017 • 7 min to read • Edit Online
The Microsoft ActiveX control, RSPrintClient, provides client-side printing for reports viewed in HTML Viewer. It
provides a Print dialog box so that a user can initiate a print job, preview a report, specify pages to print, and
change the margins. During a client-side print operation, the report server renders the report in the Image (EMF)
rendering extension and uses the print capabilities of the operating system to create the print job and send it to a
printer.
Client-side printing provides a way to control and improve the quality of a printout for an HTML report by sidestepping browser print settings on the user's computer, and instead using the page dimensions, margins, header,
and footer text of the report to create the print output. The print control reads property values of the report to set
page size and margins.
Developers who want to enable the client-side printing feature in third-party toolbars or viewers can access the
ActiveX control through the RSClientPrint COM object. The control can be distributed freely. The following list
provides recommendations for using the control:
Use the control to improve printing for Web-based reports. You can specify the object in any of the
Microsoft .NET Framework-compatible programming languages or in script. The control is not intended for
Microsoft Windows Forms applications.
Copy the .cab file from the Reporting Services program files and add it to your custom application code
base.
Use an <OBJECT> tag to specify the control.
Specify a relative or fully qualified URL to the .cab file in the OBJECT CODEBASE attribute.
Specify your own application version information for the .cab file to track which version is used in your
application.
Review the Books Online topics about Image (EMF) rendering to understand how pages are rendered for
print preview and output.
RSPrintClient Overview
The control displays a custom print dialog box that supports features common to other print dialog boxes,
including print preview, page selections for specifying specific pages and ranges, page margins, and orientation.
The control is packaged as a CAB file. The text in the Print dialog box is localized into all of the languages supported
in SQL Server. RSPrintClient ActiveX control uses the Image rendering extension (EMF) to print the report. The
following EMF device information is used: StartPage, EndPage, MarginBottom, MarginLeft, MarginTop, MarginRight,
PageHeight, and PageWidth. Other device information settings for image rendering are not supported.
Language Support
The print control provides user interface text in different languages, and accepts input values calibrated to different
measurement systems. The language and measurement system used are determined by the Culture and
UICulture properties. Both properties accept LCID values. If you specify an LCID for a language that is a variation
on a supported language, you will get the language that provides the closest match. If you specify an LCID that is
not supported and for which no other LCID is a close match, you will get English (United States).
Using RSClientPrint in Code
The RSClientPrint object is used to gain access programmatically to the ActiveX control and its methods and
properties. The control provides a modal dialog for print preview.
Specifying Default Values
You can initialize the Print dialog box with margin and page values of the report. By default, the Print dialog box is
initialized with values from the report definition. You can use the defaults, or specify different values by setting
properties on the object.
All dimensions are set in millimeters. Measurement conversion occurs at run time if the Culture and UICulture are
set to locales that do not use metric measurements.
To understand which values are used for page dimensions and margins, you can use the GetProperties method to
retrieve the default values:
PageHeight and PageWidth specify the default page height and width. When the print control is launched,
these property values are used to select the closest paper size available for the currently selected printer. If
PageWidth is great than PageHeight, the orientation is set to Landscape. Otherwise, it is set to Portrait.
LeftMargin, RightMargin, TopMargin, and BottomMargin are all set to 12.2 millimeters by default.
These properties are stored in the Item properties collection on the report server. The values are overwritten
each time a report definition is updated.
RSClientPrint Properties
PROPERTY
TYPE
RW
DEFAULT
DESCRIPTION
MarginLeft
Double
RW
report setting
Gets or sets the left
margin. The default
value if not set by the
developer or specified
in the report is 12.2
millimeters.
MarginRight
Double
RW
report setting
Gets or sets the right
margin. The default
value if not set by the
developer or specified
in the report is 12.2
millimeters.
MarginTop
Double
RW
report setting
Gets or sets the top
margin. The default
value if not set by the
developer or specified
in the report is 12.2
millimeters.
MarginBottom
Double
RW
report setting
Gets or sets the
bottom margin. The
default value if not set
by the developer or
specified in the report
is 12.2 millimeters.
PROPERTY
TYPE
RW
DEFAULT
DESCRIPTION
PageWidth
Double
RW
report setting
Gets or sets the page
width. The default
value if not set by the
developer or the
report definition is
215.9 millimeters.
PageHeight
Double
RW
report setting
Gets or sets the page
height. The default
value if not set by the
developer or the
report definition is
279.4 millimeters.
Culture
Int32
RW
Browser locale
Specifies the locale
identifier (LCID). This
value determines the
unit of measurement
for user input. For
example, if a user
types 3, the value will
be measured in
millimeters if the
language is French or
inches if the language
is English (United
States). Valid values
include: 1028, 1031,
1033, 1036, 1040,
1041, 1042, 2052,
3082.
UICulture
String
RW
Client culture
Specifies string
localization of the
dialog box. Text in the
Print dialog is
localized into these
languages: ChineseSimplified, Chinese
Traditional, English,
French, German,
Italian, Japanese,
Korean, and Spanish.
Valid values include:
1028, 1031, 1033,
1036, 1040, 1041,
1042, 2052, 3082.
Authenticate
Boolean
RW
False
Specifies whether the
control issues a GET
command against the
report server to
initiate a connection
for out-of-session
printing.
When to Set the Authenticate Property
When you print from within a browser session, you do not need to set the Authenticate property. Within the
context of an active session, all requests from the print control to the report server are handled through the
browser. The browser sets the session variables necessary for communication to the report server.
If you print out-of-session (for example, sending a report directly to a printer without first opening it), the print
control must issue an HTTP GET request to set up the session with the report server. To issue the GET request, you
set Authenticate to True.
You only need to issue the GET request if you are using Windows integrated security or Basic authentication. If you
are using forms authentication, the Authenticate property is ignored. Your application code must set the session
and authenticate the user using the custom security extension that you provide. If you are using forms
authentication, be sure to set the expiration value on the authentication cookie to a value that preserves sessions
for a reasonable interval. If the value is too low, users will be prompted to provide logon credentials each time the
cookie expires.
CLSIDs
When you are running the report on-premises, you use the following CLSID values.
41861299-EAB2-4DCC-986C-802AE12AC499
5554DCB0-700B-498D-9B58-4E40E5814405
60677965-AB8B-464f-9B04-4BA871A2F17F
When you are running the report in Windows Azure SQL Reporting, you use the following CLSID values.
3DD32426-554D-48C0-A200-65D3BF880E38
05662494-ACF9-446A-BE4C-7D3F7EA7F62F
RSPrintClient Support for the Print Method
The RSClientPrint object supports the Print method used to launch the Print dialog box. The Print method has the
following arguments.
ARGUMENT
I/O
TYPE
DESCRIPTION
ServerPath
In
String
Specifies the report server
virtual directory (for example,
https://adventureworks/reportserver
).
ReportPathParameters
In
String
Specifies the full name to the
report in the report server
folder namespace, including
parameters. Reports are
retrieved through URL
access. For example:
"/AdventureWorks Sample
Reports/Employee Sales
Summary&EmpID=1234"
ReportName
In
String
The short name of the report
(in the example above, the
short name is Employee
Sales Summary). It appears
in the Print dialog box and in
the print queue.
Example
The following HTML example shows how to specify the .cab file, Print method, and properties in JavaScript:
<BODY onload="Print()">
<OBJECT ID="RSClientPrint" CLASSID="CLSID: 5554DCB0-700B-498D-9B58-4E40E5814405D3" CODEBASE="<URL to the .CAB
file>#Version=<your application version information>" VIEWASTEXT></OBJECT>
<script language="javascript">
function Print()
{
RSClientPrint.MarginLeft = 12.7;
RSClientPrint.MarginTop = 12.7;
RSClientPrint.MarginRight = 12.7;
RSClientPrint.MarginBottom = 12.7;
RSClientPrint.Culture = 1033;
RSClientPrint.UICulture = 9;
RSClientPrint.Print('http://localhost/rtm', '%2fEmployee_Sales_Summary&ReportMonth=6&ReportYear=2004&EmpID=20',
'Employee_Sales_Summary')
}
</script>
</BODY>
See Also
Print Reports from a Browser with the Print Control (Report Builder and SSRS)
Print Reports (Report Builder and SSRS)
Image Device Information Settings
Web Service Authentication
3/24/2017 • 1 min to read • Edit Online
You can use either Windows Authentication or Basic authentication to authenticate the calls made to the Report
Server Web service. Any client that makes SOAP requests to the report server must implement the client portion of
one of the supported authentication protocols. If you are using the Microsoft .NET Framework, you can use the
managed code HTTP classes to implement authentication. Using these APIs makes it easy to send authentication
information along with the SOAP requests.
If you do not have appropriate credentials before you make a call to the Report Server Web service, the call fails. At
run time, you can pass credentials to the Web service by setting the Credentials property of the client-side object
that represents the Web service before you call its methods.
The following sections contain example code that sends credentials using the .NET Framework.
Windows Authentication
The following code passes Windows credentials to the Web service.
Dim rs As New ReportingService()
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
ReportingService rs = new ReportingService();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
Basic Authentication
The following code passes Basic credentials to the Web service.
Dim rs As New ReportingService()
rs.Credentials = New System.Net.NetworkCredential("username", "password", "domain")
ReportingService service = new ReportingService();
service.Credentials = new System.Net.NetworkCredential("username", "password", "domain");
The credentials must be set before you call any of the methods of the Report Server Web service. If you do not set
the credentials, you receive the error code an HTTP 401 Error: Access Denied. You must authenticate the service
before you use it, but after you have set the credentials, you do not need to set them again as long as you continue
to use the same service variable (such as rs).
Custom Authentication
Reporting Services includes a programming API that provides developers with the opportunity to design and
develop custom authentication extensions, known as security extensions. For more information, see Implementing
a Security Extension.
See Also
Building Applications Using the Web Service and the .NET Framework
Report Server Web Service
Accessing the SOAP API
3/24/2017 • 1 min to read • Edit Online
The Report Server Web service uses Simple Object Access Protocol (SOAP) over HTTP and acts as a
communications interface between client programs and the report server. The Web service provides two
endpoints - one for report execution and one for report management - and consists of methods and a set of
complex type objects that you can use to access the complete functionality of Reporting Services. To call the
service, you must reference the Reporting Services Web Services Description Language (WSDL).
Referencing the Reporting Services WSDL
To call a Web service successfully, you must know how to access the service, what operations the service supports,
what parameters the service expects, and what the service returns. WSDL provides this information in an XML
document that can be read or processed by a computer.
The Report Server Web services are exposed in three different endpoints. The name of the WSDL file is different
for each endpoint. The ReportService2010 endpoint contains methods for managing objects in a Report Server in
either native or SharePoint integrated mode. The WSDL for this endpoint is accessed through
ReportService2010.asmx?wsdl.
NOTE
The ReportService2005 and ReportService2006 endpoints are deprecated in SQL Server 2008 R2. The ReportService2010
endpoint includes the functionalities of both endpoints and contains additional management features.
The ReportExecution2005 endpoint allows developers to programmatically process and render reports in a
Report Server. The WSDL for this endpoint is accessed through ReportExecution2005.asmx?wsdl .
WSDL can be consumed by development kits that support SOAP and Web services, such as the Microsoft
.NET Framework SDK.
The following example shows the format of the URL to the Reporting Services management WSDL file:
http://server/reportserver/ReportService2010.asmx?wsdl
The following table describes each element in the URL.
URL ELEMENT
DESCRIPTION
server
The name of the server on which the report server is
deployed.
reportserver
The name of the folder that contains the XML Web service.
This is configured during setup.
<endpoint name>.asmx
The name of the web service endpoint.
For more information about the WSDL format, see the World Wide Web Consortium (W3C) WSDL specification at
http://www.w3.org/TR/wsdl.
See Also
Building Applications Using the Web Service and the .NET Framework
Report Server Web Service
Report Server Web Service
3/24/2017 • 2 min to read • Edit Online
SQL Server Reporting Services provides access to the full functionality of the report server through the
Report Server Web service. The Report Server Web service is an XML Web service with a SOAP API. It uses
SOAP over HTTP and acts as a communications interface between client programs and the report server. The
Web service provides two endpoints - one for report execution and one for report management - with
methods that expose the functionality of the report server and enable you to create custom tools for any part
of the report life cycle.
There are three primary ways to develop Reporting Services applications based on the Web service. You can:
Develop applications using Microsoft Visual Studio and the Microsoft .NET Framework SDK. For more
information about using the .NET Framework to build Web service applications, see Building
Applications Using the Web Service and the .NET Framework.
Develop applications using the rs utility (RS.exe), the Reporting Services script environment. With
Reporting Services and Visual Basic scripts, you can run any of the Report Server Web service
operations. For more information about scripting in Reporting Services, see Script with the rs.exe
Utility and the Web Service.
Develop applications using any SOAP-enabled set of development tools. For more information, see
The Role of SOAP in Reporting Services.
Programming Diagram
Reporting Services available Web service development options
In This Section
Report Server Web Service Methods
Describes the features and methods of each Report Server Web service.
The Role of SOAP in Reporting Services
Provides an overview of SOAP and how it is used in the Report Server Web services.
Accessing the SOAP API
Describes the Web Service Description Language (WSDL) and provides URLs for accessing a Reporting
Services WSDL file.
Building Applications Using the Web Service and the .NET Framework
Contains information about developing applications and Web services that call the Reporting Services SOAP
API.
Script with the rs.exe Utility and the Web Service
Provides an overview of the Reporting Services scripting environment.
Technical Reference (SSRS)
Contains reference material specific to Report Server Web services methods and corresponding complex
types.
User Requirements for Web Service Development
To develop applications using the Report Server Web service, you need:
Microsoft Internet Explorer 5.5 or later installed on a computer with an Internet connection to and
access to the report server.
Microsoft Visual Studio or the Microsoft .NET Framework SDK installed on a computer if you want to
develop and deploy Reporting Services applications using the Microsoft .NET Framework.
An in-depth understanding of Microsoft SQL Server Reporting Services features and capabilities.
A firm understanding of SOAP and XML Web Services.
Development experience in a .NET Framework-compatible language such as Microsoft Visual C# or
Microsoft Visual Basic, if you plan to use the .NET Framework as your development platform.
See Also
Report Server Web Service
The Role of SOAP in Reporting Services
3/24/2017 • 1 min to read • Edit Online
The Report Server Web service uses Simple Object Access Protocol (SOAP) messaging to send text-based
commands over a network. These commands take the form of XML text that is sent over the World Wide Web
using HTTP. By using SOAP as its communication protocol, the Report Server Web service allows applications and
components to exchange data with the report server using an open and widely accepted infrastructure. The SOAP
standard is defined at www.w3.org/TR/SOAP.
Any client application can act as a SOAP client as long as it is SOAP-aware and can send SOAP requests. Report
Manager is one such SOAP client. It provides an interface to the report server database in which all reports and
report-related content is stored. End users can use the application to browse through and manage reports and
folders in the report server namespace. Report Manager is built on the Report Server Web service infrastructure.
A report server acts as a SOAP server, a SOAP-aware service that can accept requests from SOAP clients and create
appropriate responses. The server handles the requests and sends encoded responses back to the client.
SOAP messages in Reporting Services take many different forms, depending on the type of request made by the
client. The following example represents a simple SOAP client request to remove an item from the report server
database.
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<DeleteItem xmlns="http://www.microsoft.com/sql/ReportingServer">
<item>/Samples/Report1</item>
</DeleteItem>
</soap:Body>
</soap:Envelope>
The SOAP itself requires that messages be put into an Envelope element, with the bulk of the message inside a
Body element. In this example, the body contains a call to the DeleteItem method, which takes a string parameter
representing the path of the item to delete. You can create a Microsoft .NET Framework client proxy class that
encapsulates all SOAP operations into methods. The following Microsoft Visual C# method represents the SOAP
example given earlier.
public void DeleteItem(string item);
The response from the server might look like the following:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<DeleteItemResponse xmlns="http://www.microsoft.com/sql/ReportingServer" />
</soap:Body>
</soap:Envelope>
The DeleteItem method has no return value, so an empty response is returned.
See Also
Accessing the SOAP API
Report Manager (SSRS Native Mode)
Reporting Services Report Server
Report Server Web Service