Skip Navigation LinksHome Page > Forums > SpiraTeam Forums > Spira Custom Reports > Simple project membership...
Hi,
For the regulatory purposes I was asked to create a custom report for products to show membership. The report should be in a very simple format:
As no such report is available (my life would be so much easier if Product Membership page had "Print" button!), I had to create it with help of Claude.AI:Standard section: Project Overview
<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"> <xsl:template match="/ProjectData/Project"> <div class="Title1"> <xsl:value-of select="Name"/> </div> <p> <xsl:value-of select="Description" disable-output-escaping="yes"/> </p> </xsl:template> </xsl:stylesheet>
Then in Custom section:
Query:
SELECT (US.LAST_NAME + '. ' + US.FIRST_NAME) AS MemberName, PM.PROJECT_ROLE_NAME AS AccessLevel FROM SpiraTestEntities.R_ProjectMembership AS PM INNER JOIN SpiraTestEntities.R_Users AS US ON US.USER_ID = PM.USER_ID WHERE US.IS_ACTIVE = True AND PM.PROJECT_ID = ${ProjectId} ORDER BY US.LAST_NAME, US.FIRST_NAME
And XSLT:
<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"> <xsl:template match="/RESULTS"> <table class="DataGrid"> <tr> <th>Member</th> <th>Access Level</th> </tr> <xsl:for-each select="ROW"> <tr> <td><xsl:value-of select="MemberName"/></td> <td><xsl:value-of select="AccessLevel"/></td> </tr> </xsl:for-each> </table> </xsl:template> </xsl:stylesheet>
This produced the report.
Now, if only I could get rid of the report name in the output...
And if you have any questions, please email or call us at +1 (202) 558-6885