VS 2008 Pro.
I'm writing an html report using LINQ to XML by accesing a datatable that I
filled with data.
the output is currently like this:
<html>
....
<table>
....
<tbody>
<%= From o In dt _
Select <tr>
<td><%= o.Field(Of
String)("Descri ption") %></td>
<td><%= o.Field(Of
Int32)("Itemnum ") %></td>
<td><%= o.Field(Of
String)("Name") %></td>
<td style="text-align:
right;"><%= o.Field(Of Int32)("OrderCo unt").ToString( "N0") %></td>
<td style="text-align:
right;"><%= o.Field(Of Int64)("PacketT otal").ToString ("N0") %></td>
<td style="text-align:
right;"><%= o.Field(Of Decimal)("Total Sold").ToString ("N2") %></td>
</tr%>
</tbody>
</table>
</html>
I want to insert a new row <tr><td>... each time the field "Descriptio n"
changes and subtotal the "OrderCount ", "Packettota l" and "TotalSold" fields.
I can't seem to find anything on Google, but it's probably just because I
don't know the proper question.
Can someone offer a sample or point me to some instructions?
Thanks,
Rick
I'm writing an html report using LINQ to XML by accesing a datatable that I
filled with data.
the output is currently like this:
<html>
....
<table>
....
<tbody>
<%= From o In dt _
Select <tr>
<td><%= o.Field(Of
String)("Descri ption") %></td>
<td><%= o.Field(Of
Int32)("Itemnum ") %></td>
<td><%= o.Field(Of
String)("Name") %></td>
<td style="text-align:
right;"><%= o.Field(Of Int32)("OrderCo unt").ToString( "N0") %></td>
<td style="text-align:
right;"><%= o.Field(Of Int64)("PacketT otal").ToString ("N0") %></td>
<td style="text-align:
right;"><%= o.Field(Of Decimal)("Total Sold").ToString ("N2") %></td>
</tr%>
</tbody>
</table>
</html>
I want to insert a new row <tr><td>... each time the field "Descriptio n"
changes and subtotal the "OrderCount ", "Packettota l" and "TotalSold" fields.
I can't seem to find anything on Google, but it's probably just because I
don't know the proper question.
Can someone offer a sample or point me to some instructions?
Thanks,
Rick
Comment