ReportingService2010.GetItemParameters Method (String, String, Boolean, ParameterValue[], DataSourceCredentials )
Applies To: SQL Server 2016 Preview
Returns parameter properties for a specified item.This method can also be used to validate parameter values against parameters for a specified item.
Namespace: ReportService2010
Assembly: ReportService2010 (in ReportService2010.dll)
Syntax
[SoapHeaderAttribute("TrustedUserHeaderValue")]
[SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)]
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/GetItemParameters",
RequestNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
ResponseNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public ItemParameter[] GetItemParameters(
string ItemPath,
string HistoryID,
bool ForRendering,
ParameterValue[] Values,
DataSourceCredentials[] Credentials
)
public:
[SoapHeaderAttribute("TrustedUserHeaderValue")]
[SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection::Out)]
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/GetItemParameters",
RequestNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
ResponseNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
Use = SoapBindingUse::Literal, ParameterStyle = SoapParameterStyle::Wrapped)]
array<ItemParameter^>^ GetItemParameters(
String^ ItemPath,
String^ HistoryID,
bool ForRendering,
array<ParameterValue^>^ Values,
array<DataSourceCredentials^>^ Credentials
)
[<SoapHeaderAttribute("TrustedUserHeaderValue")>]
[<SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)>]
[<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/GetItemParameters",
RequestNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
ResponseNamespace = "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)>]
member GetItemParameters :
ItemPath:string *
HistoryID:string *
ForRendering:bool *
Values:ParameterValue[] *
Credentials:DataSourceCredentials[] -> ItemParameter[]
<SoapHeaderAttribute("TrustedUserHeaderValue")>
<SoapHeaderAttribute("ServerInfoHeaderValue", Direction := SoapHeaderDirection.Out)>
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer/GetItemParameters",
RequestNamespace := "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
ResponseNamespace := "https://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer",
Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)>
Public Function GetItemParameters (
ItemPath As String,
HistoryID As String,
ForRendering As Boolean,
Values As ParameterValue(),
Credentials As DataSourceCredentials()
) As ItemParameter()
Parameters
ItemPath
Type: System.StringThe fully qualified URL of the item including the file name and, in SharePoint mode, the extension.
HistoryID
Type: System.StringThe ID of the item history snapshot. Set the ForRendering parameter to a value of true in order to retrieve parameter properties for an item history snapshot. Set the value to null (Nothing in Visual Basic) if you are retrieving parameters for an item that is not an item history snapshot.
ForRendering
Type: System.BooleanA Boolean expression that indicates how the parameter values are to be used. If set to a value of true, parameter properties that are returned are based on the parameter data that was used during the execution of the item.
Values
Type: ReportService2010.ParameterValue[]The parameter values (ParameterValue objects) that can be validated against the parameters of an item that is managed by the report server.
Credentials
Type: ReportService2010.DataSourceCredentials[]The data source credentials (DataSourceCredentials objects) that can be used to validate query parameters.
Return Value
Type: ReportService2010.ItemParameter[]
An array of ItemParameter objects that lists the parameters for the item.
Remarks
The table below shows header and permissions information on this operation.
SOAP Header Usage |
(Out) ServerInfoHeaderValue |
Native Mode Required Permissions |
|
SharePoint Mode Required Permissions |
If the execution setting for the item is Snapshot, the parameter metadata that is returned is the data that was used when the item history snapshot was created. If the execution setting for the item is Live, the parameter metadata returned represents the parameter data that is associated with the specified item.
If you provide a value for the HistoryID parameter and set the ForRendering parameter value totrue, the parameter metadata returned represents the parameter data that was used when the item history snapshot was created. The value supplied for HistoryID is ignored if ForRendering is set to false.If ForRendering is false, the parameter metadata returned represents the parameter data that is currently associated with the specified item.
If any parameters values are based on a query and you are interested in returning the query-based parameters' valid values list, set ForRendering to true. In addition, for query-based parameters, you must pass in all of the credential information required to return the query parameters.
When using the GetItemParameters method to validate parameters, the Values parameter is required.
If parameters do not exist for the given item, an empty ItemParameter array is returned.
Examples
Legacy Code Example
To compile this code example, you must reference the Reporting Services WSDL and import certain namespaces. For more information, see . The following code example uses the GetItemParameters method to retrieve a list of parameter metadata for a report and then displays the name of each parameter:Unable to find linked topic '317946aa-8e95-4f0b-8170-394c9d5e184e'.
Imports System
Imports System.Web.Services.Protocols
Class Sample
Public Shared Sub Main()
Dim rs As New ReportingService2010()
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim report As String = "/SampleReports/Employee Sales Summary"
Dim forRendering As Boolean = False
Dim historyID As String = Nothing
Dim values As ParameterValue() = Nothing
Dim credentials As DataSourceCredentials() = Nothing
Dim parameters As ItemParameter() = Nothing
Try
parameters = rs.GetItemParameters(report, historyID, forRendering, values, credentials)
If Not (parameters Is Nothing) Then
Dim rp As ItemParameter
For Each rp In parameters
Console.WriteLine("Name: {0}", rp.Name)
Next rp
End If
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;
string report = "/SampleReports/Employee Sales Summary";
bool forRendering = false;
string historyID = null;
ParameterValue[] values = null;
DataSourceCredentials[] credentials = null;
ItemParameter[] parameters = null;
try
{
parameters = rs.GetItemParameters(report, historyID, forRendering, values, credentials);
if (parameters != null)
{
foreach (ItemParameter rp in parameters)
{
Console.WriteLine("Name: {0}", rp.Name);
}
}
}
catch (SoapException e)
{
Console.WriteLine(e.Detail.InnerXml.ToString());
}
}
}
See Also
ReportingService2010 Class
ReportService2010 Namespace
Return to top