ActiveReports Developer 7
Count Property
See Also  Example
GrapeCity.ActiveReports.v7 Assembly > GrapeCity.ActiveReports.Data Namespace > XMLDataSource Class : Count Property

Glossary Item Box

Gets the number of nodes (records) in the node list.

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property Count As System.Integer
C# 
public System.int Count {get;}

Property Value

Integer.

Example

Paste into the Detail Format event.
C#Copy Code
GrapeCity.ActiveReports.Data.XMLDataSource xDS = new GrapeCity.ActiveReports.Data.XMLDataSource();
SectionReport1 rpt = new SectionReport1();

    xDS.ValidateOnParse = true;
    xDS.FileURL = System.Windows.Forms.Application.StartupPath + " \\customer.xml";
    xDS.RecordsetPattern = "//ITEM";
    xDS.NodeList = (System.Xml.XmlNodeList)ds.Field("ITEM",true);
    this.Label1.Text = xDS.CurrentPosition;
    Console.WriteLine(xDS.Count.ToString());

    if (xDS.BOF && xDS.EOF)
    {
        return;
    }
Paste into the Detail Format event.
Visual BasicCopy Code
Dim xDS As New GrapeCity.ActiveReports.Data.XMLDataSource()
Dim rpt As New SectionReport1()

    xDS.ValidateOnParse = True
    xDS.FileURL = System.Windows.Forms.Application.StartupPath + " \\customer.xml"
    xDS.RecordsetPattern = "//ITEM"
    xDS.NodeList = xDS.Field("ITEM", True)
    Me.Label1.Text = xDS.CurrentPosition
    Console.WriteLine(xDS.Count.ToString())

    If xDS.BOF & xDS.EOF Then
        Exit Sub
    End If

See Also