Solved

Problem displaying data on results table

Posted on 2004-08-05
31
159 Views
Last Modified: 2010-04-25
I am having problems displaying the data on an ASP results table.

If I have a field in a table {Recordset1.TYPE_CODE} and it pulls data "code" from the DB, IE 02 which on the output needs to be MM rather than 02.  How can I get the form to display the output data I need rather than the code stored in the DB?

Below are the translations.

=IIf([PROCESS_TYPE]=01,"TM") & IIf([PROCESS_TYPE]=02,"MM") & IIf([PROCESS_TYPE]=03,"A / W") & =IIf([PROCESS_TYPE]=04,"JUV") & IIf([PROCESS_TYPE]=05,"FEL") & IIf([PROCESS_TYPE]=06,"CNTY") & IIf([PROCESS_TYPE]=07,"VOP") & IIf([PROCESS_TYPE]=08,"STATE") & IIf([PROCESS_TYPE]=09,"FELONY") & =IIf([PROCESS_TYPE]=10,"MISDM") & IIf([PROCESS_TYPE]=11,"OUT COUN") & IIf([PROCESS_TYPE]=12,"OUT STAT") & =IIf([PROCESS_TYPE]=13,"TT") & IIf([PROCESS_TYPE]=14,"JUV / A") & IIf([PROCESS_TYPE]=15,"COUNTY ORDINANCE") & =IIf([PROCESS_TYPE]=16,"MUNICIPLE ORDINANCE") & IIf([PROCESS_TYPE]=17,"COUNTY TRAFFIC") & IIf([PROCESS_TYPE]=18,"WRIT OF ATTACHMENT") & IIf([PROCESS_TYPE]=19,"BOND SURRENDER")

Your help is appreciated.
0
Comment
Question by:NCSO
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 16
  • 15
31 Comments
 
LVL 10

Expert Comment

by:rockmansattic
ID: 11735547
??  could you rephrase the question.

Rockman
0
 

Author Comment

by:NCSO
ID: 11735618
I will try my best.

The results that come back from a search are actually codes stored in the database.  For example, 02 is the code for MM.  What I would like to do is, when the results come back is there a way within Dreamweaver to output the MM (Description) rather than the code of 02?  I hope this helps.
0
 

Author Comment

by:NCSO
ID: 11735676
Append:

Users of the page will not have a clue what the codes mean, so to make it user friendly I would like to do a translation on the search results page.
0
On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

 
LVL 10

Expert Comment

by:rockmansattic
ID: 11735741
Short answer ...NO.
you can either create another table in the database that cross references the output of the first query with the codes of the new table , but depending on the number codes, this would use a lot of the server.

Depending on how many "codes" there are.  the easiest way is to do this is by useing application coding.

i.e something like this
if (this_output = 02) then var_output = MM
if (this_output = 03) then var_output = NN

How many outputs are there per page?
How many codes are there?
What lang are you useing asp or php?
Rockman
0
 

Author Comment

by:NCSO
ID: 11736055
I am using asp.  Below is the current params.  

<td>Type</td>
    <td><%=(Recordset1.Fields.Item("TYPE_CODE").Value)%> &nbsp; </td>
    <td>Status</td>
    <td><%=(Recordset1.Fields.Item("STATUS_CODE").Value)%></td>
  </tr>

There are approximately 19 codes for the STATUS_CODE.

So how would I modify the above code to use the var_output rather than the "actual" data from the DB?
0
 
LVL 10

Expert Comment

by:rockmansattic
ID: 11736288
be back in one hour, sorry.

0
 
LVL 10

Expert Comment

by:rockmansattic
ID: 11737358
Probably not the best coding, but should work.


<table>
<%
While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
%>
<tr>
<% current_var = Recordset1.Fields.Item("STATUS_CODE").Value%>
<% if (current_var = "02") then new_var = "MM"
 else if (current_var = "03") then new_var = "hh"
 else if (current_var = "04") then new_var = "gg"
 else if (current_var = "05") then new_var = "tt"
 else if (current_var = "06") then new_var = "ii"
 else if (current_var = "07") then new_var = "pp"
 else if (current_var = "08") then new_var = "qq"
 else if (current_var = "09") then new_var = "ww"
 else if (current_var = "10") then new_var = "rr"
 else if (current_var = "11") then new_var = "ee"
 else if (current_var = "12") then new_var = "tt"
 else if (current_var = "13") then new_var = "uu"
 else if (current_var = "14") then new_var = "oo"
 else if (current_var = "15") then new_var = "bb"
end if%>

 
<td>Type</td>
  <td><%=(Recordset1.Fields.Item("TYPE_CODE").Value)%> &nbsp; </td>
  <td>Status</td>
  <td><%=(new_var)%></td>
</tr>
<%
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  Recordset1.MoveNext()
Wend
%>

</table>

Rockman
0
 

Author Comment

by:NCSO
ID: 11737835
I could not get it to work, below is the asp page code

