Listing a group's members

Once you have obtained the ServerGroup object, you can use the Servers property to list and modify the servers that belong to the group. The Servers property returns a GroupServers collection, which contains the names of all servers in the group and has methods for adding and deleting servers to and from the group. The following segment of code prints the members of the group in a drop down list. It uses the name of the server as the value, and the name of the server as the display string.

HTML= HTML + "</select>";

    var HTML="<select name=MemberName>";

    for (k=1;k<=ServerGroup.Servers.Count;k++)

    {

        HTML = HTML + "<option value='"+ServerGroup.Servers.Item(k)+"'>"+ServerGroup.Servers.Item(k);

    }

    HTML= HTML + "</select>";

    return HTML;

Next: Listing a group's associates.



Crystal Decisions, Inc.
http://www.crystaldecisions.com
Support services:
http://support.crystaldecisions.com