ParameterFieldDefinitions.Item Property (String,String)

Gets the object with the specified parameter name and report name. In C#, this property is the indexer for the ParameterFieldDefinition class.

Namespace CrystalDecisions.CrystalReports.Engine Assembly CrystalDecisions.CrystalReports.Engine (CrystalDecisions.CrystalReports.Engine.dll)

Syntax

'Declaration

Public Overrideable ReadOnly Property Item ( _
    ByVal subreportName As String, _    
    ByVal index As String _ 
) As CrystalDecisions.CrystalReports.Engine.ParameterFieldDefinition
public virtual CrystalDecisions.CrystalReports.Engine.ParameterFieldDefinition this [
    string subreportName,
    string index
]{get;}

Parameters

  • subreportName
  • index

Property Value

The value in the collection with the specified parameter name and report name.

Remarks

This property allows you to access a specific item in the collection. The item is referenced by the object name, such as "object1", and the report name, such as "myReport.rpt".

The property name Item does not exist for C#. To access an item in a collection using C#, use the syntax: collection["object1", "myReport.rpt"].

Example

This example returns a ParameterFieldDefinition by field name and subreport name.

'Declaration

      Private Function GetParameterByFieldAndSubreportName(ByVal myReportDocument As ReportDocument, ByVal fieldName As String, ByVal subreportName As String) As ParameterFieldDefinition
        GetParameterByFieldAndSubreportName = myReportDocument.DataDefinition.ParameterFields(fieldName, subreportName)
      End Function
      
      private ParameterFieldDefinition GetParameterByFieldAndSubreportName(ReportDocument reportDocument, string fieldName, string subreportName)
      {
        return reportDocument.DataDefinition.ParameterFields[fieldName, subreportName];
      }
      

Version Information

Crystal Reports Basic for Visual Studio 2008

Supported since: Crystal Reports for Visual Studio .NET 2002

See Also

Reference

ParameterFieldDefinitions Class
ParameterFieldDefinitions Members
CrystalDecisions.CrystalReports.Engine Namespace