Nested grouping

How do you do nested groups? Does the inner group have to be in a separate table within a row of the outer group? I am developing an XML Publisher version of the packing slip report where there can be multiple lots per item, and multiple items per packing slip.

Yes you are corrrect, need to create new tables with required columns inside the main table and use for-each inside the new table with in the same row.
Regards
Balaji.

Similar Messages

  • XML Publisher nested grouping, sum and order by question

    Please help in nested group by, sum and order by question
    My Data look like this:
    <Header>
    <Line1>
         <Part Number></Part Number>
              <Component>
                   <Component1></Component1>
                   <Component1 Amount></Component1 Amount>
              </Component>
              <Component>
                   <Component2></Component2>
                   <Component2 Amount></Component2 Amount>
              </Component>
    </Line1>
    <Line2>
         <Part Number></Part Number>
              <Component>
                   <Component1></Component1>
                   <Component1 Amount></Component1 Amount >
              </Component>
              <Component>
                   <Component2></Component2>
                   <Component2 Amount ></Component2 Amount >
              </Component>
    </Line2>
    </Header>
    I want to print report which is:
    1. Group by part number, component and sum the amount for a part number/component
    2. Order by part number, component
    Here is rtf file for XML publisher report
    <?for-each-group:G_LINES;PART_NUMBER?>
    <?sort:G_LINES;PART_NUMBER;'ascending';data-type='text'?>
    <?if:BREAKDOWN_COUNT>0?>
    Part Number: <?PART_NUMBER?>     Quantity: <?sum (current-group()/SHIP_QTY)?>          Part Count:<?count(current-group()/PART_NUMBER)?>     Breakdown Count:<?count(G_BREAKDOWN/COMPONENT)?>
    <?for-each:current-group()?>
    <?for-each-group:G_BREAKDOWN;COMPONENT?>
    Component: <?COMPONENT?>          Price: <?COMPONENT_PRICE?>
    <?end-for-each?>
    <?end-for-each?>
    <?end if?>
    <?end-for-each?>
    If I add <?sort:G_BREAKDOWN;COMPONENT;'ascending';data-type='text'?> inside G_BREAKDOWN grouping it gives error.
    My XML data file
    <?xml version="1.0"?>
    <!-- Generated by Oracle Reports version 6.0.8.25.0 -->
    <NI_COMMERCIAL_INVOICE_XMLP>
    <LIST_G_HEADER>
    <G_HEADER>
    <COMM_INV_NUMBER>C/901000598</COMM_INV_NUMBER>
    <COMM_INV_VERSION_NUMBER>1</COMM_INV_VERSION_NUMBER>
    <SHIP_FROM_NAME>National Instruments Europe Corp.</SHIP_FROM_NAME>
    <SHIP_FROM_ADDR>H-4031, Debrecen, Hatar ut 1/A</SHIP_FROM_ADDR>
    <SHIP_FROM_CITY></SHIP_FROM_CITY>
    <SHIP_FROM_STATE></SHIP_FROM_STATE>
    <SHIP_FROM_POSTAL_CODE></SHIP_FROM_POSTAL_CODE>
    <SHIP_FROM_COUNTRY>Hungary</SHIP_FROM_COUNTRY>
    <SHIP_TO_NAME>National Instruments Corporation (NIEC)</SHIP_TO_NAME>
    <FORMATTED_SHIP_TO_ADDR>11500 N Mopac Expwy
    Austin, TX 78759-3504
    United States</FORMATTED_SHIP_TO_ADDR>
    <SHIP_TO_ADDR1>11500 N Mopac Expwy</SHIP_TO_ADDR1>
    <SHIP_TO_ADDR2></SHIP_TO_ADDR2>
    <SHIP_TO_ADDR3></SHIP_TO_ADDR3>
    <SHIP_TO_ADDR4></SHIP_TO_ADDR4>
    <SHIP_TO_CITY>Austin</SHIP_TO_CITY>
    <SHIP_TO_STATE>TX </SHIP_TO_STATE>
    <SHIP_TO_POSTAL_CODE>78759-3504</SHIP_TO_POSTAL_CODE>
    <SHIP_TO_COUNTRY>US</SHIP_TO_COUNTRY>
    <SHIP_TO_EMAIL_ADDR></SHIP_TO_EMAIL_ADDR>
    <BILL_TO_ORG_ID>807737</BILL_TO_ORG_ID>
    <SHIPPED_VIA>UPS</SHIPPED_VIA>
    <DELIVERY_TERM>DDU</DELIVERY_TERM>
    <TEXT_FILE_SEPARATOR></TEXT_FILE_SEPARATOR>
    <DELIVERY_COUNT>4</DELIVERY_COUNT>
    <HEADER_WAYBILL></HEADER_WAYBILL>
    <LIST_G_LINES>
    <G_LINES>
    <DELIVERY_ID>2629769</DELIVERY_ID>
    <ORDER_HEADER_ID>1431282</ORDER_HEADER_ID>
    <ORDER_NUMBER>10004434</ORDER_NUMBER>
    <CUST_PO_NUMBER>310986-387</CUST_PO_NUMBER>
    <ORDER_LINE_ID>4565737</ORDER_LINE_ID>
    <INVENTORY_ITEM_ID>26818</INVENTORY_ITEM_ID>
    <PART_NUMBER>777459-23</PART_NUMBER>
    <PART_DESC>SCC-AI04, 2-CHANNEL ISOLATED ANALOG INPUT</PART_DESC>
    <PART_CUSTOM_DESC>SCC-AI04, Automatic Data Processing Plug-In Board</PART_CUSTOM_DESC>
    <PLANNER_CODE>SCXIH-MPS</PLANNER_CODE>
    <HTS_CODE>8471.80.9000</HTS_CODE>
    <TARIC_CODE>8471.80.0000</TARIC_CODE>
    <COUNTRY_OF_ORIGIN>HU</COUNTRY_OF_ORIGIN>
    <ORDER_CURRENCY_CODE>USD</ORDER_CURRENCY_CODE>
    <ORIG_UNIT_PRICE>158</ORIG_UNIT_PRICE>
    <ORIG_SHIP_QTY>4</ORIG_SHIP_QTY>
    <UNIT_PRICE>158</UNIT_PRICE>
    <PRICE_CALC_STEP_NUMBER>100</PRICE_CALC_STEP_NUMBER>
    <PRICE_CALC_CURRENCY_CODE>USD</PRICE_CALC_CURRENCY_CODE>
    <PRICE_CALC_UNIT_PRICE>158</PRICE_CALC_UNIT_PRICE>
    <PRICE_CALC_CONV_RATE>1</PRICE_CALC_CONV_RATE>
    <SHIP_QTY>4</SHIP_QTY>
    <EXTENDED_PRICE>632</EXTENDED_PRICE>
    <UNIT_WEIGHT>.16</UNIT_WEIGHT>
    <NET_WEIGHT>.64</NET_WEIGHT>
    <ACQ_SOURCE_CODE></ACQ_SOURCE_CODE>
    <ACQ_ORDER_NUMBER></ACQ_ORDER_NUMBER>
    <ACQ_SOURCE_ORDER_NUMBER></ACQ_SOURCE_ORDER_NUMBER>
    <ACQ_SELLING_PRICE>0</ACQ_SELLING_PRICE>
    <SUBINVENTORY>NIEC Stage</SUBINVENTORY>
    <SHIP_TO_SITE_USE_ID>807736</SHIP_TO_SITE_USE_ID>
    <FREIGHT_COST>0</FREIGHT_COST>
    <PAYMENT_TERMS>NIH InterCo</PAYMENT_TERMS>
    <WAYBILL>901000598/01 NIC</WAYBILL>
    <BREAKDOWN_COUNT>0</BREAKDOWN_COUNT>
    <LIST_G_BREAKDOWN>
    <G_BREAKDOWN>
    <BREAKDOWN_TYPE></BREAKDOWN_TYPE>
    <BREAKDOWN_VALUE></BREAKDOWN_VALUE>
    <COMPONENT></COMPONENT>
    <COMPONENT_DESC></COMPONENT_DESC>
    <COMPONENT_CUSTOM_DESC></COMPONENT_CUSTOM_DESC>
    <COMPONENT_PRICE></COMPONENT_PRICE>
    <COMPONENT_HTS_CODE></COMPONENT_HTS_CODE>
    <COMPONENT_TARIC_CODE></COMPONENT_TARIC_CODE>
    <COMPONENT_COO></COMPONENT_COO>
    <COMPONENT_QTY></COMPONENT_QTY>
    </G_BREAKDOWN>
    </LIST_G_BREAKDOWN>
    </G_LINES>
    <G_LINES>
    <DELIVERY_ID>2629769</DELIVERY_ID>
    <ORDER_HEADER_ID>1431282</ORDER_HEADER_ID>
    <ORDER_NUMBER>10004434</ORDER_NUMBER>
    <CUST_PO_NUMBER>310986-387</CUST_PO_NUMBER>
    <ORDER_LINE_ID>4579950</ORDER_LINE_ID>
    <INVENTORY_ITEM_ID>143949</INVENTORY_ITEM_ID>
    <PART_NUMBER>779475-01</PART_NUMBER>
    <PART_DESC>SCC-68 I/O CONNECTOR BLOCK WITH 4 SCC SIGNAL CONDITIONING MODULE SLOTS</PART_DESC>
    <PART_CUSTOM_DESC>SCC-68, Screw Terminals</PART_CUSTOM_DESC>
    <PLANNER_CODE>DAQH-MPS</PLANNER_CODE>
    <HTS_CODE>8536.90.4000</HTS_CODE>
    <TARIC_CODE>8536.90.1000</TARIC_CODE>
    <COUNTRY_OF_ORIGIN>HU</COUNTRY_OF_ORIGIN>
    <ORDER_CURRENCY_CODE>USD</ORDER_CURRENCY_CODE>
    <ORIG_UNIT_PRICE>144</ORIG_UNIT_PRICE>
    <ORIG_SHIP_QTY>10</ORIG_SHIP_QTY>
    <UNIT_PRICE>144</UNIT_PRICE>
    <PRICE_CALC_STEP_NUMBER>100</PRICE_CALC_STEP_NUMBER>
    <PRICE_CALC_CURRENCY_CODE>USD</PRICE_CALC_CURRENCY_CODE>
    <PRICE_CALC_UNIT_PRICE>144</PRICE_CALC_UNIT_PRICE>
    <PRICE_CALC_CONV_RATE>1</PRICE_CALC_CONV_RATE>
    <SHIP_QTY>10</SHIP_QTY>
    <EXTENDED_PRICE>1440</EXTENDED_PRICE>
    <UNIT_WEIGHT>1.06</UNIT_WEIGHT>
    <NET_WEIGHT>10.6</NET_WEIGHT>
    <ACQ_SOURCE_CODE></ACQ_SOURCE_CODE>
    <ACQ_ORDER_NUMBER></ACQ_ORDER_NUMBER>
    <ACQ_SOURCE_ORDER_NUMBER></ACQ_SOURCE_ORDER_NUMBER>
    <ACQ_SELLING_PRICE>0</ACQ_SELLING_PRICE>
    <SUBINVENTORY>NIEC Stage</SUBINVENTORY>
    <SHIP_TO_SITE_USE_ID>807736</SHIP_TO_SITE_USE_ID>
    <FREIGHT_COST>0</FREIGHT_COST>
    <PAYMENT_TERMS>NIH InterCo</PAYMENT_TERMS>
    <WAYBILL>901000598/01 NIC</WAYBILL>
    <BREAKDOWN_COUNT>3</BREAKDOWN_COUNT>
    <LIST_G_BREAKDOWN>
    <G_BREAKDOWN>
    <BREAKDOWN_TYPE>HTS CODE</BREAKDOWN_TYPE>
    <BREAKDOWN_VALUE>8536.90.4000</BREAKDOWN_VALUE>
    <COMPONENT>CD</COMPONENT>
    <COMPONENT_DESC>Test1</COMPONENT_DESC>
    <COMPONENT_CUSTOM_DESC></COMPONENT_CUSTOM_DESC>
    <COMPONENT_PRICE>50</COMPONENT_PRICE>
    <COMPONENT_HTS_CODE>2803.00.0050</COMPONENT_HTS_CODE>
    <COMPONENT_TARIC_CODE>Test1</COMPONENT_TARIC_CODE>
    <COMPONENT_COO>HU</COMPONENT_COO>
    <COMPONENT_QTY>10</COMPONENT_QTY>
    </G_BREAKDOWN>
    <G_BREAKDOWN>
    <BREAKDOWN_TYPE>HTS CODE</BREAKDOWN_TYPE>
    <BREAKDOWN_VALUE>8536.90.4000</BREAKDOWN_VALUE>
    <COMPONENT>Paper</COMPONENT>
    <COMPONENT_DESC></COMPONENT_DESC>
    <COMPONENT_CUSTOM_DESC></COMPONENT_CUSTOM_DESC>
    <COMPONENT_PRICE>20</COMPONENT_PRICE>
    <COMPONENT_HTS_CODE>2839.90.0000</COMPONENT_HTS_CODE>
    <COMPONENT_TARIC_CODE></COMPONENT_TARIC_CODE>
    <COMPONENT_COO>HU</COMPONENT_COO>
    <COMPONENT_QTY></COMPONENT_QTY>
    </G_BREAKDOWN>
    <G_BREAKDOWN>
    <BREAKDOWN_TYPE>HTS CODE</BREAKDOWN_TYPE>
    <BREAKDOWN_VALUE>8536.90.4000</BREAKDOWN_VALUE>
    <COMPONENT>IP</COMPONENT>
    <COMPONENT_DESC></COMPONENT_DESC>
    <COMPONENT_CUSTOM_DESC></COMPONENT_CUSTOM_DESC>
    <COMPONENT_PRICE>1370</COMPONENT_PRICE>
    <COMPONENT_HTS_CODE></COMPONENT_HTS_CODE>
    <COMPONENT_TARIC_CODE></COMPONENT_TARIC_CODE>
    <COMPONENT_COO>HU</COMPONENT_COO>
    <COMPONENT_QTY></COMPONENT_QTY>
    </G_BREAKDOWN>
    </LIST_G_BREAKDOWN>
    </G_LINES>
    <G_LINES>
    <DELIVERY_ID>2629822</DELIVERY_ID>
    <ORDER_HEADER_ID>1425429</ORDER_HEADER_ID>
    <ORDER_NUMBER>10004365</ORDER_NUMBER>
    <CUST_PO_NUMBER>310986-372</CUST_PO_NUMBER>
    <ORDER_LINE_ID>4579940</ORDER_LINE_ID>
    <INVENTORY_ITEM_ID>22643</INVENTORY_ITEM_ID>
    <PART_NUMBER>777687-20</PART_NUMBER>
    <PART_DESC>SCXI-1320 TEMPERATURE SENSOR TERMINAL BLOCK, CAST</PART_DESC>
    <PART_CUSTOM_DESC>SCXI-1320, Screw Terminals</PART_CUSTOM_DESC>
    <PLANNER_CODE>SCXIH-MPS</PLANNER_CODE>
    <HTS_CODE>8536.90.4000</HTS_CODE>
    <TARIC_CODE>8536.90.1000</TARIC_CODE>
    <COUNTRY_OF_ORIGIN>HU</COUNTRY_OF_ORIGIN>
    <ORDER_CURRENCY_CODE>USD</ORDER_CURRENCY_CODE>
    <ORIG_UNIT_PRICE>82</ORIG_UNIT_PRICE>
    <ORIG_SHIP_QTY>1</ORIG_SHIP_QTY>
    <UNIT_PRICE>82</UNIT_PRICE>
    <PRICE_CALC_STEP_NUMBER>100</PRICE_CALC_STEP_NUMBER>
    <PRICE_CALC_CURRENCY_CODE>USD</PRICE_CALC_CURRENCY_CODE>
    <PRICE_CALC_UNIT_PRICE>82</PRICE_CALC_UNIT_PRICE>
    <PRICE_CALC_CONV_RATE>1</PRICE_CALC_CONV_RATE>
    <SHIP_QTY>1</SHIP_QTY>
    <EXTENDED_PRICE>82</EXTENDED_PRICE>
    <UNIT_WEIGHT>.57</UNIT_WEIGHT>
    <NET_WEIGHT>.57</NET_WEIGHT>
    <ACQ_SOURCE_CODE></ACQ_SOURCE_CODE>
    <ACQ_ORDER_NUMBER></ACQ_ORDER_NUMBER>
    <ACQ_SOURCE_ORDER_NUMBER></ACQ_SOURCE_ORDER_NUMBER>
    <ACQ_SELLING_PRICE>0</ACQ_SELLING_PRICE>
    <SUBINVENTORY>NIEC Stage</SUBINVENTORY>
    <SHIP_TO_SITE_USE_ID>807736</SHIP_TO_SITE_USE_ID>
    <FREIGHT_COST>0</FREIGHT_COST>
    <PAYMENT_TERMS>NIH InterCo</PAYMENT_TERMS>
    <WAYBILL>901000598/02 NIC</WAYBILL>
    <BREAKDOWN_COUNT>3</BREAKDOWN_COUNT>
    <LIST_G_BREAKDOWN>
    <G_BREAKDOWN>
    <BREAKDOWN_TYPE>HTS CODE</BREAKDOWN_TYPE>
    <BREAKDOWN_VALUE>8536.90.4000</BREAKDOWN_VALUE>
    <COMPONENT>CD</COMPONENT>
    <COMPONENT_DESC>Test1</COMPONENT_DESC>
    <COMPONENT_CUSTOM_DESC></COMPONENT_CUSTOM_DESC>
    <COMPONENT_PRICE>5</COMPONENT_PRICE>
    <COMPONENT_HTS_CODE>2803.00.0050</COMPONENT_HTS_CODE>
    <COMPONENT_TARIC_CODE>Test1</COMPONENT_TARIC_CODE>
    <COMPONENT_COO>HU</COMPONENT_COO>
    <COMPONENT_QTY>1</COMPONENT_QTY>
    </G_BREAKDOWN>
    <G_BREAKDOWN>
    <BREAKDOWN_TYPE>HTS CODE</BREAKDOWN_TYPE>
    <BREAKDOWN_VALUE>8536.90.4000</BREAKDOWN_VALUE>
    <COMPONENT>Paper</COMPONENT>
    <COMPONENT_DESC></COMPONENT_DESC>
    <COMPONENT_CUSTOM_DESC></COMPONENT_CUSTOM_DESC>
    <COMPONENT_PRICE>2</COMPONENT_PRICE>
    <COMPONENT_HTS_CODE>2839.90.0000</COMPONENT_HTS_CODE>
    <COMPONENT_TARIC_CODE></COMPONENT_TARIC_CODE>
    <COMPONENT_COO>HU</COMPONENT_COO>
    <COMPONENT_QTY></COMPONENT_QTY>
    </G_BREAKDOWN>
    <G_BREAKDOWN>
    <BREAKDOWN_TYPE>HTS CODE</BREAKDOWN_TYPE>
    <BREAKDOWN_VALUE>8536.90.4000</BREAKDOWN_VALUE>
    <COMPONENT>IP</COMPONENT>
    <COMPONENT_DESC></COMPONENT_DESC>
    <COMPONENT_CUSTOM_DESC></COMPONENT_CUSTOM_DESC>
    <COMPONENT_PRICE>75</COMPONENT_PRICE>
    <COMPONENT_HTS_CODE></COMPONENT_HTS_CODE>
    <COMPONENT_TARIC_CODE></COMPONENT_TARIC_CODE>
    <COMPONENT_COO>HU</COMPONENT_COO>
    <COMPONENT_QTY></COMPONENT_QTY>
    </G_BREAKDOWN>
    </LIST_G_BREAKDOWN>
    </G_LINES>
    <G_LINES>
    <DELIVERY_ID>2629822</DELIVERY_ID>
    <ORDER_HEADER_ID>1427673</ORDER_HEADER_ID>
    <ORDER_NUMBER>10004391</ORDER_NUMBER>
    <CUST_PO_NUMBER>310986-377</CUST_PO_NUMBER>
    <ORDER_LINE_ID>4579948</ORDER_LINE_ID>
    <INVENTORY_ITEM_ID>143949</INVENTORY_ITEM_ID>
    <PART_NUMBER>779475-01</PART_NUMBER>
    <PART_DESC>SCC-68 I/O CONNECTOR BLOCK WITH 4 SCC SIGNAL CONDITIONING MODULE SLOTS</PART_DESC>
    <PART_CUSTOM_DESC>SCC-68, Screw Terminals</PART_CUSTOM_DESC>
    <PLANNER_CODE>DAQH-MPS</PLANNER_CODE>
    <HTS_CODE>8536.90.4000</HTS_CODE>
    <TARIC_CODE>8536.90.1000</TARIC_CODE>
    <COUNTRY_OF_ORIGIN>HU</COUNTRY_OF_ORIGIN>
    <ORDER_CURRENCY_CODE>USD</ORDER_CURRENCY_CODE>
    <ORIG_UNIT_PRICE>144</ORIG_UNIT_PRICE>
    <ORIG_SHIP_QTY>13</ORIG_SHIP_QTY>
    <UNIT_PRICE>144</UNIT_PRICE>
    <PRICE_CALC_STEP_NUMBER>100</PRICE_CALC_STEP_NUMBER>
    <PRICE_CALC_CURRENCY_CODE>USD</PRICE_CALC_CURRENCY_CODE>
    <PRICE_CALC_UNIT_PRICE>144</PRICE_CALC_UNIT_PRICE>
    <PRICE_CALC_CONV_RATE>1</PRICE_CALC_CONV_RATE>
    <SHIP_QTY>13</SHIP_QTY>
    <EXTENDED_PRICE>1872</EXTENDED_PRICE>
    <UNIT_WEIGHT>1.06</UNIT_WEIGHT>
    <NET_WEIGHT>13.78</NET_WEIGHT>
    <ACQ_SOURCE_CODE></ACQ_SOURCE_CODE>
    <ACQ_ORDER_NUMBER></ACQ_ORDER_NUMBER>
    <ACQ_SOURCE_ORDER_NUMBER></ACQ_SOURCE_ORDER_NUMBER>
    <ACQ_SELLING_PRICE>0</ACQ_SELLING_PRICE>
    <SUBINVENTORY>NIEC Stage</SUBINVENTORY>
    <SHIP_TO_SITE_USE_ID>807736</SHIP_TO_SITE_USE_ID>
    <FREIGHT_COST>0</FREIGHT_COST>
    <PAYMENT_TERMS>NIH InterCo</PAYMENT_TERMS>
    <WAYBILL>901000598/02 NIC</WAYBILL>
    <BREAKDOWN_COUNT>3</BREAKDOWN_COUNT>
    <LIST_G_BREAKDOWN>
    <G_BREAKDOWN>
    <BREAKDOWN_TYPE>HTS CODE</BREAKDOWN_TYPE>
    <BREAKDOWN_VALUE>8536.90.4000</BREAKDOWN_VALUE>
    <COMPONENT>CD</COMPONENT>
    <COMPONENT_DESC>Test1</COMPONENT_DESC>
    <COMPONENT_CUSTOM_DESC></COMPONENT_CUSTOM_DESC>
    <COMPONENT_PRICE>65</COMPONENT_PRICE>
    <COMPONENT_HTS_CODE>2803.00.0050</COMPONENT_HTS_CODE>
    <COMPONENT_TARIC_CODE>Test1</COMPONENT_TARIC_CODE>
    <COMPONENT_COO>HU</COMPONENT_COO>
    <COMPONENT_QTY>13</COMPONENT_QTY>
    </G_BREAKDOWN>
    <G_BREAKDOWN>
    <BREAKDOWN_TYPE>HTS CODE</BREAKDOWN_TYPE>
    <BREAKDOWN_VALUE>8536.90.4000</BREAKDOWN_VALUE>
    <COMPONENT>Paper</COMPONENT>
    <COMPONENT_DESC></COMPONENT_DESC>
    <COMPONENT_CUSTOM_DESC></COMPONENT_CUSTOM_DESC>
    <COMPONENT_PRICE>26</COMPONENT_PRICE>
    <COMPONENT_HTS_CODE>2839.90.0000</COMPONENT_HTS_CODE>
    <COMPONENT_TARIC_CODE></COMPONENT_TARIC_CODE>
    <COMPONENT_COO>HU</COMPONENT_COO>
    <COMPONENT_QTY></COMPONENT_QTY>
    </G_BREAKDOWN>
    <G_BREAKDOWN>
    <BREAKDOWN_TYPE>HTS CODE</BREAKDOWN_TYPE>
    <BREAKDOWN_VALUE>8536.90.4000</BREAKDOWN_VALUE>
    <COMPONENT>IP</COMPONENT>
    <COMPONENT_DESC></COMPONENT_DESC>
    <COMPONENT_CUSTOM_DESC></COMPONENT_CUSTOM_DESC>
    <COMPONENT_PRICE>1781</COMPONENT_PRICE>
    <COMPONENT_HTS_CODE></COMPONENT_HTS_CODE>
    <COMPONENT_TARIC_CODE></COMPONENT_TARIC_CODE>
    <COMPONENT_COO>HU</COMPONENT_COO>
    <COMPONENT_QTY></COMPONENT_QTY>
    </G_BREAKDOWN>
    </LIST_G_BREAKDOWN>
    </G_LINES>
    <G_LINES>
    <DELIVERY_ID>2630021</DELIVERY_ID>
    <ORDER_HEADER_ID>1429687</ORDER_HEADER_ID>
    <ORDER_NUMBER>10004410</ORDER_NUMBER>
    <CUST_PO_NUMBER>310986-383</CUST_PO_NUMBER>
    <ORDER_LINE_ID>4578220</ORDER_LINE_ID>
    <INVENTORY_ITEM_ID>61816</INVENTORY_ITEM_ID>
    <PART_NUMBER>777687-14</PART_NUMBER>
    <PART_DESC>SCXI-1314 FRONT MOUNTING TERMINAL BLOCK</PART_DESC>
    <PART_CUSTOM_DESC>SCXI-1314, Screw Terminals</PART_CUSTOM_DESC>
    <PLANNER_CODE>SCXIH-MPS</PLANNER_CODE>
    <HTS_CODE>8536.90.4000</HTS_CODE>
    <TARIC_CODE>8536.90.1000</TARIC_CODE>
    <COUNTRY_OF_ORIGIN>HU</COUNTRY_OF_ORIGIN>
    <ORDER_CURRENCY_CODE>USD</ORDER_CURRENCY_CODE>
    <ORIG_UNIT_PRICE>120</ORIG_UNIT_PRICE>
    <ORIG_SHIP_QTY>4</ORIG_SHIP_QTY>
    <UNIT_PRICE>120</UNIT_PRICE>
    <PRICE_CALC_STEP_NUMBER>100</PRICE_CALC_STEP_NUMBER>
    <PRICE_CALC_CURRENCY_CODE>USD</PRICE_CALC_CURRENCY_CODE>
    <PRICE_CALC_UNIT_PRICE>120</PRICE_CALC_UNIT_PRICE>
    <PRICE_CALC_CONV_RATE>1</PRICE_CALC_CONV_RATE>
    <SHIP_QTY>4</SHIP_QTY>
    <EXTENDED_PRICE>480</EXTENDED_PRICE>
    <UNIT_WEIGHT>.68</UNIT_WEIGHT>
    <NET_WEIGHT>2.72</NET_WEIGHT>
    <ACQ_SOURCE_CODE></ACQ_SOURCE_CODE>
    <ACQ_ORDER_NUMBER></ACQ_ORDER_NUMBER>
    <ACQ_SOURCE_ORDER_NUMBER></ACQ_SOURCE_ORDER_NUMBER>
    <ACQ_SELLING_PRICE>0</ACQ_SELLING_PRICE>
    <SUBINVENTORY>NIEC Stage</SUBINVENTORY>
    <SHIP_TO_SITE_USE_ID>807736</SHIP_TO_SITE_USE_ID>
    <FREIGHT_COST>0</FREIGHT_COST>
    <PAYMENT_TERMS>NIH InterCo</PAYMENT_TERMS>
    <WAYBILL>901000598/03 NIC</WAYBILL>
    <BREAKDOWN_COUNT>3</BREAKDOWN_COUNT>
    <LIST_G_BREAKDOWN>
    <G_BREAKDOWN>
    <BREAKDOWN_TYPE>HTS CODE</BREAKDOWN_TYPE>
    <BREAKDOWN_VALUE>8536.90.4000</BREAKDOWN_VALUE>
    <COMPONENT>CD</COMPONENT>
    <COMPONENT_DESC>Test1</COMPONENT_DESC>
    <COMPONENT_CUSTOM_DESC></COMPONENT_CUSTOM_DESC>
    <COMPONENT_PRICE>20</COMPONENT_PRICE>
    <COMPONENT_HTS_CODE>2803.00.0050</COMPONENT_HTS_CODE>
    <COMPONENT_TARIC_CODE>Test1</COMPONENT_TARIC_CODE>
    <COMPONENT_COO>HU</COMPONENT_COO>
    <COMPONENT_QTY>4</COMPONENT_QTY>
    </G_BREAKDOWN>
    <G_BREAKDOWN>
    <BREAKDOWN_TYPE>HTS CODE</BREAKDOWN_TYPE>
    <BREAKDOWN_VALUE>8536.90.4000</BREAKDOWN_VALUE>
    <COMPONENT>IP</COMPONENT>
    <COMPONENT_DESC></COMPONENT_DESC>
    <COMPONENT_CUSTOM_DESC></COMPONENT_CUSTOM_DESC>
    <COMPONENT_PRICE>452</COMPONENT_PRICE>
    <COMPONENT_HTS_CODE></COMPONENT_HTS_CODE>
    <COMPONENT_TARIC_CODE></COMPONENT_TARIC_CODE>
    <COMPONENT_COO>HU</COMPONENT_COO>
    <COMPONENT_QTY></COMPONENT_QTY>
    </G_BREAKDOWN>
    <G_BREAKDOWN>
    <BREAKDOWN_TYPE>HTS CODE</BREAKDOWN_TYPE>
    <BREAKDOWN_VALUE>8536.90.4000</BREAKDOWN_VALUE>
    <COMPONENT>Paper</COMPONENT>
    <COMPONENT_DESC></COMPONENT_DESC>
    <COMPONENT_CUSTOM_DESC></COMPONENT_CUSTOM_DESC>
    <COMPONENT_PRICE>8</COMPONENT_PRICE>
    <COMPONENT_HTS_CODE>2839.90.0000</COMPONENT_HTS_CODE>
    <COMPONENT_TARIC_CODE></COMPONENT_TARIC_CODE>
    <COMPONENT_COO>HU</COMPONENT_COO>
    <COMPONENT_QTY></COMPONENT_QTY>
    </G_BREAKDOWN>
    </LIST_G_BREAKDOWN>
    </G_LINES>
    <G_LINES>
    <DELIVERY_ID>2630054</DELIVERY_ID>
    <ORDER_HEADER_ID>1435114</ORDER_HEADER_ID>
    <ORDER_NUMBER>10004463</ORDER_NUMBER>
    <CUST_PO_NUMBER>310986-396</CUST_PO_NUMBER>
    <ORDER_LINE_ID>4580160</ORDER_LINE_ID>
    <INVENTORY_ITEM_ID>96909</INVENTORY_ITEM_ID>
    <PART_NUMBER>778729-01</PART_NUMBER>
    <PART_DESC>NI PCI-4474, 4 INPUTS, 24-BIT DYNAMIC SIGNAL ACQUISITION</PART_DESC>
    <PART_CUSTOM_DESC>PCI-4474, Automatic Data Processing Plug-In Board</PART_CUSTOM_DESC>
    <PLANNER_CODE>INSTRHMPS</PLANNER_CODE>
    <HTS_CODE>8471.80.4000</HTS_CODE>
    <TARIC_CODE>8471.80.0000</TARIC_CODE>
    <COUNTRY_OF_ORIGIN>HU</COUNTRY_OF_ORIGIN>
    <ORDER_CURRENCY_CODE>USD</ORDER_CURRENCY_CODE>
    <ORIG_UNIT_PRICE>960</ORIG_UNIT_PRICE>
    <ORIG_SHIP_QTY>4</ORIG_SHIP_QTY>
    <UNIT_PRICE>960</UNIT_PRICE>
    <PRICE_CALC_STEP_NUMBER>100</PRICE_CALC_STEP_NUMBER>
    <PRICE_CALC_CURRENCY_CODE>USD</PRICE_CALC_CURRENCY_CODE>
    <PRICE_CALC_UNIT_PRICE>960</PRICE_CALC_UNIT_PRICE>
    <PRICE_CALC_CONV_RATE>1</PRICE_CALC_CONV_RATE>
    <SHIP_QTY>4</SHIP_QTY>
    <EXTENDED_PRICE>3840</EXTENDED_PRICE>
    <UNIT_WEIGHT>.68</UNIT_WEIGHT>
    <NET_WEIGHT>2.72</NET_WEIGHT>
    <ACQ_SOURCE_CODE></ACQ_SOURCE_CODE>
    <ACQ_ORDER_NUMBER></ACQ_ORDER_NUMBER>
    <ACQ_SOURCE_ORDER_NUMBER></ACQ_SOURCE_ORDER_NUMBER>
    <ACQ_SELLING_PRICE>0</ACQ_SELLING_PRICE>
    <SUBINVENTORY>NIEC Stage</SUBINVENTORY>
    <SHIP_TO_SITE_USE_ID>807736</SHIP_TO_SITE_USE_ID>
    <FREIGHT_COST>0</FREIGHT_COST>
    <PAYMENT_TERMS>NIH InterCo</PAYMENT_TERMS>
    <WAYBILL>901000598/04 NIC</WAYBILL>
    <BREAKDOWN_COUNT>0</BREAKDOWN_COUNT>
    <LIST_G_BREAKDOWN>
    <G_BREAKDOWN>
    <BREAKDOWN_TYPE></BREAKDOWN_TYPE>
    <BREAKDOWN_VALUE></BREAKDOWN_VALUE>
    <COMPONENT></COMPONENT>
    <COMPONENT_DESC></COMPONENT_DESC>
    <COMPONENT_CUSTOM_DESC></COMPONENT_CUSTOM_DESC>
    <COMPONENT_PRICE></COMPONENT_PRICE>
    <COMPONENT_HTS_CODE></COMPONENT_HTS_CODE>
    <COMPONENT_TARIC_CODE></COMPONENT_TARIC_CODE>
    <COMPONENT_COO></COMPONENT_COO>
    <COMPONENT_QTY></COMPONENT_QTY>
    </G_BREAKDOWN>
    </LIST_G_BREAKDOWN>
    </G_LINES>
    </LIST_G_LINES>
    </G_HEADER>
    </LIST_G_HEADER>
    </NI_COMMERCIAL_INVOICE_XMLP>
    I want my report for part number (which has multiple component) look like:
    Part Number: 779475-01     Quantity: 23          Part Count:2     Breakdown Count:6
    Component: CD          Amount: 115
    Component: IP          Amount: 3151
    Component: Paper          Amount: 46
    Any help or suggestion is appreciated
    RK Shah
    [email protected]

    I am using the latest 10.1.3.2.1 build 87.
    The output that I see is :
    Part Number: 777687-14 Quantity: 4 Part Count:1 Breakdown Count:3
    Component: CD
    Count: 4
    Sum of Component Price: 20
    Component: IP
    Count: 0
    Sum of Component Price: 452
    Component: Paper
    Count: 0
    Sum of Component Price: 8
    Part Number: 777687-20 Quantity: 1 Part Count:1 Breakdown Count:3
    Component: CD
    Count: 1
    Sum of Component Price: 5
    Component: Paper
    Count: 0
    Sum of Component Price: 2
    Component: IP
    Count: 0
    Sum of Component Price: 75
    Part Number: 779475-01 Quantity: 23 Part Count:2 Breakdown Count:3
    Component: CD
    Count: 23
    Sum of Component Price: 115
    Component: Paper
    Count: 0
    Sum of Component Price: 46
    Component: IP
    Count: 0
    Sum of Component Price: 3151
    and the XML data that I used is :
    <?xml version="1.0"?>
    <!-- Generated by Oracle Reports version 6.0.8.25.0 -->
    <NI_COMMERCIAL_INVOICE_XMLP>
    <LIST_G_HEADER>
    <G_HEADER>
    <COMM_INV_NUMBER>C/901000598</COMM_INV_NUMBER>
    <COMM_INV_VERSION_NUMBER>1</COMM_INV_VERSION_NUMBER>
    <SHIP_FROM_NAME>National Instruments Europe Corp.</SHIP_FROM_NAME>
    <SHIP_FROM_ADDR>H-4031, Debrecen, Hatar ut 1/A</SHIP_FROM_ADDR>
    <SHIP_FROM_CITY></SHIP_FROM_CITY>
    <SHIP_FROM_STATE></SHIP_FROM_STATE>
    <SHIP_FROM_POSTAL_CODE></SHIP_FROM_POSTAL_CODE>
    <SHIP_FROM_COUNTRY>Hungary</SHIP_FROM_COUNTRY>
    <SHIP_TO_NAME>National Instruments Corporation (NIEC)</SHIP_TO_NAME>
    <FORMATTED_SHIP_TO_ADDR>11500 N Mopac Expwy
    Austin, TX 78759-3504
    United States</FORMATTED_SHIP_TO_ADDR>
    <SHIP_TO_ADDR1>11500 N Mopac Expwy</SHIP_TO_ADDR1>
    <SHIP_TO_ADDR2></SHIP_TO_ADDR2>
    <SHIP_TO_ADDR3></SHIP_TO_ADDR3>
    <SHIP_TO_ADDR4></SHIP_TO_ADDR4>
    <SHIP_TO_CITY>Austin</SHIP_TO_CITY>
    <SHIP_TO_STATE>TX </SHIP_TO_STATE>
    <SHIP_TO_POSTAL_CODE>78759-3504</SHIP_TO_POSTAL_CODE>
    <SHIP_TO_COUNTRY>US</SHIP_TO_COUNTRY>
    <SHIP_TO_EMAIL_ADDR></SHIP_TO_EMAIL_ADDR>
    <BILL_TO_ORG_ID>807737</BILL_TO_ORG_ID>
    <SHIPPED_VIA>UPS</SHIPPED_VIA>
    <DELIVERY_TERM>DDU</DELIVERY_TERM>
    <TEXT_FILE_SEPARATOR></TEXT_FILE_SEPARATOR>
    <DELIVERY_COUNT>4</DELIVERY_COUNT>
    <HEADER_WAYBILL></HEADER_WAYBILL>
    <LIST_G_LINES>
    <G_LINES>
    <DELIVERY_ID>2629769</DELIVERY_ID>
    <ORDER_HEADER_ID>1431282</ORDER_HEADER_ID>
    <ORDER_NUMBER>10004434</ORDER_NUMBER>
    <CUST_PO_NUMBER>310986-387</CUST_PO_NUMBER>
    <ORDER_LINE_ID>4565737</ORDER_LINE_ID>
    <INVENTORY_ITEM_ID>26818</INVENTORY_ITEM_ID>
    <PART_NUMBER>777459-23</PART_NUMBER>
    <PART_DESC>SCC-AI04, 2-CHANNEL ISOLATED ANALOG INPUT</PART_DESC>
    <PART_CUSTOM_DESC>SCC-AI04, Automatic Data Processing Plug-In Board</PART_CUSTOM_DESC>
    <PLANNER_CODE>SCXIH-MPS</PLANNER_CODE>
    <HTS_CODE>8471.80.9000</HTS_CODE>
    <TARIC_CODE>8471.80.0000</TARIC_CODE>
    <COUNTRY_OF_ORIGIN>HU</COUNTRY_OF_ORIGIN>
    <ORDER_CURRENCY_CODE>USD</ORDER_CURRENCY_CODE>
    <ORIG_UNIT_PRICE>158</ORIG_UNIT_PRICE>
    <ORIG_SHIP_QTY>4</ORIG_SHIP_QTY>
    <UNIT_PRICE>158</UNIT_PRICE>
    <PRICE_CALC_STEP_NUMBER>100</PRICE_CALC_STEP_NUMBER>
    <PRICE_CALC_CURRENCY_CODE>USD</PRICE_CALC_CURRENCY_CODE>
    <PRICE_CALC_UNIT_PRICE>158</PRICE_CALC_UNIT_PRICE>
    <PRICE_CALC_CONV_RATE>1</PRICE_CALC_CONV_RATE>
    <SHIP_QTY>4</SHIP_QTY>
    <EXTENDED_PRICE>632</EXTENDED_PRICE>
    <UNIT_WEIGHT>.16</UNIT_WEIGHT>
    <NET_WEIGHT>.64</NET_WEIGHT>
    <ACQ_SOURCE_CODE></ACQ_SOURCE_CODE>
    <ACQ_ORDER_NUMBER></ACQ_ORDER_NUMBER>
    <ACQ_SOURCE_ORDER_NUMBER></ACQ_SOURCE_ORDER_NUMBER>
    <ACQ_SELLING_PRICE>0</ACQ_SELLING_PRICE>
    <SUBINVENTORY>NIEC Stage</SUBINVENTORY>
    <SHIP_TO_SITE_USE_ID>807736</SHIP_TO_SITE_USE_ID>
    <FREIGHT_COST>0</FREIGHT_COST>
    <PAYMENT_TERMS>NIH InterCo</PAYMENT_TERMS>
    <WAYBILL>901000598/01 NIC</WAYBILL>
    <BREAKDOWN_COUNT>0</BREAKDOWN_COUNT>
    <LIST_G_BREAKDOWN>
    <G_BREAKDOWN>
    <BREAKDOWN_TYPE></BREAKDOWN_TYPE>
    <BREAKDOWN_VALUE></BREAKDOWN_VALUE>
    <COMPONENT></COMPONENT>
    <COMPONENT_DESC></COMPONENT_DESC>
    <COMPONENT_CUSTOM_DESC></COMPONENT_CUSTOM_DESC>
    <COMPONENT_PRICE></COMPONENT_PRICE>
    <COMPONENT_HTS_CODE></COMPONENT_HTS_CODE>
    <COMPONENT_TARIC_CODE></COMPONENT_TARIC_CODE>
    <COMPONENT_COO></COMPONENT_COO>
    <COMPONENT_QTY></COMPONENT_QTY>
    </G_BREAKDOWN>
    </LIST_G_BREAKDOWN>
    </G_LINES>
    <G_LINES>
    <DELIVERY_ID>2629769</DELIVERY_ID>
    <ORDER_HEADER_ID>1431282</ORDER_HEADER_ID>
    <ORDER_NUMBER>10004434</ORDER_NUMBER>
    <CUST_PO_NUMBER>310986-387</CUST_PO_NUMBER>
    <ORDER_LINE_ID>4579950</ORDER_LINE_ID>
    <INVENTORY_ITEM_ID>143949</INVENTORY_ITEM_ID>
    <PART_NUMBER>779475-01</PART_NUMBER>
    <PART_DESC>SCC-68 I/O CONNECTOR BLOCK WITH 4 SCC SIGNAL CONDITIONING MODULE SLOTS</PART_DESC>
    <PART_CUSTOM_DESC>SCC-68, Screw Terminals</PART_CUSTOM_DESC>
    <PLANNER_CODE>DAQH-MPS</PLANNER_CODE>
    <HTS_CODE>8536.90.4000</HTS_CODE>
    <TARIC_CODE>8536.90.1000</TARIC_CODE>
    <COUNTRY_OF_ORIGIN>HU</COUNTRY_OF_ORIGIN>
    <ORDER_CURRENCY_CODE>USD</ORDER_CURRENCY_CODE>
    <ORIG_UNIT_PRICE>144</ORIG_UNIT_PRICE>
    <ORIG_SHIP_QTY>10</ORIG_SHIP_QTY>
    <UNIT_PRICE>144</UNIT_PRICE>
    <PRICE_CALC_STEP_NUMBER>100</PRICE_CALC_STEP_NUMBER>
    <PRICE_CALC_CURRENCY_CODE>USD</PRICE_CALC_CURRENCY_CODE>
    <PRICE_CALC_UNIT_PRICE>144</PRICE_CALC_UNIT_PRICE>
    <PRICE_CALC_CONV_RATE>1</PRICE_CALC_CONV_RATE>
    <SHIP_QTY>10</SHIP_QTY>
    <EXTENDED_PRICE>1440</EXTENDED_PRICE>
    <UNIT_WEIGHT>1.06</UNIT_WEIGHT>
    <NET_WEIGHT>10.6</NET_WEIGHT>
    <ACQ_SOURCE_CODE></ACQ_SOURCE_CODE>
    <ACQ_ORDER_NUMBER></ACQ_ORDER_NUMBER>
    <ACQ_SOURCE_ORDER_NUMBER></ACQ_SOURCE_ORDER_NUMBER>
    <ACQ_SELLING_PRICE>0</ACQ_SELLING_PRICE>
    <SUBINVENTORY>NIEC Stage</SUBINVENTORY>
    <SHIP_TO_SITE_USE_ID>807736</SHIP_TO_SITE_USE_ID>
    <FREIGHT_COST>0</FREIGHT_COST>
    <PAYMENT_TERMS>NIH InterCo</PAYMENT_TERMS>
    <WAYBILL>901000598/01 NIC</WAYBILL>
    <BREAKDOWN_COUNT>3</BREAKDOWN_COUNT>
    <LIST_G_BREAKDOWN>
    <G_BREAKDOWN>
    <BREAKDOWN_TYPE>HTS CODE</BREAKDOWN_TYPE>
    <BREAKDOWN_VALUE>8536.90.4000</BREAKDOWN_VALUE>
    <COMPONENT>CD</COMPONENT>
    <COMPONENT_DESC>Test1</COMPONENT_DESC>
    <COMPONENT_CUSTOM_DESC></COMPONENT_CUSTOM_DESC>
    <COMPONENT_PRICE>50</COMPONENT_PRICE>
    <COMPONENT_HTS_CODE>2803.00.0050</COMPONENT_HTS_CODE>
    <COMPONENT_TARIC_CODE>Test1</COMPONENT_TARIC_CODE>
    <COMPONENT_COO>HU</COMPONENT_COO>
    <COMPONENT_QTY>10</COMPONENT_QTY>
    </G_BREAKDOWN>
    <G_BREAKDOWN>
    <BREAKDOWN_TYPE>HTS CODE</BREAKDOWN_TYPE>
    <BREAKDOWN_VALUE>8536.90.4000</BREAKDOWN_VALUE>
    <COMPONENT>Paper</COMPONENT>
    <COMPONENT_DESC></COMPONENT_DESC>
    <COMPONENT_CUSTOM_DESC></COMPONENT_CUSTOM_DESC>
    <COMPONENT_PRICE>20</COMPONENT_PRICE>
    <COMPONENT_HTS_CODE>2839.90.0000</COMPONENT_HTS_CODE>
    <COMPONENT_TARIC_CODE></COMPONENT_TARIC_CODE>
    <COMPONENT_COO>HU</COMPONENT_COO>
    <COMPONENT_QTY></COMPONENT_QTY>
    </G_BREAKDOWN>
    <G_BREAKDOWN>
    <BREAKDOWN_TYPE>HTS CODE</BREAKDOWN_TYPE>
    <BREAKDOWN_VALUE>8536.90.4000</BREAKDOWN_VALUE>
    <COMPONENT>IP</COMPONENT>
    <COMPONENT_DESC></COMPONENT_DESC>
    <COMPONENT_CUSTOM_DESC></COMPONENT_CUSTOM_DESC>
    <COMPONENT_PRICE>1370</COMPONENT_PRICE>
    <COMPONENT_HTS_CODE></COMPONENT_HTS_CODE>
    <COMPONENT_TARIC_CODE></COMPONENT_TARIC_CODE>
    <COMPONENT_COO>HU</COMPONENT_COO>
    <COMPONENT_QTY></COMPONENT_QTY>
    </G_BREAKDOWN>
    </LIST_G_BREAKDOWN>
    </G_LINES>
    <G_LINES>
    <DELIVERY_ID>2629822</DELIVERY_ID>
    <ORDER_HEADER_ID>1425429</ORDER_HEADER_ID>
    <ORDER_NUMBER>10004365</ORDER_NUMBER>
    <CUST_PO_NUMBER>310986-372</CUST_PO_NUMBER>
    <ORDER_LINE_ID>4579940</ORDER_LINE_ID>
    <INVENTORY_ITEM_ID>22643</INVENTORY_ITEM_ID>
    <PART_NUMBER>777687-20</PART_NUMBER>
    <PART_DESC>SCXI-1320 TEMPERATURE SENSOR TERMINAL BLOCK, CAST</PART_DESC>
    <PART_CUSTOM_DESC>SCXI-1320, Screw Terminals</PART_CUSTOM_DESC>
    <PLANNER_CODE>SCXIH-MPS</PLANNER_CODE>
    <HTS_CODE>8536.90.4000</HTS_CODE>
    <TARIC_CODE>8536.90.1000</TARIC_CODE>
    <COUNTRY_OF_ORIGIN>HU</COUNTRY_OF_ORIGIN>
    <ORDER_CURRENCY_CODE>USD</ORDER_CURRENCY_CODE>
    <ORIG_UNIT_PRICE>82</ORIG_UNIT_PRICE>
    <ORIG_SHIP_QTY>1</ORIG_SHIP_QTY>
    <UNIT_PRICE>82</UNIT_PRICE>
    <PRICE_CALC_STEP_NUMBER>100</PRICE_CALC_STEP_NUMBER>
    <PRICE_CALC_CURRENCY_CODE>USD</PRICE_CALC_CURRENCY_CODE>
    <PRICE_CALC_UNIT_PRICE>82</PRICE_CALC_UNIT_PRICE>
    <PRICE_CALC_CONV_RATE>1</PRICE_CALC_CONV_RATE>
    <SHIP_QTY>1</SHIP_QTY>
    <EXTENDED_PRICE>82</EXTENDED_PRICE>
    <UNIT_WEIGHT>.57</UNIT_WEIGHT>
    <NET_WEIGHT>.57</NET_WEIGHT>
    <ACQ_SOURCE_CODE></ACQ_SOURCE_CODE>
    <ACQ_ORDER_NUMBER></ACQ_ORDER_NUMBER>
    <ACQ_SOURCE_ORDER_NUMBER></ACQ_SOURCE_ORDER_NUMBER>
    <ACQ_SELLING_PRICE>0</ACQ_SELLING_PRICE>
    <SUBINVENTORY>NIEC Stage</SUBINVENTORY>
    <SHIP_TO_SITE_USE_ID>807736</SHIP_TO_SITE_USE_ID>
    <FREIGHT_COST>0</FREIGHT_COST>
    <PAYMENT_TERMS>NIH InterCo</PAYMENT_TERMS>
    <WAYBILL>901000598/02 NIC</WAYBILL>
    <BREAKDOWN_COUNT>3</BREAKDOWN_COUNT>
    <LIST_G_BREAKDOWN>
    <G_BREAKDOWN>
    <BREAKDOWN_TYPE>HTS CODE</BREAKDOWN_TYPE>
    <BREAKDOWN_VALUE>8536.90.4000</BREAKDOWN_VALUE>
    <COMPONENT>CD</COMPONENT>
    <COMPONENT_DESC>Test1</COMPONENT_DESC>
    <COMPONENT_CUSTOM_DESC></COMPONENT_CUSTOM_DESC>
    <COMPONENT_PRICE>5</COMPONENT_PRICE>
    <COMPONENT_HTS_CODE>2803.00.0050</COMPONENT_HTS_CODE>
    <COMPONENT_TARIC_CODE>Test1</COMPONENT_TARIC_CODE>
    <COMPONENT_COO>HU</COMPONENT_COO>
    <COMPONENT_QTY>1</COMPONENT_QTY>
    </G_BREAKDOWN>
    <G_BREAKDOWN>
    <BREAKDOWN_TYPE>HTS CODE</BREAKDOWN_TYPE>
    <BREAKDOWN_VALUE>8536.90.4000</BREAKDOWN_VALUE>
    <COMPONENT>Paper</COMPONENT>
    <COMPONENT_DESC></COMPONENT_DESC>
    <COMPONENT_CUSTOM_DESC></COMPONENT_CUSTOM_DESC>
    <COMPONENT_PRICE>2</COMPONENT_PRICE>
    <COMPONENT_HTS_CODE>2839.90.0000</COMPONENT_HTS_CODE>
    <COMPONENT_TARIC_CODE></COMPONENT_TARIC_CODE>
    <COMPONENT_COO>HU</COMPONENT_COO>
    <COMPONENT_QTY></COMPONENT_QTY>
    </G_BREAKDOWN>
    <G_BREAKDOWN>
    <BREAKDOWN_TYPE>HTS CODE</BREAKDOWN_TYPE>
    <BREAKDOWN_VALUE>8536.90.4000</BREAKDOWN_VALUE>
    <COMPONENT>IP</COMPONENT>
    <COMPONENT_DESC></COMPONENT_DESC>
    <COMPONENT_CUSTOM_DESC></COMPONENT_CUSTOM_DESC>
    <COMPONENT_PRICE>75</COMPONENT_PRICE>
    <COMPONENT_HTS_CODE></COMPONENT_HTS_CODE>
    <COMPONENT_TARIC_CODE></COMPONENT_TARIC_CODE>
    <COMPONENT_COO>HU</COMPONENT_COO>
    <COMPONENT_QTY></COMPONENT_QTY>
    </G_BREAKDOWN>
    </LIST_G_BREAKDOWN>
    </G_LINES>
    <G_LINES>
    <DELIVERY_ID>2629822</DELIVERY_ID>
    <ORDER_HEADER_ID>1427673</ORDER_HEADER_ID>
    <ORDER_NUMBER>10004391</ORDER_NUMBER>
    <CUST_PO_NUMBER>310986-377</CUST_PO_NUMBER>
    <ORDER_LINE_ID>4579948</ORDER_LINE_ID>
    <INVENTORY_ITEM_ID>143949</INVENTORY_ITEM_ID>
    <PART_NUMBER>779475-01</PART_NUMBER>
    <PART_DESC>SCC-68 I/O CONNECTOR BLOCK WITH 4 SCC SIGNAL CONDITIONING MODULE SLOTS</PART_DESC>
    <PART_CUSTOM_DESC>SCC-68, Screw Terminals</PART_CUSTOM_DESC>
    <PLANNER_CODE>DAQH-MPS</PLANNER_CODE>
    <HTS_CODE>8536.90.4000</HTS_CODE>
    <TARIC_CODE>8536.90.1000</TARIC_CODE>
    <COUNTRY_OF_ORIGIN>HU</COUNTRY_OF_ORIGIN>
    <ORDER_CURRENCY_CODE>USD</ORDER_CURRENCY_CODE>
    <ORIG_UNIT_PRICE>144</ORIG_UNIT_PRICE>
    <ORIG_SHIP_QTY>13</ORIG_SHIP_QTY>
    <UNIT_PRICE>144</UNIT_PRICE>
    <PRICE_CALC_STEP_NUMBER>100</PRICE_CALC_STEP_NUMBER>
    <PRICE_CALC_CURRENCY_CODE>USD</PRICE_CALC_CURRENCY_CODE>
    <PRICE_CALC_UNIT_PRICE>144</PRICE_CALC_UNIT_PRICE>
    <PRICE_CALC_CONV_RATE>1</PRICE_CALC_CONV_RATE>
    <SHIP_QTY>13</SHIP_QTY>
    <EXTENDED_PRICE>1872</EXTENDED_PRICE>
    <UNIT_WEIGHT>1.06</UNIT_WEIGHT>
    <NET_WEIGHT>13.78</NET_WEIGHT>
    <ACQ_SOURCE_CODE></ACQ_SOURCE_CODE>
    <ACQ_ORDER_NUMBER></ACQ_ORDER_NUMBER>
    <ACQ_SOURCE_ORDER_NUMBER></ACQ_SOURCE_ORDER_NUMBER>
    <ACQ_SELLING_PRICE>0</ACQ_SELLING_PRICE>
    <SUBINVENTORY>NIEC Stage</SUBINVENTORY>
    <SHIP_TO_SITE_USE_ID>807736</SHIP_TO_SITE_USE_ID>
    <FREIGHT_COST>0</FREIGHT_COST>
    <PAYMENT_TERMS>NIH InterCo</PAYMENT_TERMS>
    <WAYBILL>901000598/02 NIC</WAYBILL>
    <BREAKDOWN_COUNT>3</BREAKDOWN_COUNT>
    <LIST_G_BREAKDOWN>
    <G_BREAKDOWN>
    <BREAKDOWN_TYPE>HTS CODE</BREAKDOWN_TYPE>
    <BREAKDOWN_VALUE>8536.90.4000</BREAKDOWN_VALUE>
    <COMPONENT>CD</COMPONENT>
    <COMPONENT_DESC>Test1</COMPONENT_DESC>
    <COMPONENT_CUSTOM_DESC></COMPONENT_CUSTOM_DESC>
    <COMPONENT_PRICE>65</COMPONENT_PRICE>
    <COMPONENT_HTS_CODE>2803.00.0050</COMPONENT_HTS_CODE>
    <COMPONENT_TARIC_CODE>Test1</COMPONENT_TARIC_CODE>
    <COMPONENT_COO>HU</COMPONENT_COO>
    <COMPONENT_QTY>13</COMPONENT_QTY>
    </G_BREAKDOWN>
    <G_BREAKDOWN>
    <BREAKDOWN_TYPE>HTS CODE</BREAKDOWN_TYPE>
    <BREAKDOWN_VALUE>8536.90.4000</BREAKDOWN_VALUE>
    <COMPONENT>Paper</COMPONENT>
    <COMPONENT_DESC></COMPONENT_DESC>
    <COMPONENT_CUSTOM_DESC></COMPONENT_CUSTOM_DESC>
    <COMPONENT_PRICE>26</COMPONENT_PRICE>
    <COMPONENT_HTS_CODE>2839.90.0000</COMPONENT_HTS_CODE>
    <COMPONENT_TARIC_CODE></COMPONENT_TARIC_CODE>
    <COMPONENT_COO>HU</COMPONENT_COO>
    <COMPONENT_QTY></COMPONENT_QTY>
    </G_BREAKDOWN>
    <G_BREAKDOWN>
    <BREAKDOWN_TYPE>HTS CODE</BREAKDOWN_TYPE>
    <BREAKDOWN_VALUE>8536.90.4000</BREAKDOWN_VALUE>
    <COMPONENT>IP</COMPONENT>
    <COMPONENT_DESC></COMPONENT_DESC>
    <COMPONENT_CUSTOM_DESC></COMPONENT_CUSTOM_DESC>
    <COMPONENT_PRICE>1781</COMPONENT_PRICE>
    <COMPONENT_HTS_CODE></COMPONENT_HTS_CODE>
    <COMPONENT_TARIC_CODE></COMPONENT_TARIC_CODE>
    <COMPONENT_COO>HU</COMPONENT_COO>
    <COMPONENT_QTY></COMPONENT_QTY>
    </G_BREAKDOWN>
    </LIST_G_BREAKDOWN>
    </G_LINES>
    <G_LINES>
    <DELIVERY_ID>2630021</DELIVERY_ID>
    <ORDER_HEADER_ID>1429687</ORDER_HEADER_ID>
    <ORDER_NUMBER>10004410</ORDER_NUMBER>
    <CUST_PO_NUMBER>310986-383</CUST_PO_NUMBER>
    <ORDER_LINE_ID>4578220</ORDER_LINE_ID>
    <INVENTORY_ITEM_ID>61816</INVENTORY_ITEM_ID>
    <PART_NUMBER>777687-14</PART_NUMBER>
    <PART_DESC>SCXI-1314 FRONT MOUNTING TERMINAL BLOCK</PART_DESC>
    <PART_CUSTOM_DESC>SCXI-1314, Screw Terminals</PART_CUSTOM_DESC>
    <PLANNER_CODE>SCXIH-MPS</PLANNER_CODE>
    <HTS_CODE>8536.90.4000</HTS_CODE>
    <TARIC_CODE>8536.90.1000</TARIC_CODE>
    <COUNTRY_OF_ORIGIN>HU</COUNTRY_OF_ORIGIN>
    <ORDER_CURRENCY_CODE>USD</ORDER_CURRENCY_CODE>
    <ORIG_UNIT_PRICE>120</ORIG_UNIT_PRICE>
    <ORIG_SHIP_QTY>4</ORIG_SHIP_QTY>
    <UNIT_PRICE>120</UNIT_PRICE>
    <PRICE_CALC_STEP_NUMBER>100</PRICE_CALC_STEP_NUMBER>
    <PRICE_CALC_CURRENCY_CODE>USD</PRICE_CALC_CURRENCY_CODE>
    <PRICE_CALC_UNIT_PRICE>120</PRICE_CALC_UNIT_PRICE>
    <PRICE_CALC_CONV_RATE>1</PRICE_CALC_CONV_RATE>
    <SHIP_QTY>4</SHIP_QTY>
    <EXTENDED_PRICE>480</EXTENDED_PRICE>
    <UNIT_WEIGHT>.68</UNIT_WEIGHT>
    <NET_WEIGHT>2.72</NET_WEIGHT>
    <ACQ_SOURCE_CODE></ACQ_SOURCE_CODE>
    <ACQ_ORDER_NUMBER></ACQ_ORDER_NUMBER>
    <ACQ_SOURCE_ORDER_NUMBER></ACQ_SOURCE_ORDER_NUMBER>
    <ACQ_SELLING_PRICE>0</ACQ_SELLING_PRICE>
    <SUBINVENTORY>NIEC Stage</SUBINVENTORY>
    <SHIP_TO_SITE_USE_ID>807736</SHIP_TO_SITE_USE_ID>
    <FREIGHT_COST>0</FREIGHT_COST>
    <PAYMENT_TERMS>NIH InterCo</PAYMENT_TERMS>
    <WAYBILL>901000598/03 NIC</WAYBILL>
    <BREAKDOWN_COUNT>3</BREAKDOWN_COUNT>
    <LIST_G_BREAKDOWN>
    <G_BREAKDOWN>
    <BREAKDOWN_TYPE>HTS CODE</BREAKDOWN_TYPE>
    <BREAKDOWN_VALUE>8536.90.4000</BREAKDOWN_VALUE>
    <COMPONENT>CD</COMPONENT>
    <COMPONENT_DESC>Test1</COMPONENT_DESC>
    <COMPONENT_CUSTOM_DESC></COMPONENT_CUSTOM_DESC>
    <COMPONENT_PRICE>20</COMPONENT_PRICE>
    <COMPONENT_HTS_CODE>2803.00.0050</COMPONENT_HTS_CODE>
    <COMPONENT_TARIC_CODE>Test1</COMPONENT_TARIC_CODE>
    <COMPONENT_COO>HU</COMPONENT_COO>
    <COMPONENT_QTY>4</COMPONENT_QTY>
    </G_BREAKDOWN>
    <G_BREAKDOWN>
    <BREAKDOWN_TYPE>HTS CODE</BREAKDOWN_TYPE>
    <BREAKDOWN_VALUE>8536.90.4000</BREAKDOWN_VALUE>
    <COMPONENT>IP</COMPONENT>
    <COMPONENT_DESC></COMPONENT_DESC>
    <COMPONENT_CUSTOM_DESC></COMPONENT_CUSTOM_DESC>
    <COMPONENT_PRICE>452</COMPONENT_PRICE>
    <COMPONENT_HTS_CODE></COMPONENT_HTS_CODE>
    <COMPONENT_TARIC_CODE></COMPONENT_TARIC_CODE>
    <COMPONENT_COO>HU</COMPONENT_COO>
    <COMPONENT_QTY></COMPONENT_QTY>
    </G_BREAKDOWN>
    <G_BREAKDOWN>
    <BREAKDOWN_TYPE>HTS CODE</BREAKDOWN_TYPE>
    <BREAKDOWN_VALUE>8536.90.4000</BREAKDOWN_VALUE>
    <COMPONENT>Paper</COMPONENT>
    <COMPONENT_DESC></COMPONENT_DESC>
    <COMPONENT_CUSTOM_DESC></COMPONENT_CUSTOM_DESC>
    <COMPONENT_PRICE>8</COMPONENT_PRICE>
    <COMPONENT_HTS_CODE>2839.90.0000</COMPONENT_HTS_CODE>
    <COMPONENT_TARIC_CODE></COMPONENT_TARIC_CODE>
    <COMPONENT_COO>HU</COMPONENT_COO>
    <COMPONENT_QTY></COMPONENT_QTY>
    </G_BREAKDOWN>
    </LIST_G_BREAKDOWN>
    </G_LINES>
    <G_LINES>
    <DELIVERY_ID>2630054</DELIVERY_ID>
    <ORDER_HEADER_ID>1435114</ORDER_HEADER_ID>
    <ORDER_NUMBER>10004463</ORDER_NUMBER>
    <CUST_PO_NUMBER>310986-396</CUST_PO_NUMBER>
    <ORDER_LINE_ID>4580160</ORDER_LINE_ID>
    <INVENTORY_ITEM_ID>96909</INVENTORY_ITEM_ID>
    <PART_NUMBER>778729-01</PART_NUMBER>
    <PART_DESC>NI PCI-4474, 4 INPUTS, 24-BIT DYNAMIC SIGNAL ACQUISITION</PART_DESC>
    <PART_CUSTOM_DESC>PCI-4474, Automatic Data Processing Plug-In Board</PART_CUSTOM_DESC>
    <PLANNER_CODE>INSTRHMPS</PLANNER_CODE>
    <HTS_CODE>8471.80.4000</HTS_CODE>
    <TARIC_CODE>8471.80.0000</TARIC_CODE>
    <COUNTRY_OF_ORIGIN>HU</COUNTRY_OF_ORIGIN>
    <ORDER_CURRENCY_CODE>USD</ORDER_CURRENCY_CODE>
    <ORIG_UNIT_PRICE>960</ORIG_UNIT_PRICE>
    <ORIG_SHIP_QTY>4</ORIG_SHIP_QTY>
    <UNIT_PRICE>960</UNIT_PRICE>
    <PRICE_CALC_STEP_NUMBER>100</PRICE_CALC_STEP_NUMBER>
    <PRICE_CALC_CURRENCY_CODE>USD</PRICE_CALC_CURRENCY_CODE>
    <PRICE_CALC_UNIT_PRICE>960</PRICE_CALC_UNIT_PRICE>
    <PRICE_CALC_CONV_RATE>1</PRICE_CALC_CONV_RATE>
    <SHIP_QTY>4</SHIP_QTY>
    <EXTENDED_PRICE>3840</EXTENDED_PRICE>
    <UNIT_WEIGHT>.68</UNIT_WEIGHT>
    <NET_WEIGHT>2.72</NET_WEIGHT>
    <ACQ_SOURCE_CODE></ACQ_SOURCE_CODE>
    <ACQ_ORDER_NUMBER></ACQ_ORDER_NUMBER>
    <ACQ_SOURCE_ORDER_NUMBER></ACQ_SOURCE_ORDER_NUMBER>
    <ACQ_SELLING_PRICE>0</ACQ_SELLING_PRICE>
    <SUBINVENTORY>NIEC Stage</SUBINVENTORY>
    <SHIP_TO_SITE_USE_ID>807736</SHIP_TO_SITE_USE_ID>
    <FREIGHT_COST>0</FREIGHT_COST>
    <PAYMENT_TERMS>NIH InterCo</PAYMENT_TERMS>
    <WAYBILL>901000598/04 NIC</WAYBILL>
    <BREAKDOWN_COUNT>0</BREAKDOWN_COUNT>
    <LIST_G_BREAKDOWN>
    <G_BREAKDOWN>
    <BREAKDOWN_TYPE></BREAKDOWN_TYPE>
    <BREAKDOWN_VALUE></BREAKDOWN_VALUE>
    <COMPONENT></COMPONENT>
    <COMPONENT_DESC></COMPONENT_DESC>
    <COMPONENT_CUSTOM_DESC></COMPONENT_CUSTOM_DESC>
    <COMPONENT_PRICE></COMPONENT_PRICE>
    <COMPONENT_HTS_CODE></COMPONENT_HTS_CODE>
    <COMPONENT_TARIC_CODE></COMPONENT_TARIC_CODE>
    <COMPONENT_COO></COMPONENT_COO>
    <COMPONENT_QTY></COMPONENT_QTY>
    </G_BREAKDOWN>
    </LIST_G_BREAKDOWN>
    </G_LINES>
    </LIST_G_LINES>
    </G_HEADER>
    </LIST_G_HEADER>
    </NI_COMMERCIAL_INVOICE_XMLP>

  • Ideal way to report on Nested Groups and their Members - I can get the script to work if there's one group, but not if there is two or more

    Hi All,
    I like to keep track of Groups and Users added into our Domain Admins.  Yes, it should always be minimal, but if I can have a daily report just to be certain, I'll sleep better.
    The following works just fine if there is a single nested group.  I cannot get it to work properly if there is more than one.  I'm hoping you'll see what I'm missing.
    Works fine:
    $admins = get-adgroupmember "domain admins"
    foreach($i in $admins){if($i.objectClass -eq "group"){ get-adgroupmember $i.samaccountname |foreach {New-Object PSObject -Property @{ username = $_.name;Group = $($i.name)}} | select username,group | export-csv c:\Users_and_Groups.csv -Notypeinformation}}
    Does not work well.  Result is that the "Group" information doesn't change to the correct group:
    $myCol=@()
    foreach($admin in $admins){if($admin.objectClass -eq "group"){$myCol+=$admin.samaccountname}{foreach($i in $myCol){get-adgroupmember $i | foreach {New-Object PSObject -Property @{ username = $_.name;Group = $($admin.name)}} | select username,group
    | export-csv c:\Users_and_Groups.csv -Notypeinformation}}}
    Here is what I have in $myCol:
    PS C:\Users\Administrator> $myCol
    MarketingPSO
    RMSysAdmins
    I tried shortening up the one-liner a bit more, but for some reason the "RMSysAdmins" is the only Group listed even though Leia and Han are in the MarketingPSO Group:
    foreach($i in $myCol){get-adgroupmember $i | foreach {New-Object PSObject -Property @{ username = $_.name;Group = $($admin.name)}} | select username,group }
    username                                                   
    Group                                                     
    Leia Organa                                                
    RMSysAdmins                                               
    Han Solo                                                   
    RMSysAdmins                                               
    c3po                                                       
    RMSysAdmins                                               
    Darth Vader                                                
    RMSysAdmins                                               
    Boba Fett                                                  
    RMSysAdmins
    Thank you very much for your time,
    Mr Mister

    Hi Mr Mister,
    To get nested group members, this script is for your reference:
    function Get-ADNestedGroupMembers {
    [cmdletbinding()]
    param ( [String] $Group )
    Import-Module ActiveDirectory
    $Members = Get-ADGroupMember -Identity $Group|sort-object objectClass -descending
    $members | % {
    if($_.ObjectClass -eq "group") {
    Get-ADNestedGroupMembers -Group $_.samaccountname
    } else {
    New-Object PSObject -Property @{ username = $_.name;Group = $Group }}
    Get-ADNestedGroupMembers "groupname"
    If there is anything else regarding this issue, please feel free to post back.
    Best Regards,
    Anna Wang
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • PS CS6: It'd be helpful to have the option to collapse or expand the nested groups and layers.

    PS CS6: It'd be helpful to have the option to collapse or expand the nested groups and layers all at once.  Autodesk Maya has a similar feature in it's outliner that allows for you to do this.

    And as Jeffrey Tranberry answered there:
    • Open/close all layer groups (folders) at the current level of hierarchy: Cmd-click the arrow next to the group - This is handy when you want to open/close, say, all the top-level groups without disturbing the open/closed state of any groups nested within them.
    • Open/close all layer groups nested within the current one: Opt-click the arrow next to the group - This is nice when you want to open/shut a bunch of nested groups, without affecting any that lie outside the target group.
    • Open/close all layer groups, period: Cmd-Opt-click the arrow next to a group So, to keep things simple: when in doubt, Cmd-Opt-click a group’s arrow and you’ll collapse/expand all groups.
    * On Windows please substitutes Ctrl for Cmd and Alt for Opt. .

  • Getting a list of users and permission from a folder including nested groups

    $project_folder = "\\servername\foldername\foldername1"
    Get-Acl $project_folder | 
        ForEach-Object { 
            $_.Access | Add-Member -MemberType NoteProperty -Name Path -Value $_.Path -PassThru  
        } | 
        ft -GroupBy Path -Property IdentityReference, AccessControlType, FileSystemRights > foldertst.csv
    The above command gives me a list of all the users who have access to foldername1. (including users and groups).
    How do i modify this code to get the information of the nested groups for this folder

    Sorry, I won't be providing a complete solution, just a few suggestions and comments.
    first thing will be to determine for each ACE (access control entry) whether the IdentityReference refers to a user account or a group. If a group, you will then need to process each of its members, each of which will share the FileSystemRights of the current
    ACE.
    But... if any of the members are other groups, you will need to process them recursively as well. Recursively.
    There are a few gotcha's, though:
    you need to recognize and avoid infinite recursion when, for example, group A is a member of group B which is a member of group A. One way to do this is to keep a list of all groups encountered, processing each only once.
    if one ACE belongs to group C, another belongs to group D, group A is a member of C, and group B is a member of D, you must ensure that all members of A and B are listed with ACE C and ACE D.
    Once you have identified all user accounts you might find that some have multiple records. For example, user AA might belong to group A, and get unlimited access through the ACE owned by group C, but deny read access through the ACE owned by group D. If
    the first mention of this user in your output shows he has unlimited access, that will, of course be incorrect. at the very least the output should be sorted by username. You could attempt to amalgamate all of his various accesses (like the effective permissions
    tab) into a single one. But it would be difficult to show which group memberships contributed which aspects of his access permissions in any kind of simple or intuitive way.
    security configurations can easily become overly complex. The best solution is to simplify and standardize how permissions are applied and how groups are nested. I have had to do this on occasion, and the problem of determining how things should be permitted
    from how they actually are is probably the most complicated part of the job.
    good luck.
    Al Dunbar -- remember to 'mark or propose as answer' or 'vote as helpful' as appropriate.

  • Nested group function

    Hello all,
    How can I use a nested group function in a select statement?
    For example: select sum(count(id), column a, column b from table_name group by???
    Thanks in advance!

    select sum(CNT) column_a, column_b
           from  (select count(id), column_a, column_b from table_name
                            group by column_a, column_b)
    group by column_a, column_b

  • Nested group function without group xmlagg

    I am getting nested group function without group by xmlagg when using the xmlagg function inside another xmlagg function. Find the table structure and sample data here,
    CREATE TABLE "TEST_TABLE"
       ("KEY" NUMBER(20,0),
        "NAME" VARCHAR2(50 ),
        "DESCRIPTION" VARCHAR2(100 )
       Insert into TEST_TABLE (KEY,NAME,DESCRIPTION) values (1,'sam','desc1');
       Insert into TEST_TABLE (KEY,NAME,DESCRIPTION) values (2,'max','desc2');
       Insert into TEST_TABLE (KEY,NAME,DESCRIPTION) values (3,'peter',null);
       Insert into TEST_TABLE (KEY,NAME,DESCRIPTION) values (4,'andrew',null);
    select
            XMLSerialize(document
            xmlelement("root",
             xmlagg(
               xmlelement("emp"          
               , xmlforest(Key as "ID")          
               , xmlforest(name as "ename")
               , xmlelement("Descriptions", 
               xmlagg(
                  xmlforest(description as "Desc")
           ) as clob indent
           ) as t   
          from test_table;Then i removed the xmlagg function from the above select query and used xmlelement instead
      select
            XMLSerialize(document
            xmlelement("root",
             xmlagg(
               xmlelement("emp"          
               , xmlforest(Key as "ID")          
               , xmlforest(name as "ename")
               , xmlelement("Descriptions",            
                  xmlforest(description as "Desc")
           ) as clob indent
           ) as t   
          from test_table;This is working fine, but xml created with empty elements for Descriptions element for key 3 and 4 which has null values. I need don't need Descriptions element in the xml when it has null value. Please help me to resolve this.

    You can do it with a correlated subquery :
    SQL> select xmlserialize(document
      2           xmlelement("root",
      3             xmlagg(
      4               xmlelement("emp"
      5               , xmlforest(
      6                   t.key as "ID"
      7                 , t.name as "ename"
      8                 , (
      9                     select xmlagg(
    10                              xmlelement("Desc", d.description)
    11                              order by d.description -- if necessary
    12                            )
    13                     from test_desc d
    14                     where d.key = t.key
    15                   ) as "Descriptions"
    16                 )
    17               )
    18             )
    19           ) as clob indent
    20         )
    21  from test_table t;
    XMLSERIALIZE(DOCUMENTXMLELEMEN
    <root>
      <emp>
        <ID>1</ID>
        <ename>sam</ename>
        <Descriptions>
          <Desc>desc1_1</Desc>
          <Desc>desc1_2</Desc>
          <Desc>desc1_3</Desc>
        </Descriptions>
      </emp>
      <emp>
        <ID>2</ID>
        <ename>max</ename>
        <Descriptions>
          <Desc>desc2_1</Desc>
          <Desc>desc2_2</Desc>
          <Desc>desc2_3</Desc>
        </Descriptions>
      </emp>
      <emp>
        <ID>3</ID>
        <ename>peter</ename>
      </emp>
      <emp>
        <ID>4</ID>
        <ename>andrew</ename>
      </emp>
    </root>
    Or an OUTER JOIN + GROUP-BY :
    select xmlserialize(document
             xmlelement("root",
               xmlagg(
                 xmlelement("emp"          
                 , xmlforest(
                     t.key as "ID"
                   , t.name as "ename"
                   , xmlagg(
                       xmlforest(d.description as "Desc")
                       order by d.description -- if necessary
                     ) as "Descriptions"
             ) as clob indent
    from test_table t
         left outer join test_desc d on d.key = t.key
    group by t.key
           , t.name
    ;Edited by: odie_63 on 11 juil. 2012 14:54 - added 2nd option

  • Error in nested group function used with column name.

    Hi Team,
    If i used nested group function with column name its not working. Could you please any one suggest me.
    How to use it.
    Regards,
    Venkat.
    Please find Spool ........
    SQL> select user_name,max(max(CNT)) from (select USER_NAME,count(*) CNT from v$open_cursor group by USER_NAME)
    2 group by user_name,CNT;
    select user_name,max(max(CNT)) from (select USER_NAME,count(*) CNT from v$open_cursor group by USER_NAME)
    ERROR at line 1:
    ORA-00937: not a single-group group function
    SQL> select max(max(CNT)) from(select USER_NAME,count(*) CNT from v$open_cursor group by USER_NAME)
    2 group by user_name;
    MAX(MAX(CNT))
    605

    Venkat wrote:
    Hi Sayan
    Its giving output like below, but not given maximum CNT.
    SQL> select user_name,max(CNT)from (select USER_NAME,count(*) CNT from v$open_cursor group by USER_NAME)
    2 group by user_name;
    USER_NAME MAX(CNT)
    BANES_LERG 6
    VENE_USER 8
    USER3 339
    DBUS 106
    VEL_USER 37
    SYS 597
    6 rows selected.Check it - Re: Error in nested group function used with column name.
    and previous post

  • Nested Groups in Component Model

    Is it possible to have a nested group in the Component Model? For example, I have a group of metatdata. That group is called Class and consists of the following fields:
    - Department
    - Number
    - Title
    - Level
    There can be 1:n of these Classes.
    These Classes compose a group called Notice. There can be 1:n Notices. The metadata may look like this.
    Notices
    -- Notice1
    ---- Dept1
    ---- Number1
    ---- Title1
    ---- Level1
    -- Notice2
    ---- Dept2
    ---- Number2
    ---- Title2
    ---- Level2
    I'm busy wearing a different hat at the moment on another project and don't have a lot of time to research this. Thoughts? Thanks in advance for any contribution.

    Hi Bill,
    Here are a few ideas that i hope help. In answer to your question, Groups cannot have groups.
    1. Your group could add a new attribute in your group that is an array of another BPM Object in a "Model" object
    2. You could store the information nested in a relational database.
    When it comes to a presentation, you'd probably want a header that shows the list of "Class" (surprised it let you name the group this without a runtime error). The user would then click one of the "class" items at the top of the scren and then you'd display the nexted group in a section of the screen below the header of the presentation. You'd use a "View" object for the UI and this View would have a group called "NestedStuff" dedicated to displaying the nested array for the class group item picked in the header.
    Dan

  • Photoshop CS5 - Compatibility issue with nested groups

    I'm using Photoshop CS5 to create a multi-layered, group-heavy PSD. The final file is intended for public consumption, so, ideally, I'd like it to be accessible to as many users - and therefore compatible with as many versions of Photoshop - as possible.
    However, I just tried to save the file, and was prompted with this message:
    This document contains nested layer groups that may change in apprearance if opened in applications older than Photoshop CS5.
    Opening the file in CS4 after the save confirmed that a few of the layer groups were indeed corrupt.
    Can anyone shed any light on this?

    It looks like you're the only person so far who's posted that particular message on the web anywhere!
    Out of curiosity, do you have the Maximize PSD and PSB File Compatibility option set to Always in Edit - Preferences - File Handling?
    I have no experience with nested groups, myself, but that setting comes to mind as being involved with the kind of compatibility you're hoping to accomplish.
    I do know that nested group capabilities have been around since at least Photoshop CS2.
    -Noel

  • How to create Nested Group membership in OAM?

    Hello,
    I am facing a problem now about creating nested group membership in OAM. Although all documents mention that nested group membership is available in OAM and the "uniquemember" attribute's target object class covers both "inetorgperson" and "groupofUniqueNames", I still cannot find the option in Selector to add "group" members.
    Please kindly suggest.
    Thank you.
    Liu Peng

    Liu,
    You've been very helpful, so I thought that I'd try to "return the favor" :)...
    If you want to change the background color of that bar that contains the "Users Groups" to something other than dark blue, you can do it by editting the following file (this path is on Windows):
    C:\Program Files\NetPoint\identity\oblix\lang\shared\sltr_navbar.xsl
    I changed the line:
    <table width="100%" border="0" bgcolor="#006699" cellpadding="0" cellspacing="0">
    TO:
    <table width="100%" border="0" bgcolor="#CCCCCC" cellpadding="0" cellspacing="0">
    which, on my system, changes the bar background color from dark blue to gray.
    Obviously, you can change the color to whatever you feel is appropriate, but the gray background definitely makes the links more visible :)!!
    Here's a website that'll let you experiment with the color codes:
    http://colorcombos.com/combotester.html
    or choose a color visually:
    http://www.liu.edu/cwis/CWP/library/colors.htm
    You'll need to restart the OAM servers after making the change for it to become effective.
    Thanks for your help!
    Jim

  • Get-AdGroupMember -recursive doesn't return membership for some nested groups.

    I have the following setup:
    Test Parent Group (Group)
      - John Doe (User)
      - Domain Users (Group, contains 1000s of users)
    When I call: Get-AdGroupMember "Test Parent Group" -recursive
    Only John Doe is returned.
    Thoughts?

    First, it seems that Get-ADGroupMember in a recursive mode does not return object with the class group. So only the actual members are returnd not the groups.
    Second, with the -recursive, Get-ADGroupMember reads the member attribute of each nested groups. Users are not a member of Domain Users through the member attribute but through the primaryGroupID attribute. Thus you list the members of Domain Users if you
    target it directly Get-ADGroupMember -Identity "Domain Users" but not when this one is nested. I don't know if there is a documentation about this.
    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

  • Nested Group Problem

    SSRS 2008 R2
    I have a reported with 2 nested groups.
    Top Level - Product Category
    Second Level - Warehouse
    When the report runs it should only show the Product Category groups.
    When the + is clicked next to Product Category it should show the Warehouse groups for that Product Category.
    When the + is clicked next to Warehouse it should show the details for that warehouse.
    For some reason when I initially run the report I see the first Product Category group and then one line of the details from each of that Product Category's Warehouse. I don't see the Warehouse group at all. I then see the second Product Category group and
    one line of the details from each of it's warehouses and so on.
    + Product Category 1
       detail line for first warehouse
       detail line for second warehouse
    + Product Category 2
       detail line for first warehouse
       detail line for second warehouse
    If I click the + next to Product Category I see the Warehouse Groups below it and the detail lines disappear. Another words it looks correct for that Product Group. I can then click on the + by the Warehouse and see its details just like I should.
    Another words I can expand it to look like the following:
    - Product Category 1
       - Warehouse 1
            details line for first warehouse
       + Warehouse 2
       + Warehouse 3
    + Product Category 2
       detail line for first warehouse
       detail line for second warehouse
    What could be causing this?
    Thanks,
    Scott

    I got my answer from Google.
    It turns out that I needed to set my visability in the group section instead of the row section.

  • Nested groups with Active Directory AWS

    Hi... am trying to target only specific groups from our AD, but I'd rather not have to use the partial users & groups sync as this would mean re-configuring the auth source for any new group that we want to bring in to the portal (v.5.0.2).
    I am able to target a specific part of AD in the following way:
    User Query Base : OU=Portal Users,DC=Domain1, DC=DOmain2
    User Query Filter: (&(objectclass=user)(memberOf=*))
    Group Query Base : OU=Portal Users,DC=Domain1, DC=DOmain2
    Group Query Filter: (objectclass=Group)
    This works fine, it brings in the groups in the "Portal Users" OU and any users in the OU who have group memberships. However, not all groups and users will exist in a single OU, so we decided to create a global group called "Portal Groups" and tried a similar query as above but with the query base replaced as follows:
    VN=Portal Groups,OU=Applications,DC=Domain1, DC=DOmain2
    This time... the group is brought in but no nested groups and no users! Has anyone else managed to accomplish an AWS setup of this sort or similar? I'm told that it is possible to sync in nested groups but being unfamiliar with AD I'm not sure if I've gone about it the right way.
    thanks in advance
    Simon Dragicevich

    Hi Simon,
    So let me make sure I've got your usecase.  You want to only create particular groups in the portal - you don't want all your AD groups in the portal.  You DO want all your users imported and to have them in the appropriate groups?
    If that's correct - you either want to play with your query bases, or you want to switch to a partial GROUP sync.  The former will allow you to automatically bring in new groups as they are added to AD, the later will not.
    One thing I was confused about in your original post - did you change both the user query base and the group query base to:
    VN=Portal Groups,OU=Applications,DC=Domain1, DC=DOmain2
    or just the group query base?  Assuming you did the former, that would explain why your users weren't imported.  If you did the later - that seems odd.  Regardless you don't want to create a global group, you want to create a new OU:
    OU=Portal Groups, OU=Applications, DC=Domain1, DC=Domain2
    Then set that as your group query base.  Assuming you have a bunch of groups scattered around your tree that you want in here, create shadow groups that essentially contain your other groups, e.g.:
    CN=GroupA, DC=Plumtree
    CN=GroupB, OU=Eng, DC=Plumtree
    I want both of those groups to be in my portal groups OU, so I create two new groups in my portal groups OU as follows:
    CN=GroupA, OU=Portal Groups, OU=Applications, DC=Domain1, DC=Domain2
    CN=GroupB, OU=Portal Groups, OU=Applications, DC=Domain1, DC=Domain2
    Both of these groups simply contain one member - the groups I am shadowing.  You can also more effectively deal with name clashing if you use this strategy.
    Make sense?
    -Aki

  • Using ldap Network Management Functions how to get nested groups that are members of a parent group

    Using NetLocalGetMembers() I can get the users withing a group
    Using NetUserGetGroups() I can get the groups a user is part of.
    However, I cant find a function that will list the GROUPS that are part of another group.
    I have a group called APP_ADMIN,  it has user1, user2 and also groups ADMIN_GRP_A and ADMIN_GROUP_B
    I need a function to return ADMIN_GROUP_A, ADMIN_GOUP_B if I pass in APP_ADMIN
    or Alternativly, given ADMIN_GROUP_A give me its parent group (APP_ADMIN)
    I am writing a C++  dll that accesses these functions.

    Hi,
    Plz check this link.
    http://gallery.technet.microsoft.com/scriptcenter/Get-nested-group-15f725f2
    Ashish Gaur

  • Nested Group Function without Group By Problem

    Hey everyone,
    I have 3 tables as below:
    TABLES
    ITEM (Item_no, Item_price, desc)
    DeliveryItem (delivery_no, item_no, quantity)
    Delivery (delivery_no, delivery_date)
    SELECT desc, MAX(SUM(quantity)) FROM DeliveryItem, Item, Delivery WHERE Item.item_no = DeliveryItem.item_no AND Delivery.delivery_no = deliveryitem.delivery_no;
    And I'm trying to output description of most delivered item but I got an error like SQL Error: ORA-00978: nested group function without GROUP BY. Could you help me to fix my code?
    Thanx

    Hi,
    DESC is not a good column name; you could get errors if the parser thinks it means DESCending. I used DESCRIPTION instead, below.
    I think the best way is to do the SUM in a sub-query, lkike this:
    WITH     got_r_num     AS
         SELECT       item_no
         ,       SUM (quantity)     AS total_quantity
         ,       RANK () OVER (ORDER BY  SUM (quantity) DESC)     AS r_num
         FROM       deliveryitem
         GROUP BY  item_no
    SELECT     i.description
    ,     r.total_quantity
    FROM     got_r_num     r
    JOIN     item          i     ON     r.item_no     = i.item_no
    WHERE     r.r_num     = 1
    ;If you want to do it without a sub-query:
    SELECT       MIN (i.description) KEEP (DENSE_RANK LAST ORDER BY SUM (di.quantity)
                        AS description
    ,       MAX (SUM (quantity))     AS total_quantity
    FROM       deliveryitem     di
    JOIN       item          i     ON     d1.item_no     = i.tiem_no
    GROUP BY  i.description
    ;If you do nested aggegate functions, then every column in the SELECT clause must be an aggregate applied to either
    (a) another aggregate, or
    (b) one of the GROUP BY expressions.
    That's why you got the ORA-00937 error.
    This second approach will only display one row of output, so If there is a tie for the item with the greatest total_quantity, only one description will be shown. The RANK method will show all items that had the highest total_quantity.
    It looks like the delivery table plays no role in this problem, but it there's some reason for including it, you can join it tpo either query above.
    Of course, unless you post test copies of your tables (CREATE TABLE and INSERT statements) I cn't test anything.
    Edited by: Frank Kulash on Nov 6, 2010 10:57 AM

Maybe you are looking for

  • Iweb image hyperlink not working?!

    Hello! I have created a website on iweb and all works great!, but a problem has just acoured which i do not know how to solve. i have added a logo at the top of the webpage which i would like to use as a hyperlink back to the home page, but after rem

  • HT204379 How can I create a screensaver?

    Trying to find a simple way to do this. Not sure what file format this should be or what program to use to create it. Was trying to do something simple like export a Keynote animation as a mov file, then convert to a screensaver. Thanks!

  • Please help me clear my doubt in oracle forms

    I have created a control block and items. I want to make those items as update false but insert should be allowed. In the propery sheet update_allowed is valid only for base table items how to make the item non updateable for control items.

  • Exchange User Cannot Email A Remade Account

    Staff member left and came back to the company so the email was deprovisioned and reactivated.  When users aren't able to email him we delete any cached email entries and out of the 50 or so users that had an issue, only 1 has not been resolved.  Thi

  • Sun Hardware Monitoring using HP OVO

    Hello, I want to monitor the SUN Hardware monitoring in HP OVO, e.g. HDD failure, Ram Failure,NIC failure, etc... Can anyone assist me how to gather this informtion from SUN system and monitor in HP OVO, Appriciate for your quick response. Thanks, Eq