Share via


ReportPartNodes Class

Provides properties and methods to add and retrieve ReportPartNode objects to the collection.

Namespace CrystalDecisions.Web Assembly CrystalDecisions.Web (CrystalDecisions.Web.dll)

Syntax

'Declaration
Public Class ReportPartNodes
public class ReportPartNodes

Example

The following example searches for the report part node by partial name.

'Declaration

      Private Function GetReportPartNodeByPartialName(ByVal myCrystalReportPartsViewer As CrystalReportPartsViewer, _
      ByVal partialName As String) As ReportPartNode
        Dim myReportPartsDefinition As ReportPartsDefinition = myCrystalReportPartsViewer.ReportParts
        Dim i As Integer
        For i = 0 To myReportPartsDefinition.ReportPartNodes.Count
          Dim myReportPartNode As ReportPartNode = myReportPartsDefinition.ReportPartNodes.Item(i)
          If (InStr(myReportPartNode.Name, partialName) > 0) Then
            GetReportPartNodeByPartialName = myReportPartNode
            Exit For
          End If
        Next
      End Function
      private ReportPartNode GetReportPartNodeByPartialName(CrystalReportPartsViewer crystalReportPartsViewer,
        string partialName)
      {
        ReportPartsDefinition reportPartsDefinition = (ReportPartsDefinition)crystalReportPartsViewer.ReportParts;
        for (int i = 0; i < reportPartsDefinition.ReportPartNodes.Count; i++)
        {
          ReportPartNode reportPartNode = reportPartsDefinition.ReportPartNodes[i];
          if (reportPartNode.Name.IndexOf(partialName) > = 0)
          {
            return reportPartNode;
          }
        }
        return null;
      }

Inheritance Hierarchy

Object
   ReportPartNodes

Version Information

Crystal Reports Basic for Visual Studio 2008

Supported since: Crystal Reports for Visual Studio .NET 2002

See Also

Reference

ReportPartNodes Members
CrystalDecisions.Web Namespace