Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    TLB
    TLB is offline
    New to the CF scene
    Join Date
    May 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Cannot line up table grid in repeat section that contains a table

    Hi I am making some changes to some existing code that I inherited that pulls information from an access database based on results from a drop down list.

    I have a repeated section that contains a table.


    Code:
    <!--#include virtual="/policy/includes/DelegationHeader.asp" -->
       
          
    <table width="620" border="1" cellspacing="2" cellpadding="1">
            <tr>
              <td width="65" align="left"valign="top" class="articletitle"><span class="style4"><strong>Employee ID</strong></span></td>
              <td width="140"align="left" valign="top" class="normaltextunleaded"><strong>Name</strong></td>
              <td width="160" align="left"valign="top" class="normaltextunleaded">Licence Type</td>
              <td width="60" align="left"valign="top" class="normaltextunleaded">Status</td>
              <td width="60" align="left"valign="top" class="normaltextunleaded">Date of Expiry</td>
      </tr>
    </table>
    <% 
    While ((Repeat1__numRows <> 0) AND (NOT rsDelegationResults.EOF)) 
    %>
      <table width="620" border = "1" cellspacing="2" cellpadding="1">
        <td width="65" align="left" valign="top" ><%=(rsDelegationResults.Fields.Item("ID_NUMBER").Value)%></td>
        <td width="140" align="left" valign="top" nowrap="nowrap"><%=(rsDelegationResults.Fields.Item("Qual_Surname").Value)%>, <%=(rsDelegationResults.Fields.Item("Qual_Given_Name").Value)%></td>
      <td width="160" align="left" valign="top" nowrap="nowrap"><%=(rsDelegationResults.Fields.Item("LicenseQualName").Value)%></td>
    <td width="60" align="left" valign="top" nowrap="nowrap"><%=(rsDelegationResults.Fields.Item("Status Type").Value)%></td>
    <td width="60" align="left" valign="top" nowrap="nowrap"><%=(rsDelegationResults.Fields.Item("Expiry date").Value)%></td> 
      </tr>
    </table>
    <% 
      Repeat1__index=Repeat1__index+1
      Repeat1__numRows=Repeat1__numRows-1
      rsDelegationResults.MoveNext()
     
    Wend%>
    
    <p>
        <!--#include virtual="/policy/includes/PolicyFooter.asp" -->
        <%rsDelegationResults.Close()
    Set rsDelegationResults = Nothing
    %>
    I get the correct results however when displaying the results in the table I cannot get the grid lines on the columns to line up correctly.

    The problem seems to be with the date fields where a day or month does not have a leading zero.

    Here is a sample of the output:

    9299 Brown, George First Aid - Senior Current 3/05/2009
    9970 Peters, Jon First Aid - Senior Current 19/07/2011
    9559 Smith, Steven First Aid - Senior Current 16/09/2011

    See attached print screen of how output looks with grids.

    Any advice on how to fix this problem would be appreciated.

    Many thanks

    TLB
    Attached Thumbnails Attached Thumbnails Cannot line up table grid in repeat section that contains a table-printscreen.jpg  


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •