Aras 11 SP10
Good day all. I am trying to create a report that will pull all of the attached items from a document. I have a method that will get the information, but I can't get it to output correctly for the report (can't figure out the correct Stylesheet format). At the moment the method is referencing a single document by the ID number, but I will change this to cover a lot of the documents. I need a single line per related item, with the following fields (I will need to add more fields when this is working).
Document ID
Document Name
Related ID
Related Name
When I run the report all of the related_id information is crammed into the Related ID cell. The Document ID cells will include the related_id number & the id number of the Relationship tab. Any help would be appreciated. Thank you.
Stylesheet
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:aras="http://www.aras-corp.com"> <xsl:output method="html" omit-xml-declaration="yes" standalone="yes" indent="yes" cdata-section-elements="script msxsl:script"></xsl:output> <xsl:template match="/"> <html> <head></head> <style type="text/css" userData="Global"> .cellSolidRightBottom { border-right:1px #000000 solid; border-bottom:1px #000000 solid; } .cellSolidRight { border-right:1px #000000 solid; } .cellHeader { background-color:#CCCCCC; border-top:1px #000000 solid; border-right:1px #000000 solid; border-bottom:1px #000000 solid; padding:2px; text-align:center; text-transform:capitalize; text-align:center; font-family:helvetica; font-weight:bold; font-size:8pt; } </style> <body topmargin="50" leftmargin="50"> <table border="0" cellspacing="0" cellpadding="0" width="670"> <tr> <td width="260"></td> <td width="130"></td> <td width="130"></td> <td width="260"></td> <td width="130"></td> <td width="130"></td> <tr valign="top"> <td align="left" uniqueID="ms_id77" colspan="6"> </td> </tr> </tr> <tr valign="bottom"> <td colspan="6" style="font-family:helvetica;font-size:15pt;color:#DA1943;padding:2px;" align="left" uniqueID="ms_id79">Parts List BOM Info</td> </tr> <tr valign="bottom"> <td colspan="6" style="font-family:helvetica;font-size:10pt;padding:2px;" align="left" uniqueID="ms_id80"> Generated on: <base id="ms_id81"/> <script>var d = new Date(); var months = ["January","February","March","April","May","June","July","August","September","October","November","December"]; document.getElementById("ms_id81").innerHTML = d.getDate()+" "+months[d.getMonth()]+" "+d.getFullYear(); </script> </td> </tr> <tr> <td class="cellHeader" uniqueID="ms_id100" style="border-left:1px #000000 solid;">Parts List ID</td> <td class="cellHeader" uniqueID="ms_id101">Parts List Number</td> <td class="cellHeader" uniqueID="ms_id102">Parts List Name</td> <td class="cellHeader" uniqueID="ms_id103">Related ID</td> <td class="cellHeader" uniqueID="ms_id104">Related Number</td> <td class="cellHeader" uniqueID="ms_id105">Related Name</td> </tr> <xsl:apply-templates mode="ORPH" select="//Item"> </xsl:apply-templates> </table> </body> <script src="../../javascript/PopupMenu.js"></script> <script src="../../javascript/PopupMenu.js"></script> </html> </xsl:template> <xsl:template mode="ORPH" match="//Item"> <tr> <td class="cellSolidRightBottom" uniqueID="ms_id92" align="left" style="border-left:1px #000000 solid;"> <xsl:value-of select="id"></xsl:value-of> </td> <td class="cellSolidRightBottom" uniqueID="ms_id92" align="left" style="border-left:1px #000000 solid;"> <xsl:value-of select="item_number"></xsl:value-of> </td> <td class="cellSolidRightBottom" uniqueID="ms_id92" align="left" style="border-left:1px #000000 solid; word-wrap:break-word"> <xsl:value-of select="name"></xsl:value-of> </td> <td class="cellSolidRightBottom" uniqueID="ms_id92" align="left" style="border-left:1px #000000 solid;"> <xsl:value-of select="//related_id/Item[@id]"></xsl:value-of> </td> <td class="cellSolidRightBottom" uniqueID="ms_id92" align="left" style="border-left:1px #000000 solid;"> <xsl:value-of select="//related_id/Item[@item_number]"></xsl:value-of> </td> <td class="cellSolidRightBottom" uniqueID="ms_id92" align="left" style="border-left:1px #000000 solid;"> <xsl:value-of select="//related_id/Item[@id]"></xsl:value-of> </td> </tr> </xsl:template> </xsl:stylesheet> |