Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
I have the following in a report recipe:
<!-- Walk doc -->
<%beginrelationshipsdetail Query[(walkdocordered[<%<%builtin ID%>%>])]%>
<!-- Walk relationship to find STO -->
<%beginrelationshipsdetailL2 Verified By%><%filter%>(field[Category] = "MOP Eval Criteria")<%endfilter%>
<%beginrelationshipsdetailL3 Query[(walk[<%builtin Contained By%>]<%RelationshipL2 <%builtin ID%>%>)]%><%filter%>(field[Category] = "STO")<%endfilter%>
<%relationshipgroupby <%RelationshipL3 ID%>%>
<tr>
<td> </td>
</tr>
<%endrelationshipgroup%>
<%endrelationshipsdetailL3%>
<%endrelationshipsdetailL2%>
<%endrelationshipsdetail%>
The relationshipgroupby never seems to do anything. It's not even processed when I run the report. The tags still stay as-is in the output html. I want to group the items returned in the L3 query. How do I make this work?
Solved! Go to Solution.
Since you are in Level 3 i think you need to set the correct Level. Also, you can't use <%RelationshipL3 ID%> in that context. You group by field(name) and what you are doing is inserting a specific id.
You can either do it as below (select the group by field in the Report Wizard) or set the Fieldname directly.
<%relationshipgroupbyL3 &groupby%>
......
<%endrelationshipgroupL3%>
Regards,
Dominik
Since you are in Level 3 i think you need to set the correct Level. Also, you can't use <%RelationshipL3 ID%> in that context. You group by field(name) and what you are doing is inserting a specific id.
You can either do it as below (select the group by field in the Report Wizard) or set the Fieldname directly.
<%relationshipgroupbyL3 &groupby%>
......
<%endrelationshipgroupL3%>
Regards,
Dominik
When I do that, it does seem to process it but the report is blank. Any idea what that might indicate?
Here's where I'm at now. Nothing comes out at the L3 level.
<%begindetail%>
<table>
<tr>
<th>Category</th>
<th>DOORS ID</th>
<th>External ID</th>
<th>Description</th>
<th>Section</th>
<th>Test Objective</th>
</tr>
<!-- Walk doc -->
<%beginrelationshipsdetail Query[(walkdocordered[<%<%builtin ID%>%>])]%>
<!-- Get Eval Criteria -->
<%beginrelationshipsdetailL2 Verified By%><%filter%>(field[Category] = "MOP Eval Criteria")<%endfilter%>
<%beginrelationshipsection none%>
<tr>
<td><%Relationship Category%></td>
<td><%Relationship DOORS ID%></td>
<td><%Relationship External ID%></td>
<td><%Relationship Text%></td>
<td></td>
<td></td>
<tr>
<%endrelationshipsection%>
<!-- Walk relationship to find STO -->
<%beginrelationshipsdetailL3 Query[((walk[<%builtin Contained By%>]<%RelationshipL2 <%builtin ID%>%>))]%><%filter%>(field[Category] = "STO")<%endfilter%>
<!-- THIS ISN'T WORKING -->
<%relationshipgroupbyL3 ID+%>
<tr>
<td>Category</td>
<td>DOORS ID</td>
<td>External ID</td>
<td>Text</td>
<td>Section</td>
<td><%groupvalue%></td>
</tr>
<%endrelationshipgroupL3%>
<!-- THIS ISN'T WORKING -->
<%endrelationshipsdetailL3%>
<%endrelationshipsdetailL2%>
<%endrelationshipsdetail%>
</table>
<%enddetail%>
Hi Nolin,
I responded in the Support case you had logged for this as well, but I see you have this posted in the Community as well, so I'll respond here too, in case you see it sooner, or if anyone else is curious:
It seems the relationshipgroupby tags go before (or after) the fields that are iterated. If you surround the fields with the begin and end tags, then the iterated fields are not displayed (what you see).
But if you do it this way, then you should get what you are looking for:
Change:
ex.
<!-- THIS ISN'T WORKING -->
<%relationshipgroupbyL3 ID+%>
<tr>
<td><%Relationship Category%></td>
<td><%Relationship DOORS ID%></td>
<td><%Relationship External ID%></td>
<td><%Relationship Text%></td>
<td><%RelationshipL3 Section #%></td>
<td><%RelationshipL3 Text%></td>
</tr>
<!-- THIS ISN'T WORKING -->
<%endrelationshipgroupL3%>
To be:
<%relationshipgroupbyL3 ID+%>
<%endrelationshipgroupL3%>
<tr>
<td><%Relationship Category%></td>
<td><%Relationship DOORS ID%></td>
<td><%Relationship External ID%></td>
<td><%Relationship Text%></td>
<td><%RelationshipL3 Section #%></td>
<td><%RelationshipL3 Text%></td>
</tr>
This works for us.