<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/Interact911DataFiles.asp" -->
<%
var Recordset1__MMColParam3 = "03-687175";
if (String(Request("PROCESS_NO")) != "undefined" && 
    String(Request("PROCESS_NO")) != "") {
  Recordset1__MMColParam3 = String(Request("PROCESS_NO"));
}
%>
<%
var Recordset1 = Server.CreateObject("ADODB.Recordset");
Recordset1.ActiveConnection = MM_Interact911DataFiles_STRING;
Recordset1.Source = "SELECT GETDATE()AS PRINT_DATE, (CAST(PROCESS_YEAR AS VARCHAR(4))+  '-' + CAST(PROCESS_REF_NUMBER AS VARCHAR(8))) AS REFERENCE_#, PROCESS_NO AS WARRANT_#, PROCESS_TYPE AS TYPE_CODE, PROCESS_STATUS AS STATUS_CODE, PROCESS_ISSUE_DATE_NUM AS ISSUED_DATE, PROCESS_EXP_DATE_NUM AS EXPIRES_DATE, PROCESS_DATE_MAILED_NUM AS MAILED_DATE, PROCESS_CHARGE AS CHARGE_CODE,   PROCESS_CHARGE_TEXT AS CHARGE_TEXT, PROCESS_COMMENT AS COMMENT, PROCESS_MAIL_TO AS MAIL_TO,  PROCESS_AT_DEPT AS PROCESSED_AT, PROCESS_AT_CITY AS PROCESSED_CITY, PROCESS_AT_STATE AS PROCESSED_STATE,  PROCESS_ISSUE_BY AS ISSUED_BY_CODE, PROCESS_COUNTY_ORIGIN AS COUNTY_ORIGIN_CODE, PROCESS_PLAINTIFF AS COMPLAINANT_NAME, PROCESS_ENTER_USER AS ENTERED_BY, PROCESS_START_DATE_NUM AS ENTERED_DATE,  PROCESS_SERVE_DATE_NUM AS SERVICE_DATE, PROCESS_SERVE_TYPE AS SERVICE_TYPE_CODE,  PROCESS_SERVE_OFFICER AS SERVE_OFFICER_NAME, PW_OFFICER1 AS SERVE_OFFICER_ID_#, PROCESS_UNSERVED AS RETURNED_USERVED,  PROCESS_RTC_YMD_NUM AS RTC_DATE, PROCESS_WARRANT_SIGNED AS WARRANT_SIGNED_BY_CODE,  PW_OFFICER4_DATE AS DATE_CONFINED, PROCESS_EMPLOYER AS PLACE_CONFINED, PROCESS_P_CITY AS MAGISTRATE,  PROCESS_COURT_DATE_NUM AS TRIAL_DATE, PROCESS_EMPLOYER_CITY AS COURT_OF, PROCESS_OCCUPATION AS COURT_CITY, PW_OFFICER4 AS BOUND_TYPE_CODES, PW_OFFICER3_DATE AS BOUND_AMOUNT,  PERSON_LAST AS DEFENDANT_LAST, PERSON_FIRST AS DEFENDANT_FIRST, PERSON_MIDDLE AS DEFENDANT_MIDDLE, PERSON_SUFFIX AS DEFENDANT_SUFFIX, (CAST(PERSON_DOB_MM AS VARCHAR(2)) + '/' +CAST(PERSON_DOB_DD AS VARCHAR(2)) + '/' +CAST(PERSON_DOB_YY AS VARCHAR(4))) AS DEFENDANT_DOB,  PERSON_RACE AS DEFENDANT_RACE, PERSON_SEX AS DEFENDANT_SEX, (PERSON_SS1 +'-'+PERSON_SS2+'-'+PERSON_SS3) AS DEFENDANT_SS#, (PERSON_PHONE_AC+ '-' +PERSON_PHONE_EXC+ '-' +PERSON_PHONE_LINE) AS DEFENDANT_PHONE, PERSON_HEIGHT AS DEFENDANT_HEIGHT,  PERSON_WEIGHT AS DEFENDANT_WEIGHT, PERSON_EYES AS DEFENDANT_EYES, PERSON_HAIR AS DEFENDANT_HAIR, PERSON_DL AS DEFENDANT_DL#,  PERSON_DL_ST AS DEFENDANT_DL_STATE, PERSON_STREET_ADDRESS AS DEFENDANT_ADDRESS, PERSON_CITY AS DEFENDANT_CITY,  PERSON_STREET_KEY_APT AS DEFENDANT_APT, PERSON_ST AS DEFENDANT_ST, PERSON_ZIP AS DEFENDANT_ZIP  FROM PROCESS INNER JOIN CPERSON ON (CAST(PROCESS_YEAR AS CHAR(4))+ REPLACE(STR(PROCESS_REF_NUMBER,6,0),' ','0')) =PERSON_ARR_NUMBER  WHERE PROCESS_YEAR = PERSON_YEAR AND PROCESS_REF_NUMBER = PERSON_NUMBER /*TO REPLACE WITH THE NEEDED RECORD REFERENCE YEAR AND NUMBER */ AND PERSON_PAPER = 'W' AND PERSON_TYPE = 'D' AND PROCESS_NO = '"+ Recordset1__MMColParam3.replace(/'/g, "''") + "'";
Recordset1.CursorType = 0;
Recordset1.CursorLocation = 2;
Recordset1.LockType = 1;
Recordset1.Open();
var Recordset1_numRows = 0;
%>
<%
var WARRANT_TYPE = Server.CreateObject("ADODB.Recordset");
WARRANT_TYPE.ActiveConnection = MM_Interact911DataFiles_STRING;
WARRANT_TYPE.Source = "SELECT *  FROM dbo.CSEVENT  WHERE CSEVENT_NUMBER = '59'";
WARRANT_TYPE.CursorType = 0;
WARRANT_TYPE.CursorLocation = 2;
WARRANT_TYPE.LockType = 1;
WARRANT_TYPE.Open();
var WARRANT_TYPE_numRows = 0;
%>
<%
// *** Recordset Stats, Move To Record, and Go To Record: declare stats variables

// set the record count
var Recordset1_total = Recordset1.RecordCount;

// set the number of rows displayed on this page
if (Recordset1_numRows < 0) {            // if repeat region set to all records
  Recordset1_numRows = Recordset1_total;
} else if (Recordset1_numRows == 0) {    // if no repeat regions
  Recordset1_numRows = 1;
}

// set the first and last displayed record
var Recordset1_first = 1;
var Recordset1_last  = Recordset1_first + Recordset1_numRows - 1;

// if we have the correct record count, check the other stats
if (Recordset1_total != -1) {
  Recordset1_numRows = Math.min(Recordset1_numRows, Recordset1_total);
  Recordset1_first   = Math.min(Recordset1_first, Recordset1_total);
  Recordset1_last    = Math.min(Recordset1_last, Recordset1_total);
}
%>
<% var MM_paramName = ""; %>
<%
// *** Move To Record and Go To Record: declare variables

var MM_rs        = Recordset1;
var MM_rsCount   = Recordset1_total;
var MM_size      = Recordset1_numRows;
var MM_uniqueCol = "";
    MM_paramName = "";
var MM_offset = 0;
var MM_atTotal = false;
var MM_paramIsDefined = (MM_paramName != "" && String(Request(MM_paramName)) != "undefined");
%>
<%
// *** Move To Record: handle 'index' or 'offset' parameter

if (!MM_paramIsDefined && MM_rsCount != 0) {

  // use index parameter if defined, otherwise use offset parameter
  r = String(Request("index"));
  if (r == "undefined") r = String(Request("offset"));
  if (r && r != "undefined") MM_offset = parseInt(r);

  // if we have a record count, check if we are past the end of the recordset
  if (MM_rsCount != -1) {
    if (MM_offset >= MM_rsCount || MM_offset == -1) {  // past end or move last
      if ((MM_rsCount % MM_size) != 0) {  // last page not a full repeat region
        MM_offset = MM_rsCount - (MM_rsCount % MM_size);
      } else {
        MM_offset = MM_rsCount - MM_size;
      }
    }
  }

  // move the cursor to the selected record
  for (var i=0; !MM_rs.EOF && (i < MM_offset || MM_offset == -1); i++) {
    MM_rs.MoveNext();
  }
  if (MM_rs.EOF) MM_offset = i;  // set MM_offset to the last possible record
}
%>
<%
// *** Move To Record: if we dont know the record count, check the display range

if (MM_rsCount == -1) {

  // walk to the end of the display range for this page
  for (var i=MM_offset; !MM_rs.EOF && (MM_size < 0 || i < MM_offset + MM_size); i++) {
    MM_rs.MoveNext();
  }

  // if we walked off the end of the recordset, set MM_rsCount and MM_size
  if (MM_rs.EOF) {
    MM_rsCount = i;
    if (MM_size < 0 || MM_size > MM_rsCount) MM_size = MM_rsCount;
  }

  // if we walked off the end, set the offset based on page size
  if (MM_rs.EOF && !MM_paramIsDefined) {
    if ((MM_rsCount % MM_size) != 0) {  // last page not a full repeat region
      MM_offset = MM_rsCount - (MM_rsCount % MM_size);
    } else {
      MM_offset = MM_rsCount - MM_size;
    }
  }

  // reset the cursor to the beginning
  if (MM_rs.CursorType > 0) {
    if (!MM_rs.BOF) MM_rs.MoveFirst();
  } else {
    MM_rs.Requery();
  }

  // move the cursor to the selected record
  for (var i=0; !MM_rs.EOF && i < MM_offset; i++) {
    MM_rs.MoveNext();
  }
}
%>
<%
// *** Move To Record: update recordset stats

// set the first and last displayed record
Recordset1_first = MM_offset + 1;
Recordset1_last  = MM_offset + MM_size;
if (MM_rsCount != -1) {
  Recordset1_first = Math.min(Recordset1_first, MM_rsCount);
  Recordset1_last  = Math.min(Recordset1_last, MM_rsCount);
}

// set the boolean used by hide region to check if we are on the last record
MM_atTotal = (MM_rsCount != -1 && MM_offset + MM_size >= MM_rsCount);
%>
<%
// *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters

// create the list of parameters which should not be maintained
var MM_removeList = "&index=";
if (MM_paramName != "") MM_removeList += "&" + MM_paramName.toLowerCase() + "=";
var MM_keepURL="",MM_keepForm="",MM_keepBoth="",MM_keepNone="";

// add the URL parameters to the MM_keepURL string
for (var items=new Enumerator(Request.QueryString); !items.atEnd(); items.moveNext()) {
  var nextItem = "&" + items.item().toLowerCase() + "=";
  if (MM_removeList.indexOf(nextItem) == -1) {
    MM_keepURL += "&" + items.item() + "=" + Server.URLencode(Request.QueryString(items.item()));
  }
}

// add the Form variables to the MM_keepForm string
for (var items=new Enumerator(Request.Form); !items.atEnd(); items.moveNext()) {
  var nextItem = "&" + items.item().toLowerCase() + "=";
  if (MM_removeList.indexOf(nextItem) == -1) {
    MM_keepForm += "&" + items.item() + "=" + Server.URLencode(Request.Form(items.item()));
  }
}

// create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL + MM_keepForm;
if (MM_keepBoth.length > 0) MM_keepBoth = MM_keepBoth.substring(1);
if (MM_keepURL.length > 0)  MM_keepURL = MM_keepURL.substring(1);
if (MM_keepForm.length > 0) MM_keepForm = MM_keepForm.substring(1);
%>
<%
// *** Move To Record: set the strings for the first, last, next, and previous links

var MM_moveFirst="",MM_moveLast="",MM_moveNext="",MM_movePrev="";
var MM_keepMove = MM_keepBoth;  // keep both Form and URL parameters for moves
var MM_moveParam = "index";

// if the page has a repeated region, remove 'offset' from the maintained parameters
if (MM_size > 1) {
  MM_moveParam = "offset";
  if (MM_keepMove.length > 0) {
    params = MM_keepMove.split("&");
    MM_keepMove = "";
    for (var i=0; i < params.length; i++) {
      var nextItem = params[i].substring(0,params[i].indexOf("="));
      if (nextItem.toLowerCase() != MM_moveParam) {
        MM_keepMove += "&" + params[i];
      }
    }
    if (MM_keepMove.length > 0) MM_keepMove = MM_keepMove.substring(1);
  }
}

// set the strings for the move to links
if (MM_keepMove.length > 0) MM_keepMove = Server.HTMLEncode(MM_keepMove) + "&";
var urlStr = Request.ServerVariables("URL") + "?" + MM_keepMove + MM_moveParam + "=";
MM_moveFirst = urlStr + "0";
MM_moveLast  = urlStr + "-1";
MM_moveNext  = urlStr + (MM_offset + MM_size);
MM_movePrev  = urlStr + Math.max(MM_offset - MM_size,0);
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<style type="text/css">
<!--
body,td,th {
      color: #000000;
}
body {
      background-color: #FFFFFF;
}
a:link {
      color: #000000;
}
a:visited {
      color: #000000;
}
a:hover {
      color: #000000;
}
a:active {
      color: #000000;
}
-->
</style></head>

<body>
<table border="0" width="50%" align="left">
  <tr>
    <td width="23%" align="center"><% if (MM_offset != 0) { %>
        <a href="<%=MM_moveFirst%>">First</a>
        <% } // end MM_offset != 0 %>
    </td>
    <td width="31%" align="center"><% if (MM_offset != 0) { %>
        <a href="<%=MM_movePrev%>">Previous</a>
        <% } // end MM_offset != 0 %>
    </td>
    <td width="23%" align="center"><% if (!MM_atTotal) { %>
        <a href="<%=MM_moveNext%>">Next</a>
        <% } // end !MM_atTotal %>
    </td>
    <td width="23%" align="center"><% if (!MM_atTotal) { %>
        <a href="<%=MM_moveLast%>">Last</a>
        <% } // end !MM_atTotal %>
    </td>
  </tr>
</table>
<p>&nbsp;</p>
<table width="73%"  border="1">
  <tr>
    <td width="83%" bordercolor="#FFFF00"><div align="center">
      <h2 align="center"><em><strong>Warrant Detail </strong></em></h2>
    </div></td>
  </tr>
</table>
<p><%=(Recordset1.Fields.Item("PRINT_DATE").Value)%></p>
<table width="100%"  border="0" id="Warrant">
  <tr>
    <td width="19%">Reference Number </td>
    <td width="24%"><%=(Recordset1.Fields.Item("REFERENCE_#").Value)%></td>
    <td width="19%">Warrant Number </td>
    <td width="38%"><%=(Recordset1.Fields.Item("WARRANT_#").Value)%></td>
  </tr>
  <tr>
    <td>Type</td>
    <td><%=(Recordset1.Fields.Item("TYPE_CODE").Value)%> &nbsp; </td>
    <td>Status</td>
    <td><%=(Recordset1.Fields.Item("STATUS_CODE").Value)%></td>
  </tr>
  <tr>
    <td>Issued Date </td>
    <td><%=(Recordset1.Fields.Item("ISSUED_DATE").Value)%></td>
    <td>Charge</td>
    <td><%=(Recordset1.Fields.Item("CHARGE_TEXT").Value)%></td>
  </tr>
  <tr>
    <td>Expire Date </td>
    <td><%=(Recordset1.Fields.Item("EXPIRES_DATE").Value)%></td>
    <td>Comment</td>
    <td><%=(Recordset1.Fields.Item("COMMENT").Value)%></td>
  </tr>
  <tr>
    <td>Mail Date </td>
    <td><%=(Recordset1.Fields.Item("MAILED_DATE").Value)%></td>
    <td>Mailed To </td>
    <td><%=(Recordset1.Fields.Item("MAIL_TO").Value)%></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>Process At Dept</td>
    <td><%=(Recordset1.Fields.Item("PROCESSED_AT").Value)%></td>
    <td>Issued By </td>
    <td><%=(Recordset1.Fields.Item("ISSUED_BY_CODE").Value)%></td>
  </tr>
  <tr>
    <td>City</td>
    <td><%=(Recordset1.Fields.Item("PROCESSED_CITY").Value)%></td>
    <td>County Origin </td>
    <td><%=(Recordset1.Fields.Item("COUNTY_ORIGIN_CODE").Value)%></td>
  </tr>
  <tr>
    <td>State</td>
    <td><%=(Recordset1.Fields.Item("PROCESSED_STATE").Value)%></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>Complaintant</td>
    <td><%=(Recordset1.Fields.Item("COMPLAINANT_NAME").Value)%></td>
    <td>Date Entered </td>
    <td><%=(Recordset1.Fields.Item("ENTERED_DATE").Value)%></td>
  </tr>
  <tr>
    <td>Entered By </td>
    <td><%=(Recordset1.Fields.Item("ENTERED_BY").Value)%></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
<br>
<table width="73%"  border="1">
  <tr bordercolor="#FFFF00">
    <td bordercolor="#FFFF00"><div align="center">
        <h2 align="center"><em><strong>Service Information</strong></em></h2>
    </div></td>
  </tr>
</table>
<br>
<table width="100%"  border="0" id="Service">
  <tr>
    <td width="19%">Service Date </td>
    <td width="28%"><%=(Recordset1.Fields.Item("SERVICE_DATE").Value)%></td>
    <td width="15%">Returned Unserved</td>
    <td width="38%"><%=(Recordset1.Fields.Item("RETURNED_USERVED").Value)%></td>
  </tr>
  <tr>
    <td>Type</td>
    <td><%=(Recordset1.Fields.Item("SERVICE_TYPE_CODE").Value)%></td>
    <td>Return date </td>
    <td><%=(Recordset1.Fields.Item("RTC_DATE").Value)%></td>
  </tr>
  <tr>
    <td>Officer</td>
    <td><%=(Recordset1.Fields.Item("SERVE_OFFICER_NAME").Value)%><%=(Recordset1.Fields.Item("SERVE_OFFICER_ID_#").Value)%></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
<br>
<table width="73%"  border="1">
  <tr bordercolor="#FFFF00">
    <td bordercolor="#FFFF00"><div align="center">
        <h2 align="center"><em><strong>Court Information </strong></em></h2>
    </div></td>
  </tr>
</table>
<br>
<table width="100%"  border="0" id="Court">
  <tr>
    <td width="19%">Court Date </td>
    <td width="28%"><div align="left"><%=(Recordset1.Fields.Item("TRIAL_DATE").Value)%></div></td>
    <td width="15%">Court Of </td>
    <td width="38%"><%=(Recordset1.Fields.Item("COURT_CITY").Value)%></td>
  </tr>
  <tr>
    <td>Bond Amount </td>
    <td><div align="left"><%=(Recordset1.Fields.Item("BOUND_AMOUNT").Value)%></div></td>
    <td>City</td>
    <td><%=(Recordset1.Fields.Item("COURT_OF").Value)%></td>
  </tr>
  <tr>
    <td>Bond Type </td>
    <td><%=(Recordset1.Fields.Item("BOUND_TYPE_CODES").Value)%></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
<br>
<table width="73%"  border="1">
  <tr bordercolor="#FFFF00">
    <td bordercolor="#FFFF00"><div align="center">
        <h2 align="center"><em><strong>Defendant Information </strong></em></h2>
    </div></td>
  </tr>
</table>
<br>
<table width="100%"  border="0" id="defendant">
  <tr>
    <td width="6%"><strong>Last</strong></td>
    <td width="25%"><div align="left"><%=(Recordset1.Fields.Item("DEFENDANT_LAST").Value)%></div></td>
    <td width="7%"><strong>First</strong></td>
    <td width="25%"><div align="left"><%=(Recordset1.Fields.Item("DEFENDANT_FIRST").Value)%></div></td>
    <td width="5%"><strong>Middle</strong></td>
    <td width="32%"><div align="left"><%=(Recordset1.Fields.Item("DEFENDANT_MIDDLE").Value)%></div></td>
  </tr>
  <tr>
    <td valign="top"><strong>Address</strong></td>
    <td><div align="left"><%=(Recordset1.Fields.Item("DEFENDANT_ADDRESS").Value)%><br>
      <br>
    </div></td>
    <td>&nbsp;</td>
    <td><div align="left"></div></td>
    <td><strong>Apt # </strong></td>
    <td><div align="left"><%=(Recordset1.Fields.Item("DEFENDANT_APT").Value)%></div></td>
  </tr>
  <tr>
    <td><strong>City</strong></td>
    <td><div align="left"><%=(Recordset1.Fields.Item("DEFENDANT_CITY").Value)%></div></td>
    <td><strong>State</strong></td>
    <td><div align="left"><%=(Recordset1.Fields.Item("DEFENDANT_ST").Value)%></div></td>
    <td><strong>Phone</strong></td>
    <td><div align="left"><%=(Recordset1.Fields.Item("DEFENDANT_PHONE").Value)%></div></td>
  </tr>
  <tr>
    <td><strong>Sex</strong></td>
    <td><div align="left"><%=(Recordset1.Fields.Item("DEFENDANT_SEX").Value)%></div></td>
    <td><strong>DOB</strong></td>
    <td><div align="left"><%=(Recordset1.Fields.Item("DEFENDANT_DOB").Value)%></div></td>
    <td>&nbsp;</td>
    <td><div align="left"></div></td>
  </tr>
  <tr>
    <td><strong>Race</strong></td>
    <td><div align="left"><%=(Recordset1.Fields.Item("DEFENDANT_RACE").Value)%></div></td>
    <td><strong>Eyes</strong></td>
    <td><div align="left"><%=(Recordset1.Fields.Item("DEFENDANT_EYES").Value)%></div></td>
    <td><strong>Hair</strong></td>
    <td><div align="left"><%=(Recordset1.Fields.Item("DEFENDANT_HAIR").Value)%></div></td>
  </tr>
  <tr>
    <td><strong>Height</strong></td>
    <td><div align="left"><%=(Recordset1.Fields.Item("DEFENDANT_HEIGHT").Value)%></div></td>
    <td><p>&nbsp;</p>
    </td>
    <td><div align="left"></div></td>
    <td>&nbsp;</td>
    <td><div align="left"></div></td>
  </tr>
  <tr>
    <td><strong>Weight</strong></td>
    <td><div align="left"><%=(Recordset1.Fields.Item("DEFENDANT_WEIGHT").Value)%></div></td>
    <td>&nbsp;</td>
    <td><div align="left"></div></td>
    <td>&nbsp;</td>
    <td><div align="left"></div></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><div align="left"></div></td>
    <td>&nbsp;</td>
    <td><div align="left"></div></td>
    <td>&nbsp;</td>
    <td><div align="left"></div></td>
  </tr>
  <tr>
    <td><strong>DL # </strong></td>
    <td><div align="left"><%=(Recordset1.Fields.Item("DEFENDANT_DL#").Value)%></div></td>
    <td><strong>State</strong></td>
    <td><div align="left"><%=(Recordset1.Fields.Item("DEFENDANT_DL_STATE").Value)%></div></td>
    <td><strong>SSN</strong></td>
    <td><div align="left"><%=(Recordset1.Fields.Item("DEFENDANT_SS#").Value)%></div></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><div align="left"></div></td>
    <td>&nbsp;</td>
    <td><div align="left"></div></td>
    <td>&nbsp;</td>
    <td><div align="left"></div></td>
  </tr>
  <tr>
    <td><strong>Employer</strong></td>
    <td><div align="left"></div></td>
    <td><strong>Phone</strong></td>
    <td><div align="left"></div></td>
    <td>&nbsp;</td>
    <td><div align="left"></div></td>
  </tr>
  <tr>
    <td><strong>Address</strong></td>
    <td><div align="left"></div></td>
    <td><strong>City/St/Zip</strong></td>
    <td><div align="left"></div></td>
    <td>&nbsp;</td>
    <td><div align="left"></div></td>
  </tr>
</table>
<br>
<table width="73%"  border="1">
  <tr bordercolor="#FFFF00">
    <td bordercolor="#FFFF00"><div align="center">
        <h2 align="center"><em><strong>Narrative</strong></em></h2>
    </div></td>
  </tr>
</table>
<br>
<table width="100%"  border="0" id="Narrative">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="100%"  border="0" id="Narrative">
  <tr>
    <td><a href="javascript:print()">PRINT</a></td>
  </tr>
</table>
<table border="0" width="50%" align="left">
  <tr>
    <td width="23%" align="center"><% if (MM_offset != 0) { %>
        <a href="<%=MM_moveFirst%>">First</a>
        <% } // end MM_offset != 0 %>
    </td>
    <td width="31%" align="center"><% if (MM_offset != 0) { %>
        <a href="<%=MM_movePrev%>">Previous</a>
        <% } // end MM_offset != 0 %>
    </td>
    <td width="23%" align="center"><% if (!MM_atTotal) { %>
        <a href="<%=MM_moveNext%>">Next</a>
        <% } // end !MM_atTotal %>
    </td>
    <td width="23%" align="center"><% if (!MM_atTotal) { %>
        <a href="<%=MM_moveLast%>">Last</a>
        <% } // end !MM_atTotal %>
    </td>
  </tr>
</table>
</body>
</html>
<%
Recordset1.Close();
%>
<%
WARRANT_TYPE.Close();
%>


0
 
LVL 10

Expert Comment

by:rockmansattic
ID: 11738387
OK try this,  

on line 275
<td><%=(Recordset1.Fields.Item("TYPE_CODE").Value)%> &nbsp; </td>



change to
<td><% current_var = Recordset1.Fields.Item("TYPE_CODE").Value%>
<% if (current_var = "02") then new_var = "MM"
if (current_var = "03") then new_var = "NN"
end if
%><%=(new_var)%>
</td>

This example will work when the Type_code is 02 or 03.  
duplicate the if statments as approprate.

Let me know
Rockman
0
 

Author Comment

by:NCSO
ID: 11738547
I get the followign error

Microsoft JScript compilation error '800a03ec'

Expected ';'

/citations/Copy of Untitled-3.asp, line 276

if (current_var = "02") then new_var = "MM"
-----------------------------^
0
 
LVL 10

Expert Comment

by:rockmansattic
ID: 11738581
Sorry....
try this

<td><% current_var = Recordset1.Fields.Item("TYPE_CODE").Value%>
<%
if current_var = "02" then new_var = "MM" end if
if current_var = "03" then new_var = "NN" end if

%><%=(new_var)%>
</td>
0
 

Author Comment

by:NCSO
ID: 11738596
Now I get the following:

Microsoft JScript compilation error '800a03ed'

Expected '('

/citations/Copy of Untitled-3.asp, line 276

if current_var = "02" then new_var = "MM" end if
---^
0
 
LVL 10

Expert Comment

by:rockmansattic
ID: 11738605
one more try

<td><% dim current_var = Recordset1.Fields.Item("TYPE_CODE").Value%>
<%
if (current_var = "02") then new_var = "MM" end if
if (current_var = "03") then new_var = "NN" end if

%><%=(new_var)%>
</td>
0
 

Author Comment

by:NCSO
ID: 11738618
You don't know how much i appreciate your help, still a problem:

Microsoft JScript compilation error '800a03ec'

Expected ';'

/citations/Copy of Untitled-3.asp, line 275

dim current_var = Recordset1.Fields.Item("TYPE_CODE").Value
----^


Here is what I replaced for line 275

<td><% dim current_var = Recordset1.Fields.Item("TYPE_CODE").Value%>
<%
if (current_var = "02") then new_var = "MM" end if
if (current_var = "03") then new_var = "NN" end if

%><%=(new_var)%>
</td>
0
 
LVL 10

Expert Comment

by:rockmansattic
ID: 11738647
Dont know why this doesnt work, I cant see it.  try it like this, on different lines.

<td>
<% current_var = (Recordset1.Fields.Item("TYPE_CODE").Value)%>
<%
if (current_var = "02") then
new_var = "MM"
end if
if (current_var = "03") then
new_var = "NN"
end if

%>
<%=(new_var)%>
</td>
0
 

Author Comment

by:NCSO
ID: 11738667
It still the same error.  Would it help you if I posted the recordset?  
0
 

Author Comment

by:NCSO
ID: 11738673
SELECT GETDATE()AS PRINT_DATE, (CAST(PROCESS_YEAR AS VARCHAR(4))+  '-' + CAST(PROCESS_REF_NUMBER AS VARCHAR(8))) AS REFERENCE_#, PROCESS_NO AS WARRANT_#, PROCESS_TYPE AS TYPE_CODE, PROCESS_STATUS AS STATUS_CODE, PROCESS_ISSUE_DATE_NUM AS ISSUED_DATE, PROCESS_EXP_DATE_NUM AS EXPIRES_DATE, PROCESS_DATE_MAILED_NUM AS MAILED_DATE, PROCESS_CHARGE AS CHARGE_CODE,   PROCESS_CHARGE_TEXT AS CHARGE_TEXT, PROCESS_COMMENT AS COMMENT, PROCESS_MAIL_TO AS MAIL_TO,  PROCESS_AT_DEPT AS PROCESSED_AT, PROCESS_AT_CITY AS PROCESSED_CITY, PROCESS_AT_STATE AS PROCESSED_STATE,  PROCESS_ISSUE_BY AS ISSUED_BY_CODE, PROCESS_COUNTY_ORIGIN AS COUNTY_ORIGIN_CODE, PROCESS_PLAINTIFF AS COMPLAINANT_NAME, PROCESS_ENTER_USER AS ENTERED_BY, PROCESS_START_DATE_NUM AS ENTERED_DATE,  PROCESS_SERVE_DATE_NUM AS SERVICE_DATE, PROCESS_SERVE_TYPE AS SERVICE_TYPE_CODE,  PROCESS_SERVE_OFFICER AS SERVE_OFFICER_NAME, PW_OFFICER1 AS SERVE_OFFICER_ID_#, PROCESS_UNSERVED AS RETURNED_USERVED,  PROCESS_RTC_YMD_NUM AS RTC_DATE, PROCESS_WARRANT_SIGNED AS WARRANT_SIGNED_BY_CODE,  PW_OFFICER4_DATE AS DATE_CONFINED, PROCESS_EMPLOYER AS PLACE_CONFINED, PROCESS_P_CITY AS MAGISTRATE,  PROCESS_COURT_DATE_NUM AS TRIAL_DATE, PROCESS_EMPLOYER_CITY AS COURT_OF, PROCESS_OCCUPATION AS COURT_CITY, PW_OFFICER4 AS BOUND_TYPE_CODES, PW_OFFICER3_DATE AS BOUND_AMOUNT,  PERSON_LAST AS DEFENDANT_LAST, PERSON_FIRST AS DEFENDANT_FIRST, PERSON_MIDDLE AS DEFENDANT_MIDDLE, PERSON_SUFFIX AS DEFENDANT_SUFFIX, (CAST(PERSON_DOB_MM AS VARCHAR(2)) + '/' +CAST(PERSON_DOB_DD AS VARCHAR(2)) + '/' +CAST(PERSON_DOB_YY AS VARCHAR(4))) AS DEFENDANT_DOB,  PERSON_RACE AS DEFENDANT_RACE, PERSON_SEX AS DEFENDANT_SEX, (PERSON_SS1 +'-'+PERSON_SS2+'-'+PERSON_SS3) AS DEFENDANT_SS#, (PERSON_PHONE_AC+ '-' +PERSON_PHONE_EXC+ '-' +PERSON_PHONE_LINE) AS DEFENDANT_PHONE, PERSON_HEIGHT AS DEFENDANT_HEIGHT,  PERSON_WEIGHT AS DEFENDANT_WEIGHT, PERSON_EYES AS DEFENDANT_EYES, PERSON_HAIR AS DEFENDANT_HAIR, PERSON_DL AS DEFENDANT_DL#,  PERSON_DL_ST AS DEFENDANT_DL_STATE, PERSON_STREET_ADDRESS AS DEFENDANT_ADDRESS, PERSON_CITY AS DEFENDANT_CITY,  PERSON_STREET_KEY_APT AS DEFENDANT_APT, PERSON_ST AS DEFENDANT_ST, PERSON_ZIP AS DEFENDANT_ZIP
FROM PROCESS INNER JOIN CPERSON ON (CAST(PROCESS_YEAR AS CHAR(4))+ REPLACE(STR(PROCESS_REF_NUMBER,6,0),' ','0')) =PERSON_ARR_NUMBER
WHERE PROCESS_YEAR = PERSON_YEAR AND PROCESS_REF_NUMBER = PERSON_NUMBER /*TO REPLACE WITH THE NEEDED RECORD REFERENCE YEAR AND NUMBER */ AND PERSON_PAPER = 'W' AND PERSON_TYPE = 'D' AND PROCESS_NO = 'MMColParam3'
0
 
LVL 10

Expert Comment

by:rockmansattic
ID: 11738946
Really confused.

My last code should work.

What was the error ? It couldnt have been the same.

This is really weird.

Rockman
0
 
LVL 10

Expert Comment

by:rockmansattic
ID: 11739023
ok try removing the "" form teh var

<td>
<% current_var = (Recordset1.Fields.Item("TYPE_CODE").Value)%>
<%
if (current_var = 02) then
new_var = "MM"
end if
if (current_var = 03) then
new_var = "NN"
end if

%>
<%=(new_var)%>
</td>

Just shooting in the dark at this point.  I have no probs on this side...works fine
0
 

Author Comment

by:NCSO
ID: 11739033
Microsoft JScript compilation error '800a03ec'

Expected ';'

/citations/Copy of Untitled-3.asp, line 280

end if
----^

Line 280
end if
0
 
LVL 10

Expert Comment

by:rockmansattic
ID: 11739063
jscript error??
i may have overlooked this the whole time...
But in the mean time


OK, lets try another way..replace the previous with this

<td>
<% dim this_var%>
<% this_var = (Recordset1.Fields.Item("TYPE_CODE").Value)%>
<% select case this_var
case 02
      other_var = "MM"
case 03
      other_var = "NN"
case 04
      other_var = "PP"
end select%>
<% =other_var%>
</td>
0
 

Author Comment

by:NCSO
ID: 11739090
Different error now:

Microsoft JScript compilation error '800a03ec'

Expected ';'

/citations/Copy of Untitled-3.asp, line 276

dim this_var
----^
0
 
LVL 10

Expert Comment

by:rockmansattic
ID: 11739111
does this page work without my altered code?

I have found this
http://www.kbalertz.com/Feedback_190940.aspx
about this error.
Let me look at you code again.
ill be back
Rockman
0
 

Author Comment

by:NCSO
ID: 11739128
Yes, the page generates fine.
0
 
LVL 10

Expert Comment

by:rockmansattic
ID: 11739161
I think I feel like an idiot.

try this

<td>
<% dim this_var;%>
<% this_var = (Recordset1.Fields.Item("TYPE_CODE").Value);%>
<% select case this_var
case 02
     other_var = "MM"
case 03
     other_var = "NN"
case 04
     other_var = "PP"
end select%>
<% =other_var%>
</td>
0
 

Author Comment

by:NCSO
ID: 11739229
New error:

Microsoft JScript compilation error '800a03ec'

Expected ';'

/citations/Copy of Untitled-3.asp, line 276

dim this_var;
----^
0
 
LVL 10

Expert Comment

by:rockmansattic
ID: 11739399
OK out of my scope.

try removing the '  at the end of line 13
by replaceing
Recordset1__MMColParam3.replace(/'/g, "''") + "'";
with
Recordset1__MMColParam3.replace(//g, "''") + "'";

????shooting fromt he hip.
0
 

Author Comment

by:NCSO
ID: 11739439
it just moved the error to line 14

Microsoft JScript compilation error '800a03ee'

Expected ')'

/citations/Copy of Untitled-3.asp, line 14

Recordset1.CursorType = 0;
-------------------------^

This project has been a pain since day one.
0
 
LVL 10

Expert Comment

by:rockmansattic
ID: 11739484
Let me look over it awhile.
It has me baffled alittle.
one things is your comments.  they are not correct

// is not comment in asp
<!--   this is a comment -->
Dont think this is the prob, but fyi

Ill get back
rockman
0
 

Author Comment

by:NCSO
ID: 11739530
Thanks for the bit of info regarding comments.  I will remove them.  I want to thank you for your help so far and hope we can continue.  Unfortunately the Sheriff mandates that I leave for the day and I will return on Monday.

Once again, THANKS
0
 
LVL 10

Accepted Solution

by:
rockmansattic earned 200 total points
ID: 11739541
ill see what I can do.

why is the replace function used thisway?  I dont know this syntax, what is the //g for on line 13?

replace with this (just to see)
AND PROCESS_NO = '"+ Replace(Recordset1__MMColParam3, "'","''") + "'";
rockman

0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question