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.
Expand|Select|Wrap|Line Numbers
- <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))%> <%=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> </td>
- <td colspan="7"><label><em>Credit Reason:</em>
- <% Response.Write(objRS(5)) %></label></td></tr>
- <tr><td> </td>
- <td colspan="7"><label><em>Notes:</em>
- <% Response.Write(objRS(6)) %></label></td></tr>
- <tr><td> </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
- %>
- <% .....%>
jai