<%'Include Data Connection%> <%'Include ADO constants include file for VBScript%> <% 'open data connection Call OpenConn() %> <%'Include Utility Scripts%> <% Dim intGroupId Dim strApp Dim rsContacts Dim rsGroup Dim strGroupName Dim strGroupDescription 'get the application strApp = Request.QueryString("app") 'get the Group id intGroupId = Request.QueryString("id") 'if an application has not been specified then... If Not(LCase(strApp) = "doc" Or LCase(strApp) = "xls") Then 'stop outputting Response.End 'end: if an application has not been specified then... End If 'if the submitted group id is of the right format then... If intGroupId <> "" And IsNumeric(intGroupId) Then 'cast the group id as an integer intGroupId = CInt(intGroupId) 'if the submitted group id is not of the right format then... Else 'stop outputting Response.End End If 'get the group info Set rsGroup = PopulateGroupEditForm(intGroupId) 'if the group id does not relate to an existing group then... If Not rsGroup.Eof Then 'get the group info strGroupName = rsGroup("GROUP_NAME") strGroupDescription = rsGroup("GROUP_DESCRIPTIONS") 'get the contact list Set rsContacts = GetGroupSubscribers(intGroupId) 'if there contacts in the list then... If Not rsContacts.Eof Then Response.Clear Response.Buffer = TRUE Response.Expires = 0 Response.ContentType="application/octetstream" Response.AddHeader "Pragma", "no-cache" Response.AddHeader "Content-Disposition", "attachment; filename=group_contact_list." & strApp %> <%'output header%> <%'output contacts Dim intSubCounter Dim strRowColour intSubCounter = 0 Do While Not rsContacts.Eof 'increment counter intSubCounter = intSubCounter + 1 If intSubCounter mod 2 Then strRowColour = "grey" Else strRowColour = "white" End If %> <%'output contacts rsContacts.MoveNext Loop 'close the recordset rsContacts.Close %>

Group Contact List: <%=strGroupName%>

<%=strGroupDescription%>

Report generated on: <%=SimpleDate(Date)%>
  Last Name First Name Email Address Organization Contact Type Relevant Education Country of First Degree Years of Professional Experience Employment Status Statement of Interest
<%=intSubCounter%> <%=rsContacts("SUBSCRIBER_LAST_NAME")%> <%=rsContacts("SUBSCRIBER_FIRST_NAME")%> <%=rsContacts("SUBSCRIBER_EMAIL")%> <%=rsContacts("SUBSCRIBER_ORGANIZATION")%> <%=rsContacts("CONTACT_TYPE_NAME_ENG")%> <%=rsContacts("SUBSCRIBER_RELEVANT_EDUCATION")%> <%=rsContacts("COUNTRY_NAME")%> <%=rsContacts("SUBSCRIBER_YEARS_OF_PROFESSIONAL_EXPERIENCE")%> <%=rsContacts("SUBSCRIBER_EMPLOYMENT_STATUS")%> <%=rsContacts("SUBSCRIBER_STATEMENT_OF_INTEREST")%>
<% 'if there are no contacts in the list then... Else 'stop outputting Response.End 'end: if there are contacts in the list then... End If 'release the recordset Set rsContacts = Nothing 'end: if the group id does not relate to an existing group then... End If 'release the recordset rsGroup.Close Set rsGroup = Nothing 'close data connection Call CloseConn() %>