DataSourceConnections.Item Property (Integer)
Gets the object at the specified index. In C#, this property is the indexer for the IConnectionInfo class.
Namespace CrystalDecisions.Shared Assembly CrystalDecisions.Shared (CrystalDecisions.Shared.dll)
Syntax
'Declaration
Public ReadOnly Property Item ( _
ByVal index As Integer _
) As CrystalDecisions.Shared.IConnectionInfo
public CrystalDecisions.Shared.IConnectionInfo this [
int index
]{get;}
Parameters
- index
Property Value
The value in the collection at the specified index.
Remarks
This property allows you to access a specific item in the collection. The item is referenced using a numeric, zero-based index.
The property name Item does not exist for C#. To access an item in a collection using C#, use the syntax: collection[0].
Example
This example shows how to get the first ConnectionInfo instance in the report.
'Declaration
Private Function GetFirstDataSourceConnection(ByVal myReportDocument As ReportDocument) As IConnectionInfo
GetFirstDataSourceConnection = myReportDocument.DataSourceConnections.Item(1)
End Function
private IConnectionInfo GetFirstDataSourceConnection (ReportDocument reportDocument)
{
return reportDocument.DataSourceConnections[0];
}
Version Information
Crystal Reports Basic for Visual Studio 2008
Supported since: Crystal Reports .NET 10
See Also
Reference
DataSourceConnections Class
DataSourceConnections Members
CrystalDecisions.Shared Namespace