Hello,
Here's the scenario,
Following Table is i am trying to achieve in page using searchString:
Design No.: Shade No.: Quantity:
55830 250 100.00
56459 Blue 50.00
But i am getting the result as follows:
Design No.:
| Shade No.:
| Quantity:
|
|---|
56459
| Blue
| 50.00
|
55830
| 250
| 50.00
|
55830
| 250
| 100.00
|
Following is the code i used:
- <%{
- Table = "<head><style>table {font-family: arial,sans-serif;border-collapse: collapse;width: 2px;}td, th {border: 1px solid #dddddd;border: 1px solid black;text-align: left;padding: 8px;}tr:nth-child(even) {background-color: #dddddd;}</style></head><body><table><tr><th>Design No.:</th><th>Shade No.:</th><th>Quantity:</th></tr>";
- total = 0.0;
- fet_fabric = Fabric_Stock_Report[Order_No == input.orderNo];
- for each rec in fet_fabric
- {
- total = total + rec.Inward_Quantity;
- Table = Table + "<tr><td>" + rec.Design_No1.Design_No + "</td><td>"+ rec.Shade_No1.Shade_No + "</td><td>" + total + "</td></tr>";
- }
- Table = Table + "</table></body>";
- %>
- <%=Table%>
- <%
- }%>
I dont the duplication of values.
is that possible?