<%'Include Data Connection%> <%'Include ADO constants include file for VBScript%> <% 'open data connection OpenConn() %> <%'Include Utility Scripts%> <% Dim intExportFormat Dim strDynamicFormName Dim strQueryCriteria Dim intFormEntryCount Dim strReportHTML Dim strFilterCriteriaArray If Request.Form <> "" Then 'get the query string variables intExportFormat = Request.Form("txtType") If LCase(intExportFormat) = "word" Then intExportFormat = 0 Else intExportFormat = 1 End If strDynamicFormName = Request.Form("txtDynamicFormName") intFormEntryCount = Request.Form("txtFormEntryCount") 'test:replace ' strReportHTML = Request.Form("txtReportHTML") For I = 1 To Request.Form("txtReportHTML").Count strReportHTML = strReportHTML & Request.Form("txtReportHTML")(I) Next strReportHTML = Replace(strReportHTML, "[%PLUS_SYMBOL%]", "'") Dim objRegExp, strOutput Set objRegExp = New Regexp objRegExp.IgnoreCase = True objRegExp.Global = True objRegExp.Pattern = "" strReportHTML = objRegExp.Replace(strReportHTML, "") strFilterCriteriaArray = Request.Form("txtFilterCriteriaArray") 'if criteria was submitted then... If strFilterCriteriaArray <> "" Then 'get the criteria query strQueryCriteria = GetQueryCriteria(strFilterCriteriaArray, strDelimiter) 'if criteria was not submitted then... Else 'set the criteria query variable to an empty string strQueryCriteria = "no criteria submitted" 'end: if criteria was submitted then... End If Else Response.Redirect "/admin/dynamic_forms.asp" End If Response.Clear Response.Buffer = TRUE Response.Expires = 0 Response.ContentType="application/octetstream" Response.AddHeader "Pragma", "no-cache" if intExportFormat=0 then Response.AddHeader "Content-Disposition", "attachment; filename=dynamic_form_report_" & Replace(SimpleDate(Date), "/", "-") & ".doc" else Response.AddHeader "Content-Disposition", "attachment; filename=dynamic_form_report_" & Replace(SimpleDate(Date), "/", "-") & ".xls" end if %>
Dynamic Form Report (<%=SimpleDate(Date)%>):
<%=strDynamicFormName%>
Search Results match the following criteria:
<%=strQueryCriteria%>
Number of Entries: <%=intFormEntryCount%>
<%=strReportHTML%>
<% conn.close set conn=nothing %>