We are building an event attendee list and for this particular version, we want to show a parent company's sub-companies, with attendees for each sub-company listed below the subcompany name. Something like:
Attendees for A Company
What is the most efficient way to build this? In previous instances of addressing anything like this, we have known the number of subcompanies and coded accordingly, but for this project, some of the overall companies will have many sub-companies and some will have none.
We have put together code that renders a sub-company and it's employees:
While ((Repeat2__numRows <> 0) AND (NOT companydetailResult.EOF))
<td><%=(companydetailResult.Fields.Item("first_name").Value)%> <%=(companydetailResult.Fields.Item("last_name").Value)%>, <%=(companydetailResult.Fields.Item("title").Value)%></td>
The query that gives us the info is
"SELECT parent_org_name, org_name, first_name, last_name, title FROM dbo.DB_Registrants WHERE parent_org_id = ? ORDER BY last_name ASC"
But we are kind of stumped on how to wrap the loop above to parse through each of the sub-companies (org_name).
All suggestions are greatly appreciated!