Customized conditional reports
I'm currently trying to loop with a customized HTML report through my document and format the elements depending on their category.
I start with a query and loop through the hierarchy with relationshipsdetail (displayed only until Level 2 below). What I need is the red
part of the report, i.e. how to differentiate between the elements once I found one. If I put the field[Category] within the filter, sorting by
section does not properly work.
This is how it looks like:
<%beginrelationshipsdetail Query[ ( (item.segment) and ( (field[ID] = <%<%builtin ID%>%>) or (walk[<%builtin Contained By%>] <%<%builtin ID%>%>) ) ) ]%>
<!-- we are the top segment -->
<%beginrelationshipsdetailL2 <%builtin References%>.Always follow, <%builtin Contains%>%><%filter%>((item is segment) or (item is node))<%endfilter%>
if (field[Category] = "Comment")
//do something
if (field[Category] = "Architectural Element")
//do something
if (field[Category] = "Heading")
//do something
<%endrelationshipsdetailL2%>
<%endrelationshipsdetail%>
I'd appreciate if anyone would share an idea how to distinguish the different elements.
- Markus

