4 Replies Latest reply on Sep 11, 2017 3:59 AM by viktorm

    How to create Harness report - BOM

    viktorm

      Hi,

      Could anyone support by guiding me to create report with following information:

      Column1 - PN

      Column2- Total quantaly of each PN.

      I have issue with creating the second column that counts how many from each PN do I have.

       

      Thanks in Advance.

        • 1. Re: How to create Harness report - BOM
          karin

          Hello,

           

          in Vesys2.0 there is a integrated report available

          This report counts quantity

           

           

          Regards

          Karin

          • 2. Re: How to create Harness report - BOM
            viktorm

            Hi Karin,

            Thank you for repaly, but in attached screenshots you present already buildin reports, my question was how to create custom report that counts PNs

            Based on attached screenshot - how to count component PN C-74464 and present number 4 (quantaty ) ????

            • 3. Re: How to create Harness report - BOM
              Eric.Archambeault

              Hi Viktorm,

               

                   If you need it in a Table, in your style set, under "Design" you may add a BOM Table, then customize this table.  But if you really need a report, I only see the use of a custom report (API), you can create your own custom embedded report, an Enterprise Reporter Report (don't know if you have this one in Vesys, I use Capital/CHS), or create a Custom Action that will create this report.

               

              Whatever is your solution, a Java "map" collection class will be an easy way to acheive your goal.

               

              For (IXObject myObject : Design.getconnectivity) {

                   if (myObject.getAttribute(IXAttributes.PartNumber) != null || !myObject.getAttribute(IXAttributes.PartNumber).isEmpty()){

                        Map<String,double>  myMap = new HashMap<String, double>();

                        if (!myMap.containsKey(myObject.getAttribute(IXAttributes.PartNumber))

                             {myMap.put(myObject.getAttribute(IXAttributes.PartNumber),1); }

                             else

                             {myMap.put(myObject.getAttribute(IXAttributes.PartNumber), myMap.get(myObject.getAttribute(IXAttributes.PartNumber)) + 1);}

                   }

              }

               

              Once the Map is populated.

               

              If (myMap.size() > 0 ) {

              // Code to populate report - the key name will be the Part Number, the value will be the count.

              }

               

              If you want more than "Each" value, you can check for attribute "Unit of Measure", then, if this is Each, this is like describe before, if this is "Per Lenght/Roll" you need to use the Double.valueOf(myObject.getAttribute(IXAttributes.Lenght)) and add this value instead the + 1 (if this is for an insulation, you need also to take care if this is a "Component" type or a "Space Tape" type, these two insulation type have multiple condition to take in evaluation.

               

              Regards,