ASP doubt

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jai80
    New Member
    • Nov 2006
    • 30

    ASP doubt

    hi frenz,

    I have created an asp page to display data from a table in my database(sql server). I have a problem here, I want to display those records satisfying the condition in my where clause, where-in,two columns of the table will not have value for certain records. Now, i dont want to show those two column headings in my asp page, only for those records which doesnot have value for those two columns, but the rest of the data should get displayed for tht data,and all the records satisying my query. Its urgent, any help will be appreciated. Thanks in advance. I am providing with code snippet of my asp page, for reference...

    The two column headings i'm referring to in my problem st' are: Notes and Rejection Reason. Refer the code.

    Code:
    <td align="left" valign="top"><table width="692" border="0" cellspacing="0" cellpadding="4">
                        
    					<tr align="left" valign="top"> 
                          <td width="56" height="20" class="blacksubtitle">CRID</td>
                          <td width="104" height="20" class="blacksubtitle">Date</td>
                          <td width="76" height="20" class="blacksubtitle">GFS Order ID</td>
                          <td width="60" height="20" class="blacksubtitle">Markys ID</td>
                          <td width="55" height="20" class="blacksubtitle">Amount</td>
    					  <td width="81" class="blacksubtitle"></td>
    					  <td width="111" class="blacksubtitle"></td>
                          <td width="85" class="blacksubtitle"></td>
                        </tr>
    					<%if cntofrecords>0 then %>
                        					<% Do While NOT objRS.EOF %>
                        <tr align="left" valign="top"> 
    					
                          <td width="56" height="36"><% Response.Write(objRS(0)) %></td>
        <td width="104" height="36"><%=month(objRS(1))%>/<%=day(objRS(1))%>&nbsp;<%=FormatDateTime(objRS(1), 3)%>
    	<% 'Response.Write(objRS(1)) %></td>
        <td width="76" height="36"><% Response.Write(objRS(2)) %></td>
        <td width="60" height="36"><% Response.Write(objRS(3)) %></td>
        <td width="55" height="36"><% Response.Write(FormatCurrency(objRS(4))) %></td>
    	
                    <form name="form2" method="post" action="ApprovedPage.asp">
                    <td width="81" height="36"> <input type="hidden" name="credit_request_id" value="<%=objRS("Credit_Request_ID")%>"> 
                    <input name="btnApprove" type="submit" id="btnApprove" value="Approve" class="button10"/>
                    </td>
                    </form>
    				
                          <form name="form3" method="post" action="RequestInfoPage.asp">
                            <td width="111"> 
                              <input type="hidden" name="credit_request_id" value="<%=objRS("Credit_Request_ID")%>">
                              <input name="btnRequestinfo" type="submit" id="btnRequestinfo" value="Request Info" class="button14"/>
                            </td>
                          </form>
    					  
    					     <form name="form4" method="post" action="RejectedPage.asp">
                            <td width="85"> 
                              <input type="hidden" name="credit_request_id" value="<%=objRS("Credit_Request_ID")%>"> 
                             <input name="btnReject" type="submit" id="btnReject" value="Reject" class="button10"/>
                            </td>
                          </form>
                        </tr>
                        
                        <tr align="left" valign="top"> 
                        <tr><td>&nbsp;</td>
      <td colspan="7"><label><em>Credit Reason:</em> 
          <% Response.Write(objRS(5)) %></label></td></tr>
      <tr><td>&nbsp;</td>
      <td colspan="7"><label><em>Notes:</em> 
          <% Response.Write(objRS(6)) %></label></td></tr>
      <tr><td>&nbsp;</td>
      <td colspan="7"><label><em>Rejection Reason:</em> 
          <% Response.Write(objRS(7)) %></label></td></tr>
    	  
    <% 
    objRS.MoveNext
    Loop
    ' close and kill our objects
    'objRS.Close: Set objRS = Nothing
    'objConn.Close: Set objConn = Nothing
    else
    %>
    <% .....%>
    Cheers,
    jai
  • jai80
    New Member
    • Nov 2006
    • 30

    #2
    Hi frenz,

    In continuation to my latest submission of my asp doubt today, i wanted to update the group, that i have solved the problem.

    I take this opportunity to extend my appreciation and sincere thanks to all the group members for solving the doubts of other members in various platforms, for the timely help and for keeping the group updated with latest infoz in IT.
    Gud Work & Best Wishes!

    Cheers,
    jai


    Originally posted by jai80
    hi frenz,

    I have created an asp page to display data from a table in my database(sql server). I have a problem here, I want to display those records satisfying the condition in my where clause, where-in,two columns of the table will not have value for certain records. Now, i dont want to show those two column headings in my asp page, only for those records which doesnot have value for those two columns, but the rest of the data should get displayed for tht data,and all the records satisying my query. Its urgent, any help will be appreciated. Thanks in advance. I am providing with code snippet of my asp page, for reference...

    The two column headings i'm referring to in my problem st' are: Notes and Rejection Reason. Refer the code.

    Code:
    <td align="left" valign="top"><table width="692" border="0" cellspacing="0" cellpadding="4">
                        
    					<tr align="left" valign="top"> 
                          <td width="56" height="20" class="blacksubtitle">CRID</td>
                          <td width="104" height="20" class="blacksubtitle">Date</td>
                          <td width="76" height="20" class="blacksubtitle">GFS Order ID</td>
                          <td width="60" height="20" class="blacksubtitle">Markys ID</td>
                          <td width="55" height="20" class="blacksubtitle">Amount</td>
    					  <td width="81" class="blacksubtitle"></td>
    					  <td width="111" class="blacksubtitle"></td>
                          <td width="85" class="blacksubtitle"></td>
                        </tr>
    					<%if cntofrecords>0 then %>
                        					<% Do While NOT objRS.EOF %>
                        <tr align="left" valign="top"> 
    					
                          <td width="56" height="36"><% Response.Write(objRS(0)) %></td>
        <td width="104" height="36"><%=month(objRS(1))%>/<%=day(objRS(1))%>&nbsp;<%=FormatDateTime(objRS(1), 3)%>
    	<% 'Response.Write(objRS(1)) %></td>
        <td width="76" height="36"><% Response.Write(objRS(2)) %></td>
        <td width="60" height="36"><% Response.Write(objRS(3)) %></td>
        <td width="55" height="36"><% Response.Write(FormatCurrency(objRS(4))) %></td>
    	
                    <form name="form2" method="post" action="ApprovedPage.asp">
                    <td width="81" height="36"> <input type="hidden" name="credit_request_id" value="<%=objRS("Credit_Request_ID")%>"> 
                    <input name="btnApprove" type="submit" id="btnApprove" value="Approve" class="button10"/>
                    </td>
                    </form>
    				
                          <form name="form3" method="post" action="RequestInfoPage.asp">
                            <td width="111"> 
                              <input type="hidden" name="credit_request_id" value="<%=objRS("Credit_Request_ID")%>">
                              <input name="btnRequestinfo" type="submit" id="btnRequestinfo" value="Request Info" class="button14"/>
                            </td>
                          </form>
    					  
    					     <form name="form4" method="post" action="RejectedPage.asp">
                            <td width="85"> 
                              <input type="hidden" name="credit_request_id" value="<%=objRS("Credit_Request_ID")%>"> 
                             <input name="btnReject" type="submit" id="btnReject" value="Reject" class="button10"/>
                            </td>
                          </form>
                        </tr>
                        
                        <tr align="left" valign="top"> 
                        <tr><td>&nbsp;</td>
      <td colspan="7"><label><em>Credit Reason:</em> 
          <% Response.Write(objRS(5)) %></label></td></tr>
      <tr><td>&nbsp;</td>
      <td colspan="7"><label><em>Notes:</em> 
          <% Response.Write(objRS(6)) %></label></td></tr>
      <tr><td>&nbsp;</td>
      <td colspan="7"><label><em>Rejection Reason:</em> 
          <% Response.Write(objRS(7)) %></label></td></tr>
    	  
    <% 
    objRS.MoveNext
    Loop
    ' close and kill our objects
    'objRS.Close: Set objRS = Nothing
    'objConn.Close: Set objConn = Nothing
    else
    %>
    <% .....%>
    Cheers,
    jai

    Comment

    Working...