This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SUPPORT Q&A - BOM does not print reference designators

rrice - Thursday, June 3, 2010 9:54 AM:

How do I get the reference designators to print on the BOM?



RobMcAveney - Friday, June 4, 2010 10:15 AM:

That particular report is in need of some updates and simplification.  Instead of trying to edit it, the easiest way is probably to just create a new report and disable the existing one.  Create a new Report item as below:

Cut/paste this into the Report Query field:

<Item type="Part" action="GetItemRepeatConfig" select="item_number,name" id="{@id}">
 <Relationships>
  <Item type="Part BOM" repeatProp="related_id" repeatTimes="0" select="quantity,reference_designator,related_id(item_number,name)"/>
 </Relationships>
</Item>

Then click on the Stylesheet tab and cut/paste this:

<xsl:stylesheet version="1.0" xmlns:xsl="www.w3.org/.../Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:aras="www.aras-corp.com">
  <xsl:output method="html" omit-xml-declaration="yes" standalone="yes" indent="yes"></xsl:output>

  <xsl:template match="/">
    <html>
     <style>
      table {empty-cells:show; border-collapse:collapse;}
      th {border:1px #000000 solid; font-family:Helvetica; font-size:8pt; font-weight:bold; text-align:center; background-color:#CCCCCC; padding:2px;}
      td {border:1px #000000 solid; font-family:Arial; font-size:8pt; padding-left:5px; padding-right:5px;}
     </style>

     <table>
      <tr><td colspan="10" style="border-width:0"><img src="../images/Logos/aras_logo.gif" height="80"/></td></tr>
      <tr>
       <td colspan="8" style="border-width:0; font-family:helvetica;font-size:15pt; color:#DA1943; padding:2px">Bill of Materials Report</td>
       <td colspan="2" style="border-width:0; font-family:helvetica;font-size:10pt; text-align: right; padding:2px">Generated on:              <script>function m00(r, n){r += ""; if (!n) n = 2; while(r.length &lt; n){r = "0" + r;} return r;} var dt = new Date(); var a = top.opener.top.aras; if (a){var s = m00(dt.getUTCFullYear(),4)+"-"+m00((dt.getUTCMonth()+1))+"-"+m00(dt.getUTCDate())+"T"+m00(dt.getUTCHours())+":"+m00(dt.getUTCMinutes())+":"+m00(dt.getUTCSeconds()); s = a.IomInnovator.GetI18NSessionContext().ConvertUtcDateTimeToNeutral(s, "yyyy-MM-ddTHH:mm:ss"); s = a.convertFromNeutral(s, "date", "short_date"); document.write(s);}</script></td>
      </tr>
      <tr>
       <th colspan="6">Indenture Level</th>
       <th>Part Number</th>
       <th>Name</th>
       <th>Quantity</th>
       <th>Reference Designator</th>
      </tr>
      <xsl:apply-templates select="//Item[@type='Part']"/>
     </table>
    </html>
   </xsl:template>
 
   <xsl:template match="Item">
    <tr>
     <td width="20" style="text-align:center"><xsl:if test="count(ancestor::Relationships)=0">0</xsl:if></td>
     <td width="20" style="text-align:center"><xsl:if test="count(ancestor::Relationships)=1">1</xsl:if></td>
     <td width="20" style="text-align:center"><xsl:if test="count(ancestor::Relationships)=2">2</xsl:if></td>
     <td width="20" style="text-align:center"><xsl:if test="count(ancestor::Relationships)=3">3</xsl:if></td>
     <td width="20" style="text-align:center"><xsl:if test="count(ancestor::Relationships)=4">4</xsl:if></td>
     <td width="20" style="text-align:center"><xsl:if test="count(ancestor::Relationships)=5">5</xsl:if></td>
     <td width="100"><xsl:value-of select="item_number"/></td>
     <td width="200"><xsl:value-of select="name"/></td>
     <td width="75" style="text-align:center"><xsl:value-of select="../../quantity"/></td>
     <td width="150"><xsl:value-of select="../../reference_designator"/></td>
    </tr>
   </xsl:template>

</xsl:stylesheet>

Click the Apply button (at the bottom), then the Save button (on the top toolbar).  Next, open the Part ItemType and attach your new Report to it on the Reports tab and save.  You should then get a "BOM with RefDes" option on the Reports menu for Parts.



rrice - Tuesday, September 14, 2010 4:10 PM:

This did the trick.  Thanks.