Displaying Subform records in HTML View
I am trying to display all the subform records that are submitted on the within a single entry of the parent form in a HTML view.
My code is below, I cannot seem to get the loop right. It is only showing a single entry on the HTML page.
- htmlpage Call_in_Report_HTML(ID, Id1)
- displayname = "Call_In_Report_HTML"
- print = true
- pdf = true
- content
- <%{%>
- <div style="width:95%; margin:0 auto;">
- <%a = Call_in_report_new [ID == input.Id1.toLong()];
- for each a in Call_in_report_new [ID == input.Id1.toLong()]
- {%>
- <h1 style="margin:0px; padding:0px; text-indent:10px; border-bottom:1px solid #000; padding-bottom:5px; text-transform: uppercase">Call in Report Date: <%=a.Todays_Date%></h1>
- <table border="1" width="100%" cellspacing="0" cellpadding="5">
- <tr>
- <td width="55%" style="background-color:#ccc;"><strong>Truck:</strong></td>
- <td width="45%" style="background-color:#ccc;"><%=a.details.Truck%></td>
- </tr>
- <tr>
- <td style="background-color:#eee;" ><strong>On Schedule:</strong></td>
- <td ><%=a.details.On_Schedule%></td>
- </tr>
- <tr>
- <td style="background-color:#eee;" ><strong>Departure:</strong></td>
- <td ><%=a.details.Departure%></td>
- </tr>
- <tr>
- <td style="background-color:#eee;"><strong>Carrier</strong></td>
- <td><%=a.details.Carrier%></td>
- </tr>
- <tr>
- <td style="background-color:#eee;" ><strong>Call in Location</strong></td>
- <td><%=a.details.Location%></td>
- </tr>
- <tr>
- <td style="background-color:#eee;"><strong>Mush Pallets Shipped</strong></td>
- <td><%=a.details.Mush_Pallets%></td>
- </tr>
- <tr>
- <td style="background-color:#eee;"><strong>Freight Pallets Shipped</strong></td>
- <td><%=a.details.Freight_Pallets%></td>
- </tr>
- <tr>
- <td style="background-color:#eee;"><strong>Total Pallets Shipped</strong></td>
- <td><%=a.details.Total_Pallets%></td>
- </tr>
- <tr>
- <td style="background-color:#eee;"><strong>Comments:</strong></td>
- <td><%=a.details.Comments%></td>
- </tr>
- </table>
- <%}
- }%>