Corner Logo

TPD Crime Statistics Search


 
<% '=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= '** Veign '=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= '** Copyright (C) 2006 Veign, All rights reserved '** Authored By: Chris Hanscom '** '** You may not rent, lease, display or distribute copies of the Software to '** others. The Software and the accompanying materials are copyrighted by '** Veign and contain proprietary information. '** Unauthorized copying of the Software or accompanying materials even if '** modified, merged, or included with other software, or of the written materials, '** is expressly forbidden. You may be held legally responsible for any '** infringement of intellectual property rights that is caused or encouraged '** by your failure to abide by the terms of this Agreement. '** '** '** Copyright transfership is only legal binding with expressed written consent '** from Veign and the Author. '=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ' Usage ' ' Dim oExport ' Set oExport = New cExportToCsv ' ' With oExport ' .IncludeHeaderRow = True ' .SQL = strSQL ' .Filename = "MyExportedFile" ' .ConnectionString = sConnectString ' .ExportToCSV ' End With ' Set oExport = Nothing ' '=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ' Writes all data in current recordset as comma separated value file '=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Const EXP_SEPERATOR = "," Const EXP_VALUE_DELIMITOR = """" '** Class Module: Class cExportToCsv Private mSQL Private mFilename Private mConnectionString Private mRS Private mIncludeHeaderRow '=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= '** Properties: Public Property Get SQL() SQL = mSQL End Property Public Property Let SQL(vData) mSQL = vData End Property Public Property Get ConnectionString() ConnectionString = mConnectionString End Property Public Property Let ConnectionString(vData) mConnectionString = vData End Property Public Property Get Filename() Filename = mFilename End Property Public Property Let Filename(vData) mFilename = vData End Property Public Property Get IncludeHeaderRow() IncludeHeaderRow = mIncludeHeaderRow End Property Public Property Let IncludeHeaderRow(vData) mIncludeHeaderRow = vData End Property Public Sub ExportToCSV() 'Populate the Recordset object with a SQL query Set mRS = Server.CreateObject("ADODB.Recordset") mRS.Open mSQL, mConnectionString, adOpenForwardOnly, adLockReadOnly ' Clear out the existing HTTP header information Response.Buffer = TRUE Response.Clear Response.ContentType = "text/csv" Response.AddHeader "Content-Disposition", "inline;filename=" & mFilename & ".csv" 'Check for header row If mIncludeHeaderRow Then Response.Write GetHeaderRow & vbCrLf End If If Not mRS.EOF Then Dim fld, sDataRow Do Until mRS.EOF 'Clear the row sDataRow = "" For Each fld In mRS.fields sDataRow = sDataRow & EXP_VALUE_DELIMITOR & fld.Value & EXP_VALUE_DELIMITOR & EXP_SEPERATOR Next 'Write out Response.Write Left(sDataRow, Len(sDataRow)-1) & vbCrLf mRS.MoveNext Loop End If Response.End 'Cleanup mRS.Close Set mRS = Nothing End Sub Private Function GetHeaderRow() Dim fld Dim retVal 'Build a header row of all fields For Each fld In mRS.fields retVal = retVal & EXP_VALUE_DELIMITOR & fld.name & EXP_VALUE_DELIMITOR & EXP_SEPERATOR Next 'Return the row minus the last seperator GetHeaderRow = Left(retVal, Len(retVal)-1) End Function '=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= End Class %>
Step 1:

Select your search method. 





  • Search by Address: You specify an address to search. (Result will show addresses 50 below and 50 above the specific address you input)

  • Search by Substation : You select a substation to search

  • Search by Neighborhood : You specify a specific neighborhood to search

  • City Wide Search : Search Entire City

  • Search Using Beat Maps : Use Maps to Choose Substation and Beat to Search

  • Search by 100 Blocks : Use city 100 block coordinates to search an area. ( You must know the 100 block coordinates!)

Users of Internet Explorer may encounter slow responses or time out errors. If you encounter problems or errors when attempting to receive statistics, turn off the "Automatic Website Checking" under the "Tools - Phishing Filter Menu". This problem only affects IE7. Mozilla and IE6 work fine.



Step 2:

Select how you would like to view the results:


Explanation of result views
  • Totals:   Results will display only the UCR Description and the total for the number of incidents
  • Full:   Results will display all information for the incidents. Totals are not displayed
 
Step 3: