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

APPLICATION - PRODUCT ENGINEERING - How to extend the BOM report to include ManufParts ?

rolfl - Monday, October 20, 2008 1:54 PM:

Hi,

how hard would it be to extetnd the standard report "MultiLevel BOM" ? To a format like this

IndentureLevel | Part Number | Rev | Name    | Qty  | AML-PrefStatus | Manufacturer | Manufacturer Part

(if multiple manufacturer parts are assigned then list them in subsequent rows starting with the AML-PrefStatus )

IndentureLevel | Part Number | Rev | Name    | Qty  | AML-PrefStatus | Manufacturer | Manufacturer Part

                                                                          | AML-PrefStatus | Manufacturer | Manufacturer Part

IndentureLevel | Part Number | Rev | Name    | Qty  | AML-PrefStatus | Manufacturer | Manufacturer Part

How would I need to adapt the report's query and the XSLT ?

/Rolf



RobMcAveney - Tuesday, October 21, 2008 2:58 PM:

Hi Rolf -

Cut/paste this into the query for your report:

<Item type="Part" action="GetItemRepeatConfig" select="item_number,name" id="{@id}">
 <Relationships>
  <Item type="Part AML" select="state,related_id(item_number,manufacturer)"/>
  <Item type="Part BOM" select="sort_order,quantity,related_id" repeatProp="related_id" repeatTimes="5"/>
 </Relationships>
</Item>

And this on the Stylesheet tab:

 <xsl:stylesheet version="1.0" xmlns:xsl="">www.w3.org/.../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"></xsl:output>
 <xsl:template match="/">
  <html>
   <head></head>
   <style type="text/css" userData="Global">
    table  {empty-cells:show; border-collapse:collapse;}
    th {font-family:helvetica; font-size:8pt;  padding:2px; border:1px #000000 solid; background-color:#CCCCCC; text-transform:capitalize;}
    td {font-family:helvetica; font-size:8pt;  padding:2px; border:1px #000000 solid;}
    td.noBorder {font-family:helvetica; font-size:8pt;  padding:2px; border-width:0;}
   </style>
   <body topmargin="50" leftmargin="50">
    <table border="0" cellspacing="0" cellpadding="0" width="650">
     <tr valign="top">
      <td class="noBorder" align="left" colspan="9">
       <img src="../images/Logos/aras_logo.gif" height="80"></img>
      </td>
     </tr>
     <tr valign="bottom">
      <td class="noBorder" colspan="8" style="font-family:helvetica;font-size:15pt;color:#DA1943;padding:2px;" align="left">Bill of Materials Report</td>
      <td class="noBorder" colspan="4" style="font-family:helvetica;font-size:10pt;padding:2px;" align="right">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())+"+0000"; s = a.convertToNeutral(s, "date", "yyyy-MM-ddTHH:mm:sszzz"); 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>AML Status</th>
      <th>Manufacturer</th>
      <th>Manufacturer Part</th>
     </tr>
     <xsl:apply-templates select="//Item[@type='Part']"></xsl:apply-templates>
    </table>
   </body>
   <script src="../../javascript/PopupMenu.js"></script>
  </html>
 </xsl:template>
 <xsl:template match="Item[@type='Part']">
  <xsl:variable name="Depth" select="count(ancestor::Item[@type='Part'])"></xsl:variable>
  <xsl:variable name="rowCount">
   <xsl:choose>
    <xsl:when test="count(Relationships/Item[@type='Part AML'])=0">1</xsl:when>
    <xsl:otherwise><xsl:value-of select="count(Relationships/Item[@type='Part AML'])"></xsl:value-of></xsl:otherwise>
   </xsl:choose>
  </xsl:variable>
  <tr>
   <td rowspan="{$rowCount}" width="20px" align="center"><xsl:if test="$Depth=0">0</xsl:if></td>
   <td rowspan="{$rowCount}" width="20px" align="center"><xsl:if test="$Depth=1">1</xsl:if></td>
   <td rowspan="{$rowCount}" width="20px" align="center"><xsl:if test="$Depth=2">2</xsl:if></td>
   <td rowspan="{$rowCount}" width="20px" align="center"><xsl:if test="$Depth=3">3</xsl:if></td>
   <td rowspan="{$rowCount}" width="20px" align="center"> <xsl:if test="$Depth=4">4</xsl:if></td>
   <td rowspan="{$rowCount}" width="20px" align="center"><xsl:if test="$Depth=5">5</xsl:if></td>
   <td rowspan="{$rowCount}" width="120px"><xsl:value-of select="item_number"></xsl:value-of></td>
   <td rowspan="{$rowCount}" width="120px"><xsl:value-of select="name"></xsl:value-of></td>
   <td rowspan="{$rowCount}" width="80px" align="center">
    <xsl:choose>
     <xsl:when test="$Depth=0">1</xsl:when>
     <xsl:when test="$Depth!=0 and (../../quantity)=''">1</xsl:when>
     <xsl:otherwise><xsl:value-of select="../../quantity"></xsl:value-of></xsl:otherwise>
    </xsl:choose>
   </td>
   <td width="100px"><xsl:value-of select="Relationships/Item[@type='Part AML'][1]/state"></xsl:value-of></td>
   <td width="120px"><xsl:value-of select="Relationships/Item[@type='Part AML'][1]/related_id/Item/manufacturer/@keyed_name"></xsl:value-of></td>
   <td width="120px"><xsl:value-of select="Relationships/Item[@type='Part AML'][1]/related_id/Item/item_number"></xsl:value-of></td>
  </tr>
  <xsl:apply-templates select="Relationships/Item[@type='Part AML'][position()!=1]"></xsl:apply-templates>
 </xsl:template>
 <xsl:template match="Item[@type='Part AML']">
  <tr>
   <td width="100px"><xsl:value-of select="state"></xsl:value-of></td>
   <td width="120px"><xsl:value-of select="related_id/Item/manufacturer/@keyed_name"></xsl:value-of></td>
   <td width="120px"><xsl:value-of select="related_id/Item/item_number"></xsl:value-of></td>
  </tr>
 </xsl:template>

</xsl:stylesheet>

Hope that helps -

Rob



rolfl - Thursday, October 23, 2008 2:33 AM:

Thanks Rob,

this works great. I actually created a separate report "MultiLevel ManufacturerParts BOM". This could be part of standard PE many customers will love it.

/Rolf



Ron - Thursday, October 23, 2008 9:08 AM:

Thanks Rob

I also used this to create a new report. worked great, and I agree with Rolf this could be a standard report for Innovator.

 

Thanks

 

 



Lorindab - Thursday, December 1, 2011 7:11 AM:

Hi Rob

 

How do I add the  vendor to the report?

 

Regards,

Lorinda



jsnosal - Tuesday, August 7, 2012 10:44 AM:

Rob,

This is great. Thank you so much for posting this. Do you have any suggestions for creating quantity rollup report? In ARAS its called the BOM Quantity Rollup Report. We are looking to have a "grocery list" to send to our manufacture. Basically it wouldn’t have the indenture level and it would sum the quantity of the BOM.
Thank you for your help.
Josh


dwidgit - Monday, April 8, 2013 3:29 PM:

Just as a caution to everyone, I made use of the GetItemRepeatConfig method of doing the recursive query similar to what Rob suggested:

 <Item type="Part" action="GetItemRepeatConfig" select="item_number,use_manf_info" id="{@id}">
    <Relationships>
        <Item type="Part AML" action="Get" select="state,related_id(item_number,manufacturer)">
            <related_id>
                <Item type="Manufacturer Part" action="Get">
                    <Relationships>
                        <Item type="Manu Part to Vendor Part" select="related_id(catalog_number,source_id)"/>
                    </Relationships>
                </Item>
            </related_id>
        </Item>
        <Item type="Part to Vendor Part" select="related_id(catalog_number,source_id)"/>
        <Item type="Part BOM" select="sort_order,quantity,related_id(item_number,use_manf_info)" repeatProp="related_id" repeatTimes="5"/>
    </Relationships>
</Item>

But after we started putting the reports into more realistic use, we found some problems.  For some reason, the reports were randomly dropping some of the BOM items.  Level 1 was always correct, but level 2 and below would drop some or all of the items.  We found that by reverting to the structure that came with the stock install of Aras (an explicit query at each of the 5 levels), then everything worked.  We determined that the problem was what the query was returning, not the XSL, by testing the query on the NASH interface and looking at the raw XML that was returned.  We couldn't find any differences in the raw data of either the BOM entries or the parts themselves, hence we arrived at the conclusion that somehow the implementation of the GetItemRepeatConfig action is bugged.  Unless of course, someone can point out an error in my query.  :-)

Derek.



RobMcAveney - Tuesday, August 7, 2012 11:27 AM:

Josh -

What if there is more than one Approved Manufacturer per Part?  Or if the same Manufacturer Part is approved for multiple internal part numbers?  I'm not sure how the roll up would work in these cases.

Rob



gks - Monday, April 29, 2013 11:57 AM:

GetItemRepeatConfig only returns an item complete once.

 

If it appears second time in the xml, only the item appears, not its children.

If you are missing some items, check if their parent appears twice in the xml.



gks - Monday, April 29, 2013 12:03 PM:

looks like my first replay didn't work:

GetItemRepeatConfig only returns an item completly with all children once. Every other time, only the item itself is returned.

Check if the Item you are missing is under another item which is used multiple times.

 

See also issue 020311 in www.aras.com/.../Aras Innovator 9.3.0 Service Pack 7.pdf

to get a small ascci art about this.



jsnosal - Tuesday, August 7, 2012 4:53 PM:

Rob,

Is it possible to sum the total BOM quantity and then reference the AML list to that part. It would only reference that specific Part ID. It wouldn't look at the other manufactures or manufacturing parts, for that specific part. Does that make sense or am I missing something? Below is how ARAS handles the quantity roll up with just the BOM. Thanks for your help.

Report

<Item type="Part" action="get" id="{@id}" select="item_number,name">
 <Relationships>
  <Item type="Part BOM" select="sort_order,quantity,related_id(item_number,name)">
   <related_id>
    <Item type="Part" select="item_number,name">
     <Relationships>
      <Item type="Part BOM" select="sort_order,quantity,related_id(item_number,name)">
       <related_id>
        <Item type="Part" select="item_number,name">
         <Relationships>
          <Item type="Part BOM" select="sort_order,quantity,related_id(item_number,name)">
           <related_id>
            <Item type="Part" select="item_number,name">
             <Relationships>
              <Item type="Part BOM" select="sort_order,quantity,related_id(item_number,name)">
               <related_id>
                <Item type="Part" select="item_number,name">
                 <Relationships>
                  <Item type="Part BOM" select="sort_order,quantity,related_id(item_number,name)">
                   <related_id>
                    <Item type="Part" select="item_number,name"></Item>
                   </related_id>
                  </Item>
                 </Relationships>
                </Item>
               </related_id>
              </Item>
             </Relationships>
            </Item>
           </related_id>
          </Item>
         </Relationships>
        </Item>
       </related_id>
      </Item>
     </Relationships>
    </Item>
   </related_id>
  </Item>
 </Relationships>
</Item>

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"></xsl:output>
  <xsl:template match="/">
    <html>
      <head></head>
      <style type="text/css" userData="Global">
    table  {empty-cells:show; border-collapse:collapse;}
    th {font-family:helvetica; font-size:8pt;  padding:2px; border:1px #000000 solid; background-color:#CCCCCC; text-transform:capitalize;}
    td {font-family:helvetica; font-size:8pt;  padding:2px; border:1px #000000 solid;}
    td.noBorder {font-family:helvetica; font-size:8pt;  padding:2px; border-width:0;}
   </style>
      <body topmargin="50" leftmargin="50">
        <table border="0" cellspacing="0" cellpadding="0" width="650">
          <tr valign="top">
            <td class="noBorder" align="left" colspan="9" uniqueID="ms__id21">
              <img src="../images/Logos/aras_logo.gif" height="80"></img>
      </td>
     </tr>
          <tr valign="bottom">
            <td class="noBorder" colspan="8" style="font-family:helvetica;font-size:15pt;color:#DA1943;padding:2px;" align="left" uniqueID="ms__id22">Bill of Materials Report</td>
            <td class="noBorder" colspan="4" style="font-family:helvetica;font-size:10pt;padding:2px;" align="right" uniqueID="ms__id23">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())+"+0000"; s = a.convertToNeutral(s, "date", "yyyy-MM-ddTHH:mm:sszzz"); 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>AML Status</th>
            <th>Manufacturer</th>
            <th>Manufacturer Part</th>
     </tr>
          <xsl:apply-templates select="//Item[@type='Part']"></xsl:apply-templates>
    </table>
   </body>
      <script src="../../javascript/PopupMenu.js"></script>
      <script src="../../javascript/PopupMenu.js"></script>
      <script src="../../javascript/PopupMenu.js"></script>
      <script src="../../javascript/PopupMenu.js"></script>
    </html>
 </xsl:template>
  <xsl:template match="Item[@type='Part']">
    <xsl:variable name="Depth" select="count(ancestor::Item[@type='Part'])"></xsl:variable>
    <xsl:variable name="rowCount">
      <xsl:choose>
        <xsl:when test="count(Relationships/Item[@type='Part AML'])=0">1</xsl:when>
        <xsl:otherwise>
          <xsl:value-of select="count(Relationships/Item[@type='Part AML'])"></xsl:value-of>
        </xsl:otherwise>
   </xsl:choose>
  </xsl:variable>
    <tr>
      <td rowspan="{$rowCount}" width="20px" align="center" uniqueID="ms__id24">
        <xsl:if test="$Depth=0">0</xsl:if>
      </td>
      <td rowspan="{$rowCount}" width="20px" align="center" uniqueID="ms__id25">
        <xsl:if test="$Depth=1">1</xsl:if>
      </td>
      <td rowspan="{$rowCount}" width="20px" align="center" uniqueID="ms__id26">
        <xsl:if test="$Depth=2">2</xsl:if>
      </td>
      <td rowspan="{$rowCount}" width="20px" align="center" uniqueID="ms__id27">
        <xsl:if test="$Depth=3">3</xsl:if>
      </td>
      <td rowspan="{$rowCount}" width="20px" align="center" uniqueID="ms__id28">        <xsl:if test="$Depth=4">4</xsl:if>
      </td>
      <td rowspan="{$rowCount}" width="20px" align="center" uniqueID="ms__id29">
        <xsl:if test="$Depth=5">5</xsl:if>
      </td>
      <td rowspan="{$rowCount}" width="120px" uniqueID="ms__id30">
        <xsl:value-of select="item_number"></xsl:value-of>
      </td>
      <td rowspan="{$rowCount}" width="120px" uniqueID="ms__id31">
        <xsl:value-of select="name"></xsl:value-of>
      </td>
      <td rowspan="{$rowCount}" width="80px" align="center" uniqueID="ms__id32">
        <xsl:choose>
          <xsl:when test="$Depth=0">1</xsl:when>
          <xsl:when test="$Depth!=0 and (../../quantity)=''">1</xsl:when>
          <xsl:otherwise>
            <xsl:value-of select="../../quantity"></xsl:value-of>
          </xsl:otherwise>
    </xsl:choose>
   </td>
      <td width="100px" uniqueID="ms__id33">
        <xsl:value-of select="Relationships/Item[@type='Part AML'][1]/state"></xsl:value-of>
      </td>
      <td width="120px" uniqueID="ms__id34">
        <xsl:value-of select="Relationships/Item[@type='Part AML'][1]/related_id/Item/manufacturer/@keyed_name"></xsl:value-of>
      </td>
      <td width="120px" uniqueID="ms__id35">
        <xsl:value-of select="Relationships/Item[@type='Part AML'][1]/related_id/Item/item_number"></xsl:value-of>
      </td>
  </tr>
    <xsl:apply-templates select="Relationships/Item[@type='Part AML'][position()!=1]"></xsl:apply-templates>
 </xsl:template>
  <xsl:template match="Item[@type='Part AML']">
    <tr>
      <td width="100px" uniqueID="ms__id36">
        <xsl:value-of select="state"></xsl:value-of>
      </td>
      <td width="120px" uniqueID="ms__id37">
        <xsl:value-of select="related_id/Item/manufacturer/@keyed_name"></xsl:value-of>
      </td>
      <td width="120px" uniqueID="ms__id38">
        <xsl:value-of select="related_id/Item/item_number"></xsl:value-of>
      </td>
  </tr>
 </xsl:template>

</xsl:stylesheet>



Brian - Friday, May 3, 2013 1:17 PM:

There is a bug in getItemRepeatConfig (as described above).

It has been fixed in release 9.3 Service Pack 1.

If you are using the community release of 9.3 or any earlier 9.2 or before release then you will have to use the more long winded approach of specifying each layer that you want to retrieve.

Hope this helps,

Brian.

 



RobMcAveney - Tuesday, August 7, 2012 5:50 PM:

Josh -

It's pretty straightforward to do the report you're looking for, but let me first give you an example to illustrate the problem I see.  Let's say you have internal part numbers A (quantity 10), B (quantity 5) and C (quantity 2).  Each Part has 2 manufacturer parts on its AML: A has W and Z, B has X and Z and C has Y and Z.  If you only roll up the Part quantities and show the approved manufacturer parts for each you will end up ordering 10 Ws, 5 Xs and 2 Ys instead of just ordering 17 Zs.

Rob



jsnosal - Wednesday, August 8, 2012 4:52 PM:

 

Rob,

I do see what your saying as far as rolling up the AML list for each part. If you only used the part number and the manufacture relationship, right? I guess I'm looking for a quanity roll up of everything under Part BOM, then showing the Part AML list off to the right. Hopefully I'm understanding what your saying. Below is a picture of what I'm looking for. Thanks

Josh

 



heidi - Sunday, September 7, 2014 12:59 PM:

Hi Rob

I would appreciate your assistance. We only have one approved manufacturer/vendor per part and so a quantity roll up report with manufacturer details would be useful to us. I followed this chain and understand your issue but it doesnt apply in our case.

Could you by any chance help me with the style sheet to do this? I know how to amend the report query.

I am not experienced with programming or xml.

I would hugely appreciate your help.

Thanks so much.

Heidi



RobMcAveney - Thursday, August 9, 2012 1:44 AM:

Josh -

Not sure you quite understood the issue I'm seeing.  In your example report, find the number 6995763 and replace it with 9878004.  Now, how would the user of this report know that it might be better to buy 9 pieces of 9878004 instead of 4 pieces of 2152927 and 5 pieces of 4067208?  I realize this is not a realistic case for a small BOM like this, but I've seen it happen many times in larger BOMs.  The same manufacturer part number may appear on many AMLs.  Maybe the best approach would be to include an indicator when the same Manufacturer Part Number appears more than once.  This would at least tell the user to look for reuse opportunities.

If you agree I will spend a few minutes tomorrow putting together the basics of the report and then leave the formatting to you.

Rob



jsnosal - Tuesday, August 21, 2012 2:06 PM:

Rob,

 

I see what you’re saying and I’ll skip that report. I was wondering if you could help me with this report? I used your report as a template. I can’t get the Part Document to work. If I only want one Part Document it works fine, but if there are more than one document the template falls apart. I know the current layout doesn’t work, but what can I do to fix it? Thanks for your help.

 

Report

<Item type="Part" action="GetItemRepeatConfig" select="item_number,name,temp_coefficient,tolerance,voltage_dc,major_rev,classification" id="{@id}">

 <Relationships>

  <Item type="Part AML" select="state,related_id(item_number,manufacturer)"/>

  <Item type="Part Document" select="state,related_id(item_number,name)"/>

  <Item type="Part BOM" select="sort_order,quantity,reference_designator,related_id" repeatProp="related_id" repeatTimes="5"/>

 </Relationships>

</Item>

 

Style Sheet

<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>

      <head></head>

      <style type="text/css" userData="Global">

    table  {empty-cells:show; border-collapse:collapse;}

    th {font-family:helvetica; font-size:8pt;  padding:2px; border:1px #000000 solid; background-color:#CCCCCC; text-transform:capitalize;}

    td {font-family:helvetica; font-size:8pt;  padding:2px; border:1px #000000 solid;}

    td.noBorder {font-family:helvetica; font-size:8pt;  padding:2px; border-width:0;}

   </style>

      <body topmargin="50" leftmargin="50">

        <table border="0" cellspacing="0" cellpadding="0" width="1350">

          <tr valign="top">

            <td class="noBorder" align="left" colspan="9" uniqueID="ms__id21">

              <img src="../images/Logos/aras_logo.gif" height="80"></img>

      </td>

     </tr>

          <tr valign="bottom">

            <td class="noBorder" colspan="11" style="font-family:helvetica;font-size:15pt;color:#DA1943;padding:2px;" align="left" uniqueID="ms__id22">Bill of Materials Report - <xsl:value-of select="//Item/name"></xsl:value-of> Rev <xsl:value-of select="//Item/major_rev"></xsl:value-of>

            </td>

            <td class="noBorder" colspan="4" style="font-family:helvetica;font-size:10pt;padding:2px;" align="right" uniqueID="ms__id23">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())+"+0000"; s = a.convertToNeutral(s, "date", "yyyy-MM-ddTHH:mm:sszzz"); 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 (Primary Value)</th>

            <th>Temp Coefficient</th>

           <th>Tolerance</th>

           <th>Voltage DC</th>

            <th>Type</th>    

           <th>Quantity</th>

            <th>Reference Designator</th>

            <th>Document Number</th>

            <th>Document Name</th>

            <th>AML Status</th>

            <th>Manufacturer</th>

            <th>Manufacturer Part</th>

     </tr>

          <xsl:apply-templates select="//Item[@type='Part']"></xsl:apply-templates>

    </table>

   </body>

      <script src="../../javascript/PopupMenu.js"></script>

      <script src="../../javascript/PopupMenu.js"></script>

      <script src="../../javascript/PopupMenu.js"></script>

      <script src="../../javascript/PopupMenu.js"></script>

    </html>

 </xsl:template>

  <xsl:template match="Item[@type='Part']">

    <xsl:variable name="Depth" select="count(ancestor::Item[@type='Part'])"></xsl:variable>

    <xsl:variable name="rowCount">

      <xsl:choose>

        <xsl:when test="count(Relationships/Item[@type='Part AML'])=0">1</xsl:when>        <xsl:otherwise>

          <xsl:value-of select="count(Relationships/Item[@type='Part AML'])"></xsl:value-of>

        </xsl:otherwise>

   </xsl:choose>

  </xsl:variable>

    <tr>

      <td rowspan="{$rowCount}" width="20px" align="center" uniqueID="ms__id24">

        <xsl:if test="$Depth=0">0</xsl:if>

      </td>

      <td rowspan="{$rowCount}" width="20px" align="center" uniqueID="ms__id25">

        <xsl:if test="$Depth=1">1</xsl:if>

      </td>

      <td rowspan="{$rowCount}" width="20px" align="center" uniqueID="ms__id26">

        <xsl:if test="$Depth=2">2</xsl:if>

      </td>

      <td rowspan="{$rowCount}" width="20px" align="center" uniqueID="ms__id27">

        <xsl:if test="$Depth=3">3</xsl:if>

      </td>

      <td rowspan="{$rowCount}" width="20px" align="center" uniqueID="ms__id28">        <xsl:if test="$Depth=4">4</xsl:if>

      </td>

      <td rowspan="{$rowCount}" width="20px" align="center" uniqueID="ms__id29">

        <xsl:if test="$Depth=5">5</xsl:if>

      </td>

      <td rowspan="{$rowCount}" width="120px" uniqueID="ms__id30">

        <xsl:value-of select="item_number"></xsl:value-of>

      </td>    

                  <td rowspan="{$rowCount}" width="300px" uniqueID="ms__id31">

        <xsl:value-of select="name"></xsl:value-of>

      </td>

      <td rowspan="{$rowCount}" width="120px" uniqueID="ms__id32">

        <xsl:value-of select="temp_coefficient"></xsl:value-of>

      </td>

                  <td rowspan="{$rowCount}" width="120px" uniqueID="ms__id33">

        <xsl:value-of select="tolerance"></xsl:value-of>

      </td>

                  <td rowspan="{$rowCount}" width="120px" uniqueID="ms__id34">

        <xsl:value-of select="voltage_dc"></xsl:value-of>

      </td>

      <td rowspan="{$rowCount}" width="120px" uniqueID="ms__id35">

        <xsl:value-of select="classification"></xsl:value-of>

      </td>

      <td rowspan="{$rowCount}" width="80px" align="center" uniqueID="ms__id36">

        <xsl:choose>

          <xsl:when test="$Depth=0">1</xsl:when>

          <xsl:when test="$Depth!=0 and (../../quantity)=''">1</xsl:when>

          <xsl:otherwise>

            <xsl:value-of select="../../quantity"></xsl:value-of>

          </xsl:otherwise>

    </xsl:choose>

   </td>

      <td rowspan="{$rowCount}" width="120px" uniqueID="ms__id37">

        <xsl:value-of select="../../reference_designator"></xsl:value-of>

      </td>

      <td rowspan="{$rowCount}" width="120px" uniqueID="ms__id38">

        <xsl:value-of select="Relationships/Item[@type='Part Document'][1]/related_id/Item/item_number"></xsl:value-of>

                  </td>

      <td rowspan="{$rowCount}" width="240px" uniqueID="ms__id39">

        <xsl:value-of select="Relationships/Item[@type='Part Document'][1]/related_id/Item/name"></xsl:value-of>

                  </td>

      <td width="100px" uniqueID="ms__id40">

        <xsl:value-of select="Relationships/Item[@type='Part AML'][1]/state"></xsl:value-of>

      </td>

      <td width="120px" uniqueID="ms__id41">

        <xsl:value-of select="Relationships/Item[@type='Part AML'][1]/related_id/Item/manufacturer/@keyed_name"></xsl:value-of>

      </td>

      <td width="120px" uniqueID="ms__id42">

        <xsl:value-of select="Relationships/Item[@type='Part AML'][1]/related_id/Item/item_number"></xsl:value-of>

      </td>

  </tr>

    <xsl:apply-templates select="Relationships/Item[@type='Part Document'][position()!=1]"></xsl:apply-templates>

    <xsl:apply-templates select="Relationships/Item[@type='Part AML'][position()!=1]"></xsl:apply-templates>

 </xsl:template>

  <xsl:template match="Item[@type='Part BOM']">

    <tr>

      <td width="100px" uniqueID="ms__id43">

        <xsl:value-of select="reference_designator"></xsl:value-of>

      </td>

                </tr>

  </xsl:template>  <xsl:template match="Item[@type='Part Document']">    <tr>

      <td width="120px" uniqueID="ms__id44">

        <xsl:value-of select="related_id/Item/item_number"></xsl:value-of>

      </td>

      <td width="120px" uniqueID="ms__id45">

        <xsl:value-of select="related_id/Item/name"></xsl:value-of>

                  </td>

  </tr>

 </xsl:template>

  <xsl:template match="Item[@type='Part AML']">

    <tr>

      <td width="100px" uniqueID="ms__id46">

        <xsl:value-of select="state"></xsl:value-of>

      </td>

      <td width="120px" uniqueID="ms__id47">

        <xsl:value-of select="related_id/Item/manufacturer/@keyed_name"></xsl:value-of>

      </td>

      <td width="240x" uniqueID="ms__id48">

        <xsl:value-of select="related_id/Item/item_number"></xsl:value-of>

      </td>

                </tr>

  </xsl:template>

</xsl:stylesheet>



Abhishek - Monday, February 2, 2015 11:23 PM:

Hi jsnosal ,

 

Can you provide the same for Quantity Roll Up

 

Thanks

Abhishek