Click to See Complete Forum and Search --> : Formating


achat
04-04-2003, 01:19 AM
i have 4 columns from a database which need to be displayed on the screen.

salesman salesvolume value
john 100 150
jackson 110 120
jack 200 250

salesman salesvolume value
john 100 150
jackson 110 120
jack 200 250

since the data in each row is of diferent size. How do i do this.

gerjan
04-04-2003, 02:24 AM
You must combinate ASP with HTML in a loop:

for example:
---

<%while not objRS.eof%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>salesman</td>
<td>salesvolume</td>
<td>value </td>
</tr>
<tr>
<td><%=salesman%></td>
<td><%salesvolume%></td>
<td><%value%></td>
</tr>
</table>
<%
objRS.movenext
wend
%>

---

achat
04-04-2003, 04:04 AM
gerjan

thanx, that helped. one more point before we close: is it possible to define the size of the table in absolute terms ie row height/column width etc. rather than having it dynamically change based on the data?

gerjan
04-04-2003, 04:22 AM
You mean just in HTML?

example:
<table width="300" height="300" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="100" height="100">&nbsp;</td>
<td width="100" height="100">&nbsp;</td>
<td width="100" height="100">&nbsp;</td>
</tr>
<tr>
<td width="100" height="100">&nbsp;</td>
<td width="100" height="100">&nbsp;</td>
<td width="100" height="100">&nbsp;</td>
</tr>
<tr>
<td width="100" height="100">&nbsp;</td>
<td width="100" height="100">&nbsp;</td>
<td width="100" height="100">&nbsp;</td>
</tr>
</table>

achat
04-04-2003, 06:25 AM
Thankx