// This page is the first page in the example. If provides a form
// that shows all server groups on the APS with buttons that allows
// the user to add, delete, or modify the members in a server group.
// It calls ManageServerGroup.csp to do these things.
<!-- #include file="RetrieveIStore.csp" -->
<!-- #include file=helper_js.csp -->
function GetServerGroups(IStore)
// Retrieve a list of all ServerGroups on the APS. Return the list
// in an HTML string that will draw a drop down box.
// IStore - The InfoStore object.
// Query for all server groups.
var ServerGroups = IStore.Query
("SELECT SI_SERVER_GROUP, SI_ID, SI_NAME FROM CI_SYSTEMOBJECTS WHERE SI_PROGID='CrystalEnterprise.ServerGroup'");
var HTMLTable="<select name=ServerGroupId>";
// Iterate through all groups and build the drop down box.
for (k=1;k<=ServerGroups.Count;k++)
HTMLTable = HTMLTable + "<option value='"+ServerGroups.Item(k).Id+"'>"+ServerGroups.Item(k).Title;
HTMLTable= HTMLTable + "</select>";
Response.Redirect ("Start.csp");
Response.Write ("<H2>Server group administration</H2>");
Response.Write ("<form action='ManageServerGroup.csp' method=post name='ServerGroup'>");
Response.Write ("<H4>Remove or manage group</H4>");
Response.Write ("Choose the server group that you want to manage.<BR>");
Response.Write ("Server group: <BR>");
Response.Write (GetServerGroups(IStore));
Response.Write ("<BR><input type=submit name='Remove' value='Remove'> ");
Response.Write ("<input type=submit name='ManageMembers' value='ManageMembers'><HR>");
Response.Write ("<H4>Add a group</H4>");
Response.Write ("New group name:");
Response.Write ("<BR><input type=text name='NewGroupName'>");
Response.Write ("<BR>New group description:");
Response.Write ("<BR><input type=text name='NewGroupDescription'>");
Response.Write ("<BR><input type=submit name='Add' value='Add'><HR>");
Crystal Decisions, Inc. http://www.crystaldecisions.com Support services: http://support.crystaldecisions.com |