294	OrderActivityByProject	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Order Activity By Project</title>\n <name>OrderActivityByProject</name>\n <description>Order Activity Report</description>\n <grid>\n  <snap/>\n  <show/>\n  <x>0.05</x>\n  <y>0.05</y>\n </grid>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT prj_name, prj_number\n  FROM prj\n WHERE (prj_id=&lt;? value("prj_id") ?>);</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>-- Group: orderActivityByProject\n-- Name:  detail\n-- Notes: \n\nSELECT *, \n  formatQty(qty) AS f_qty,\n  formatMoney(value) AS f_value,\n  'curr' AS qty_xtnumericrole,\n  'curr' AS value_xtnumericrole\nFROM (\n&lt;? if exists("showSo") ?>\n----- QUOTES -----\nSELECT quhead_id AS id, \n       15 AS type,\n       quhead_number::text AS subtype,\n       1 AS section,\n       &lt;? value("quotes") ?> AS section_qtdisplayrole,\n       quhead_number::text AS name,\n       CASE WHEN (quhead_status = 'C') THEN \n         &lt;? value("converted") ?>\n            WHEN (quhead_status = 'X') THEN\n         &lt;? value("canceled") ?>\n            WHEN (COALESCE(quhead_expire, current_date + 1) > current_date) THEN\n         &lt;? value("open") ?>\n            ELSE\n         &lt;? value("expired") ?>\n       END AS status,\n       NULL::text AS item,\n       NULL::text AS descrip,\n       NULL AS qty,\n       NULL::text AS uom,\n       NULL AS value,\n       0.0 AS ordertotal,\n       1 AS xtindentrole\n  FROM quhead\n    JOIN quitem ON (quitem_quhead_id = quhead_id)\n WHERE (quhead_prj_id = &lt;? value("prj_id") ?>)\nGROUP BY quhead_id, quhead_number, quhead_status, quhead_expire, quhead_freight, quhead_misc\n\nUNION ALL\n\nSELECT quitem_id AS id, \n       17 AS type,\n       quhead_number::text AS subtype,\n       1 AS section,\n       &lt;? value("quotes") ?> AS section_qtdisplayrole,\n       quitem_linenumber::text AS name, \n       CASE WHEN (quhead_status = 'C') THEN \n         &lt;? value("converted") ?>\n            WHEN (quhead_status = 'X') THEN\n         &lt;? value("canceled") ?>\n            WHEN (COALESCE(quhead_expire, current_date + 1) > current_date) THEN\n         &lt;? value("open") ?>\n            ELSE\n         &lt;? value("Expired") ?>\n       END AS status,\n       item_number AS item,\n       item_descrip1 || ' ' || item_descrip2 AS descrip,\n       quitem_qtyord,\n       uom_name AS uom,\n       (quitem_qtyord * quitem_qty_invuomratio) * (quitem_price / quitem_price_invuomratio) AS value,\n       0.0 AS ordertotal,\n       2 AS xtindentrole\n  FROM quhead\n    JOIN quitem ON (quitem_quhead_id = quhead_id)\n    JOIN uom ON (quitem_qty_uom_id = uom_id)\n    JOIN itemsite ON (quitem_itemsite_id = itemsite_id)\n    JOIN item ON (itemsite_item_id = item_id)\n WHERE (quhead_prj_id = &lt;? value("prj_id") ?>)\n\nUNION ALL\n\nSELECT quhead_id AS id, \n       18 AS type,\n       quhead_number::text AS subtype,\n       1 AS section,\n       &lt;? value("quotes") ?> AS section_qtdisplayrole,\n       &lt;? value("total") ?> AS name,\n       NULL AS status,\n       NULL::text AS item,\n       NULL::text AS descrip,\n       NULL AS qty,\n       NULL::text AS uom,\n       SUM((quitem_qtyord * quitem_qty_invuomratio) * (quitem_price / quitem_price_invuomratio)) AS value,\n       SUM((quitem_qtyord * quitem_qty_invuomratio) * (quitem_price / quitem_price_invuomratio)) AS ordertotal,\n       1 AS xtindentrole\n  FROM quhead\n    JOIN quitem ON (quitem_quhead_id = quhead_id)\n WHERE (quhead_prj_id = &lt;? value("prj_id") ?>)\nGROUP BY quhead_id, quhead_number\n\nUNION ALL\n\n------ SALES ORDERS ------\nSELECT cohead_id AS id, \n       25 AS type,\n       cohead_number::text AS subtype,\n       2 AS section,\n       &lt;? value("sos") ?> AS section_qtdisplayrole,\n       cohead_number::text AS name,\n      COALESCE((SELECT \n                  CASE WHEN (coitem_status = 'O') THEN\n                    &lt;? value("open") ?>\n                       WHEN (coitem_status = 'C') THEN\n                    &lt;? value("closed" ?>\n                      ELSE\n                    &lt;? value("canceled") ?>\n                  END\n                FROM \n               (SELECT coitem_status,\n                   CASE \n                     WHEN (coitem_status = 'O') THEN 1\n                     WHEN (coitem_status = 'C') then 2\n                     ELSE  3\n                  END AS type\n                  FROM coitem\n                 WHERE (coitem_cohead_id=cohead_id)\n                 ORDER BY type\n                 LIMIT 1) AS sts) ,'O')\n        AS status,\n       NULL::text AS item,\n       NULL::text AS descrip,\n       NULL AS qty,\n       NULL::text AS uom,\n       NULL AS value,\n       0.0 AS ordertotal,\n       1 AS xtindentrole\n  FROM cohead\n    JOIN coitem ON (coitem_cohead_id = cohead_id)\n WHERE (cohead_prj_id = &lt;? value("prj_id") ?>)\nGROUP BY cohead_id, cohead_number\n\nUNION ALL\n\nSELECT coitem_id AS id, \n       27 AS type,\n       cohead_number::text AS subtype,\n       2 AS section,\n       &lt;? value("sos") ?> AS section_qtdisplayrole,\n       coitem_linenumber::text AS name, \n       CASE WHEN (coitem_status = 'O') THEN\n         &lt;? value("open") ?>\n            WHEN (coitem_status = 'C') THEN\n         &lt;? value("closed") ?>\n            WHEN (coitem_status = 'X') THEN\n         &lt;? value("canceled") ?>\n       END AS status,\n       item_number AS item,\n       item_descrip1 || ' ' || item_descrip2 AS descrip,\n       coitem_qtyord,\n       uom_name AS uom,\n       (coitem_qtyord * coitem_qty_invuomratio) * (coitem_price / coitem_price_invuomratio) AS value,\n       0.0 AS ordertotal,\n       2 AS xtindentrole\n  FROM cohead\n    JOIN coitem ON (coitem_cohead_id = cohead_id)\n    JOIN uom ON (coitem_qty_uom_id = uom_id)\n    JOIN itemsite ON (coitem_itemsite_id = itemsite_id)\n    JOIN item ON (itemsite_item_id = item_id)\n WHERE (cohead_prj_id = &lt;? value("prj_id") ?>)\n\nUNION ALL\n\nSELECT cohead_id AS id, \n       28 AS type,\n       cohead_number::text AS subtype,\n       2 AS section,\n       &lt;? value("sos") ?> AS section_qtdisplayrole,\n       &lt;? value("total") ?> AS name,\n       NULL AS status,\n       NULL::text AS item,\n       NULL::text AS descrip,\n       NULL AS qty,\n       NULL::text AS uom,\n       SUM((coitem_qtyord * coitem_qty_invuomratio) * (coitem_price / coitem_price_invuomratio)) AS value,\n       SUM((coitem_qtyord * coitem_qty_invuomratio) * (coitem_price / coitem_price_invuomratio)) AS ordertotal,\n       1 AS xtindentrole\n  FROM cohead\n    JOIN coitem ON (coitem_cohead_id = cohead_id)\n WHERE (cohead_prj_id = &lt;? value("prj_id") ?>)\nGROUP BY cohead_id, cohead_number\n\nUNION ALL\n\n------ INVOICES -------\nSELECT invchead_id AS id,\n       35 AS type,\n       invchead_invcnumber::text AS subtype,\n       3 AS section,\n       &lt;? value("invoices") ?> AS section_qtdisplayrole,\n       invchead_invcnumber::text AS name,\n       CASE WHEN (invchead_posted) THEN\n         &lt;? value("posted") ?>\n       ELSE &lt;? value("unposted") ?>\n       END AS status,\n       NULL::text AS item,\n       NULL::text AS descrip,\n       NULL AS qty,\n       NULL::text AS uom,\n       NULL AS value,\n       0.0 AS ordertotal,\n       1 AS xtindentrole\n  FROM invchead\n    JOIN invcitem ON (invcitem_invchead_id = invchead_id)\n WHERE (invchead_prj_id = &lt;? value("prj_id") ?>)\nGROUP BY invchead_id, invchead_invcnumber, invchead_freight, invchead_misc_amount, invchead_posted\n\nUNION ALL\n\nSELECT invcitem_id AS id, \n       37 AS type,\n       invchead_invcnumber::text AS subtype,\n       3 AS section,\n       &lt;? value("invoices") ?> AS section_qtdisplayrole,\n       invcitem_linenumber::text AS name, \n       CASE WHEN (invchead_posted) THEN\n         &lt;? value("posted") ?>\n       ELSE &lt;? value("unposted") ?>\n       END AS status,\n       COALESCE(item_number,invcitem_number) AS item,\n       COALESCE(item_descrip1 || ' ' || item_descrip2,invcitem_descrip) AS descrip,\n       invcitem_billed AS qty,\n       uom_name AS uom,\n       (invcitem_billed * invcitem_qty_invuomratio) * (invcitem_price / invcitem_price_invuomratio) AS value,\n       0.0 AS ordertotal,\n       2 AS xtindentrole\n  FROM invchead\n    JOIN invcitem ON (invcitem_invchead_id = invchead_id)\n    LEFT OUTER JOIN item ON (invcitem_item_id = item_id)\n    LEFT OUTER JOIN uom ON (invcitem_qty_uom_id = uom_id)\n WHERE (invchead_prj_id = &lt;? value("prj_id") ?>)\n\nUNION ALL\n\nSELECT invchead_id AS id, \n       38 AS type,\n       invchead_invcnumber::text AS subtype,\n       3 AS section,\n       &lt;? value("invoices") ?> AS section_qtdisplayrole,\n       &lt;? value("total") ?> AS name,\n       NULL AS status,\n       NULL::text AS item,\n       NULL::text AS descrip,\n       NULL AS qty,\n       NULL::text AS uom,\n       SUM((invcitem_billed * invcitem_qty_invuomratio) * (invcitem_price / invcitem_price_invuomratio)) AS value,\n       SUM((invcitem_billed * invcitem_qty_invuomratio) * (invcitem_price / invcitem_price_invuomratio)) AS ordertotal,\n       1 AS xtindentrole\n  FROM invchead\n    JOIN invcitem ON (invcitem_invchead_id = invchead_id)\n WHERE (invchead_prj_id = &lt;? value("prj_id") ?>)\nGROUP BY invchead_id, invchead_invcnumber\n\n&lt;? endif ?>\n\n\n&lt;? if exists("showWo") ?>\n\n&lt;?   if exists("showSo") ?>\n\nUNION ALL\n\n&lt;?   endif ?>\n\n------ WORK ORDERS -------\nSELECT wo_id AS id, \n       45 AS type,\n       formatWoNumber(wo_id) AS subtype,\n       4 AS section,\n       &lt;? value("wos") ?> AS section_qtdisplayrole,\n       formatWoNumber(wo_id) AS name,\n       CASE WHEN (wo_status = 'O') THEN\n         &lt;? value("open") ?>\n            WHEN (wo_status = 'E') THEN\n         &lt;? value("exploded") ?>\n            WHEN (wo_status = 'R') THEN\n         &lt;? value("released") ?>\n            WHEN (wo_status = 'I') THEN\n         &lt;? value("inprocess") ?>\n            WHEN (wo_status = 'C') THEN\n         &lt;? value("closed") ?>\n       END AS status,\n       item_number AS item,\n       item_descrip1 || ' ' || item_descrip2 AS descrip,\n       wo_qtyord AS qty,\n       uom_name AS uom,\n       wo_postedvalue AS value,\n       wo_postedvalue AS ordertotal,\n       1 AS xtindentrole\n  FROM wo\n    JOIN itemsite ON (itemsite_id=wo_itemsite_id)\n    JOIN item ON (itemsite_item_id=item_id)\n    JOIN uom ON (item_inv_uom_id=uom_id)\n WHERE (wo_prj_id = &lt;? value("prj_id") ?>)\n\n&lt;? endif ?>\n\n\n&lt;? if exists("showPo") ?>\n&lt;?   if exists("showSo") ?>\n UNION ALL\n&lt;? elseif exists("showWo") ?>\n UNION ALL\n\n&lt;? endif ?>\n------ PURCHASE REQUESTS ------\nSELECT pr_id AS id, \n       55 AS type,\n       pr_number::text || '-' || pr_subnumber::text AS subtype,\n       5 AS section,\n       &lt;? value("prs") ?> AS section_qtdisplayrole,\n       pr_number::text || '-' || pr_subnumber::text AS name,\n       &lt;? value("open") ?> AS status, \n       item_number AS item,\n       (item_descrip1 || ' ' || item_descrip2) AS descrip,\n       pr_qtyreq AS qty,\n       uom_name AS uom,\n       stdcost(item_id) * pr_qtyreq AS value,\n       stdcost(item_id) * pr_qtyreq AS ordertotal,\n       1 AS xtindentrole\n  FROM pr\n    JOIN itemsite ON (itemsite_id = pr_itemsite_id)\n    JOIN item ON (itemsite_item_id = item_id)\n    JOIN uom ON (item_inv_uom_id = uom_id)\n WHERE (pr_prj_id=&lt;? value("prj_id") ?>)\n\nUNION ALL\n\n------ PURCHASE ORDERS ------\nSELECT pohead_id AS id,\n       65 AS type,\n       pohead_number::text AS subtype,\n       6 AS section,\n       &lt;? value("pos") ?> AS section_qtdisplayrole,\n       pohead_number::text AS name,\n       CASE WHEN (pohead_status = 'U') THEN\n         &lt;? value("unreleased") ?>\n            WHEN (pohead_status = 'O') THEN\n         &lt;? value("open") ?>\n            WHEN (pohead_status = 'C') THEN\n         &lt;? value("closed") ?>\n       END AS status,\n       NULL::text AS item,\n       NULL::text AS descrip,\n       NULL AS qty,\n       NULL AS uom,\n       NULL AS value,\n       0.0 AS ordertotal,\n       1 AS xtindentrole\n  FROM pohead\n    JOIN poitem ON (poitem_pohead_id = pohead_id)\n WHERE (poitem_prj_id = &lt;? value("prj_id") ?>)\nGROUP BY pohead_id, pohead_number, pohead_freight, pohead_status\n\nUNION ALL\n\nSELECT poitem_id AS id, \n       67 AS type,\n       pohead_number::text AS subtype,\n       6 AS section,\n       &lt;? value("pos") ?> AS section_qtdisplayrole,\n       poitem_linenumber::text AS name, \n       CASE WHEN (poitem_status = 'U') THEN\n         &lt;? value("unreleased") ?>\n            WHEN (poitem_status = 'O') THEN\n         &lt;? value("open") ?>\n            WHEN (poitem_status = 'C') THEN\n         &lt;? value("closed") ?>\n       END AS status,\n       COALESCE(item_number,poitem_vend_item_number) AS item,\n       COALESCE((item_descrip1 || ' ' || item_descrip2),poitem_vend_item_descrip) AS descrip,\n       poitem_qty_ordered,\n       poitem_vend_uom AS uom,\n       (poitem_qty_ordered * poitem_unitprice) AS value,\n       0.0 AS ordertotal,\n       2 AS xtindentrole\n  FROM pohead\n    JOIN poitem ON (poitem_pohead_id = pohead_id)\n    LEFT OUTER JOIN itemsite ON (poitem_itemsite_id=itemsite_id)\n    LEFT OUTER JOIN item ON (itemsite_item_id = item_id)\n WHERE (poitem_prj_id = &lt;? value("prj_id") ?>)\n\nUNION ALL\n\nSELECT pohead_id AS id, \n       68 AS type,\n       pohead_number::text AS subtype,\n       6 AS section,\n       &lt;? value("pos") ?> AS section_qtdisplayrole,\n       &lt;? value("total") ?> AS name,\n       NULL AS status,\n       NULL::text AS item,\n       NULL::text AS descrip,\n       NULL AS qty,\n       NULL::text AS uom,\n       SUM(poitem_qty_ordered * poitem_unitprice) AS value,\n       SUM(poitem_qty_ordered * poitem_unitprice) AS ordertotal,\n       1 AS xtindentrole\n  FROM pohead\n    JOIN poitem ON (poitem_pohead_id = pohead_id)\n WHERE (poitem_prj_id = &lt;? value("prj_id") ?>)\nGROUP BY pohead_id, pohead_number\n\n&lt;? endif ?>\n\n) data\nORDER BY section, subtype, type, id;</sql>\n </querysource>\n <rpthead>\n  <height>75</height>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>25</y>\n    <width>105</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Project Number:</string>\n  </label>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>25</y>\n    <width>200</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>prj_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>30</x>\n    <y>45</y>\n    <width>80</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Name:</string>\n  </label>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>45</y>\n    <width>509</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>prj_name</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>397</x>\n    <y>5.85</y>\n    <width>350</width>\n    <height>38</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Order Activity by Project</string>\n  </label>\n </rpthead>\n <section>\n  <name>section</name>\n  <group>\n   <name>type</name>\n   <column>section</column>\n   <head>\n    <height>53</height>\n    <label>\n     <rect>\n      <x>395</x>\n      <y>30</y>\n      <width>135</width>\n      <height>15</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <string>Quantity Ordered / Billed</string>\n    </label>\n    <line>\n     <xstart>0</xstart>\n     <ystart>45</ystart>\n     <xend>750</xend>\n     <yend>45</yend>\n     <weight>2</weight>\n    </line>\n    <label>\n     <rect>\n      <x>660</x>\n      <y>30</y>\n      <width>50</width>\n      <height>15</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <string>Value</string>\n    </label>\n    <label>\n     <rect>\n      <x>209</x>\n      <y>30</y>\n      <width>85</width>\n      <height>15</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>normal</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Status</string>\n    </label>\n    <line>\n     <xstart>77</xstart>\n     <ystart>45</ystart>\n     <xend>77</xend>\n     <yend>45</yend>\n     <weight>0</weight>\n    </line>\n    <label>\n     <rect>\n      <x>100</x>\n      <y>30</y>\n      <width>104</width>\n      <height>15</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>normal</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Order Number - Line</string>\n    </label>\n    <label>\n     <rect>\n      <x>0</x>\n      <y>5</y>\n      <width>90</width>\n      <height>16</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Order Type:</string>\n    </label>\n    <field>\n     <rect>\n      <x>90</x>\n      <y>5</y>\n      <width>610</width>\n      <height>15</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>section_qtdisplayrole</column>\n     </data>\n    </field>\n    <label>\n     <rect>\n      <x>305</x>\n      <y>30</y>\n      <width>95</width>\n      <height>15</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>normal</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Item</string>\n    </label>\n   </head>\n   <foot>\n    <height>33</height>\n    <label>\n     <rect>\n      <x>440</x>\n      <y>10</y>\n      <width>140</width>\n      <height>15</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>bold</weight>\n     </font>\n     <right/>\n     <top/>\n     <string>Section Total:</string>\n    </label>\n    <line>\n     <xstart>305</xstart>\n     <ystart>5</ystart>\n     <xend>750</xend>\n     <yend>5</yend>\n     <weight>0</weight>\n    </line>\n    <field>\n     <rect>\n      <x>610</x>\n      <y>10</y>\n      <width>100</width>\n      <height>15</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>bold</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>ordertotal</column>\n     </data>\n     <format builtin="true">money</format>\n     <tracktotal subtotal="true"/>\n    </field>\n   </foot>\n  </group>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>18</height>\n   <field>\n    <rect>\n     <x>305</x>\n     <y>0</y>\n     <width>135</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>100</x>\n     <y>0</y>\n     <width>95</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>name</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>209</x>\n     <y>0</y>\n     <width>85</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>status</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>444</x>\n     <y>0</y>\n     <width>85</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_qty</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>544</x>\n     <y>0</y>\n     <width>165</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_value</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>41</height>\n  <label>\n   <rect>\n    <x>610</x>\n    <y>15</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n  <field>\n   <rect>\n    <x>700</x>\n    <y>15</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>15</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n  <line>\n   <xstart>0</xstart>\n   <ystart>5</ystart>\n   <xend>750</xend>\n   <yend>5</yend>\n   <weight>2</weight>\n  </line>\n  <field>\n   <rect>\n    <x>75</x>\n    <y>15</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n </pgfoot>\n</report>\n	Order Activity Report	0	2015-10-01 17:14:33.361434
149	POHistory	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>P/O History</title>\n <name>POHistory</name>\n <description></description>\n <parameter default="529" active="true" listtype="dynamic" type="string" name="pohead_id" >\n  <description></description>\n  <query>select pohead_id, pohead_number from pohead order by pohead_number desc;</query>\n </parameter>\n <size>Letter</size>\n <landscape/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT pohead_number,&#xd;\n       vend_name&#xd;\n  FROM pohead, vendinfo&#xd;\n WHERE ((pohead_id=&lt;? value("pohead_id") ?>)&#xd;\n  AND  (pohead_vend_id=vend_id));</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT &#xd;\npoitem_linenumber as f_number, &#xd;\nitem_number as f_item, &#xd;\nuom_name as f_uom1,&#xd;\nformatDate(poitem_duedate) as f_duedate,&#xd;\npoitem_vend_item_number as f_vend_item,&#xd;\npoitem_vend_uom as f_uom2,&#xd;\nformatQty(poitem_qty_ordered) as f_ordered,&#xd;\nformatqty(poitem_qty_received) as f_received&#xd;\nFROM poitem, itemsite, item, uom&#xd;\nWHERE ((poitem_itemsite_id=itemsite_id)&#xd;\nAND (itemsite_item_id=item_id)&#xd;\nAND (item_inv_uom_id=uom_id)&#xd;\nAND (poitem_pohead_id=&lt;? value("pohead_id") ?>)) &#xd;\n&#xd;\nUNION&#xd;\n&#xd;\nSELECT &#xd;\npoitem_linenumber as f_number, &#xd;\npoitem_vend_item_number as f_item, &#xd;\nexpcat_code as f_uom1,&#xd;\nformatDate(poitem_duedate) as f_duedate,&#xd;\npoitem_vend_item_descrip as f_vend_item,&#xd;\nexpcat_descrip as f_uom2,&#xd;\nformatQty(poitem_qty_ordered) as f_ordered,&#xd;\nformatqty(poitem_qty_received) as f_received&#xd;\nFROM poitem, expcat&#xd;\nWHERE ((poitem_expcat_id = expcat_id)&#xd;\nAND (poitem_pohead_id=&lt;? value("pohead_id") ?>)) &#xd;\n&#xd;\nORDER BY f_number;</sql>\n </querysource>\n <rpthead>\n  <height>205</height>\n  <line>\n   <xstart>5</xstart>\n   <ystart>200</ystart>\n   <xend>990</xend>\n   <yend>200</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>940</x>\n    <y>185</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Received</string>\n  </label>\n  <label>\n   <rect>\n    <x>455</x>\n    <y>5</y>\n    <width>530</width>\n    <height>38</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>P/O History</string>\n  </label>\n  <label>\n   <rect>\n    <x>730</x>\n    <y>185</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Due Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>525</x>\n    <y>185</y>\n    <width>106</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Vend. Item #</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>185</y>\n    <width>35</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>#</string>\n  </label>\n  <field>\n   <rect>\n    <x>105</x>\n    <y>120</y>\n    <width>385</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>vend_name</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>30</x>\n    <y>120</y>\n    <width>105</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Vendor:</string>\n  </label>\n  <label>\n   <rect>\n    <x>325</x>\n    <y>175</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Vendor UOM or</string>\n  </label>\n  <label>\n   <rect>\n    <x>180</x>\n    <y>175</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>UOM or</string>\n  </label>\n  <label>\n   <rect>\n    <x>45</x>\n    <y>185</y>\n    <width>106</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item</string>\n  </label>\n  <field>\n   <rect>\n    <x>105</x>\n    <y>100</y>\n    <width>385</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>pohead_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>840</x>\n    <y>185</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Ordered</string>\n  </label>\n  <label>\n   <rect>\n    <x>30</x>\n    <y>100</y>\n    <width>105</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>P/O #:</string>\n  </label>\n  <label>\n   <rect>\n    <x>180</x>\n    <y>185</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Exp. Cat. Code</string>\n  </label>\n  <label>\n   <rect>\n    <x>325</x>\n    <y>185</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Exp. Cat. Descrip.</string>\n  </label>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>8</height>\n </pghead>\n <pghead>\n  <height>42</height>\n  <label>\n   <rect>\n    <x>40</x>\n    <y>22</y>\n    <width>106</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item</string>\n  </label>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>22</y>\n    <width>35</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>#</string>\n  </label>\n  <label>\n   <rect>\n    <x>175</x>\n    <y>22</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Exp. Cat. Code</string>\n  </label>\n  <label>\n   <rect>\n    <x>320</x>\n    <y>22</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Exp. Cat. Descrip.</string>\n  </label>\n  <label>\n   <rect>\n    <x>525</x>\n    <y>22</y>\n    <width>106</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Vend. Item #</string>\n  </label>\n  <label>\n   <rect>\n    <x>725</x>\n    <y>22</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Due Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>835</x>\n    <y>22</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Ordered</string>\n  </label>\n  <label>\n   <rect>\n    <x>935</x>\n    <y>22</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Received</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>37</ystart>\n   <xend>990</xend>\n   <yend>37</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>175</x>\n    <y>12</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>UOM or</string>\n  </label>\n  <label>\n   <rect>\n    <x>320</x>\n    <y>12</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Vendor UOM or</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>18</height>\n   <field>\n    <rect>\n     <x>45</x>\n     <y>0</y>\n     <width>150</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_item</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>805</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_ordered</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>900</x>\n     <y>0</y>\n     <width>90</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_received</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>180</x>\n     <y>0</y>\n     <width>145</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_uom1</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>5</x>\n     <y>0</y>\n     <width>35</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>730</x>\n     <y>0</y>\n     <width>55</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_duedate</column>\n    </data>\n   </field>\n   <text>\n    <rect>\n     <x>525</x>\n     <y>0</y>\n     <width>195</width>\n     <height>15</height>\n    </rect>\n    <bottompad>1</bottompad>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <top/>\n    <data>\n     <query>detail</query>\n     <column>f_vend_item</column>\n    </data>\n   </text>\n   <text>\n    <rect>\n     <x>325</x>\n     <y>0</y>\n     <width>190</width>\n     <height>15</height>\n    </rect>\n    <bottompad>1</bottompad>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <top/>\n    <data>\n     <query>detail</query>\n     <column>f_uom2</column>\n    </data>\n   </text>\n  </detail>\n </section>\n <pgfoot>\n  <height>32</height>\n  <label>\n   <rect>\n    <x>860</x>\n    <y>17</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n  <field>\n   <rect>\n    <x>945</x>\n    <y>17</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>85</x>\n    <y>17</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>17</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
147	POLineItemsByDate	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>P/O Line Items By Date</title>\n <name>POLineItemsByDate</name>\n <description></description>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT &lt;? if exists(&quot;warehous_id&quot;) ?>\n         (SELECT warehous_code FROM whsinfo WHERE warehous_id=&lt;? value(&quot;warehous_id&quot;) ?>)\n       &lt;? else ?>\n         text('All Sites')\n       &lt;? endif ?>\n       AS warehouse,\n       &lt;? if exists(&quot;agentUsername&quot;) ?>\n       TEXT(&lt;? value(&quot;agentUsername&quot; ?>)\n       &lt;? else ?>\n       TEXT('All Agents')\n       &lt;? endif ?>\n       AS agentUsername,\n       &lt;? if exists(&quot;openItems&quot;) ?>\n         text('Open Items')\n       &lt;? elseif exists(&quot;closedItems&quot;) ?>\n         text('Closed Items')\n       &lt;? else ?>\n         text('All Items')\n       &lt;? endif ?>\n       as f_whichitems,\n       formatDate(&lt;? value(&quot;startDate&quot;) ?>, 'Earliest') AS startdate,\n       formatDate(&lt;? value(&quot;endDate&quot;) ?>, 'Latest') AS enddate\n</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT CASE WHEN (itemsite_id IS NULL) THEN ( SELECT warehous_code\n                                              FROM whsinfo\n                                              WHERE (pohead_warehous_id=warehous_id) )\n            ELSE ( SELECT warehous_code\n                   FROM whsinfo\n                   WHERE (itemsite_warehous_id=warehous_id) )\n       END AS warehousecode,\n       pohead_number as f_ponumber,\n       poitem_linenumber as f_linenumber,\n       vend_name,\n       formatDate(poitem_duedate) as f_duedate,\n       COALESCE(item_number, (text('NonInv - ') || poitem_vend_item_number)) AS itemnumber,\n       COALESCE(uom_name, poitem_vend_uom) AS itemuom,\n       formatQty(poitem_qty_ordered) as f_ordered,\n       formatQty(poitem_qty_received) as f_received,\n       formatQty(poitem_qty_returned) as f_returned\n  FROM pohead, vendinfo,\n       poitem LEFT OUTER JOIN\n         (itemsite JOIN item\n           ON (itemsite_item_id=item_id) JOIN uom ON (item_inv_uom_id=uom_id))\n         ON (poitem_itemsite_id=itemsite_id) \n WHERE ((poitem_pohead_id=pohead_id)\n   AND (pohead_vend_id=vend_id)\n   AND (poitem_duedate BETWEEN &lt;? value(&quot;startDate&quot;) ?> AND &lt;? value(&quot;endDate&quot;) ?>)\n&lt;? if exists(&quot;warehous_id&quot;) ?>\n   AND ( ( (itemsite_id IS NULL) AND (pohead_warehous_id=&lt;? value(&quot;warehous_id&quot;) ?>) ) OR\n         ( (itemsite_id IS NOT NULL) AND (itemsite_warehous_id=&lt;? value(&quot;warehous_id&quot;) ?>) ) )\n&lt;? endif ?>\n&lt;? if exists(&quot;agentUsername&quot;) ?>\n   AND (pohead_agent_username=&lt;? value(&quot;agentUsername&quot;) ?>)\n&lt;? endif ?>\n&lt;? if exists(&quot;openItems&quot;) ?>\n   AND (poitem_status='O')\n&lt;? elseif exists(&quot;closedItems&quot;) ?>\n   AND (poitem_status='C')\n&lt;? endif ?>\n)\nORDER BY poitem_duedate;</sql>\n </querysource>\n <rpthead>\n  <height>237</height>\n  <field>\n   <rect>\n    <x>135</x>\n    <y>75</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>agentUsername</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>75</y>\n    <width>125</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Purchasing Agent:</string>\n  </label>\n  <label>\n   <rect>\n    <x>443</x>\n    <y>75</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Start Due Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>345</x>\n    <y>5</y>\n    <width>400</width>\n    <height>40</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>P/O Line Items By Date</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>229</ystart>\n   <xend>745</xend>\n   <yend>229</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>580</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Ordered</string>\n  </label>\n  <label>\n   <rect>\n    <x>285</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Due Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>370</x>\n    <y>200</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>443</x>\n    <y>95</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>End Due Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>580</x>\n    <y>215</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Received</string>\n  </label>\n  <label>\n   <rect>\n    <x>665</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Returned</string>\n  </label>\n  <label>\n   <rect>\n    <x>525</x>\n    <y>200</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>UOM</string>\n  </label>\n  <label>\n   <rect>\n    <x>45</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>P/O #</string>\n  </label>\n  <field>\n   <rect>\n    <x>550</x>\n    <y>95</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>enddate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>215</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>#</string>\n  </label>\n  <field>\n   <rect>\n    <x>475</x>\n    <y>130</y>\n    <width>165</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_whichitems</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>130</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Vendor</string>\n  </label>\n  <label>\n   <rect>\n    <x>30</x>\n    <y>95</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Site:</string>\n  </label>\n  <field>\n   <rect>\n    <x>135</x>\n    <y>95</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>warehouse</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>550</x>\n    <y>75</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>startdate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>200</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Site</string>\n  </label>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>7</height>\n </pghead>\n <pghead>\n  <height>37</height>\n  <label>\n   <rect>\n    <x>665</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Returned</string>\n  </label>\n  <label>\n   <rect>\n    <x>525</x>\n    <y>0</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>UOM</string>\n  </label>\n  <label>\n   <rect>\n    <x>580</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Ordered</string>\n  </label>\n  <label>\n   <rect>\n    <x>130</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Vendor</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>30</ystart>\n   <xend>745</xend>\n   <yend>30</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>45</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>P/O #</string>\n  </label>\n  <label>\n   <rect>\n    <x>285</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Due Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>15</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>#</string>\n  </label>\n  <label>\n   <rect>\n    <x>580</x>\n    <y>15</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Received</string>\n  </label>\n  <label>\n   <rect>\n    <x>370</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Site</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>37</height>\n   <line>\n    <xstart>5</xstart>\n    <ystart>30</ystart>\n    <xend>745</xend>\n    <yend>30</yend>\n    <weight>0</weight>\n   </line>\n   <field>\n    <rect>\n     <x>665</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_returned</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>525</x>\n     <y>0</y>\n     <width>50</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>itemuom</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>580</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_ordered</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>370</x>\n     <y>0</y>\n     <width>150</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>itemnumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>45</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_ponumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>580</x>\n     <y>15</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_received</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>5</x>\n     <y>0</y>\n     <width>40</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>warehousecode</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>285</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_duedate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>130</x>\n     <y>0</y>\n     <width>150</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>vend_name</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>5</x>\n     <y>15</y>\n     <width>40</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_linenumber</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>17</height>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>103</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>600</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
148	POLineItemsByItem	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>P/O Line Items By Item</title>\n <name>POLineItemsByItem</name>\n <description></description>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT item_number, item_descrip1, item_descrip2, uom_name,\n       &lt;? if exists(&quot;warehous_id&quot;) ?>\n         ( SELECT warehous_code FROM whsinfo WHERE warehous_id=&lt;? value(&quot;warehous_id&quot;) ?>)\n       &lt;? else ?>\n         text('All Sites')\n       &lt;? endif ?>\n       AS warehouse,\n       &lt;? if exists(&quot;agentUsername&quot;) ?>\n       TEXT(&lt;? value(&quot;agentUsername&quot; ?>)\n       &lt;? else ?>\n       TEXT('All Agents')\n       &lt;? endif ?>\n       AS agentUsername,\n       &lt;? if exists(&quot;openItems&quot;) ?>\n         text('Open Items')\n       &lt;? elseif exists(&quot;closedItems&quot;) ?>\n         text('Closed Items')\n       &lt;? else ?>\n         text('All Items')\n       &lt;? endif ?>\n       AS f_whichitems\n  FROM item JOIN uom ON (item_inv_uom_id=uom_id)\n WHERE (item_id=&lt;? value(&quot;item_id&quot;) ?>);\n</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT warehous_code, pohead_number as f_ponumber, vend_name,\n       formatDate(poitem_duedate) as f_duedate,\n       poitem_vend_uom as uom_name, \n       formatQty(poitem_qty_ordered) as f_ordered,\n       formatQty(poitem_qty_received) as f_received,\n       formatQty(poitem_qty_returned) as f_returned \n  FROM pohead, poitem, vendinfo, itemsite, whsinfo\n WHERE ((poitem_pohead_id=pohead_id)\n   AND (pohead_vend_id=vend_id)\n&lt;? if exists(&quot;warehous_id&quot;) ?>\n   AND (itemsite_warehous_id=&lt;? value(&quot;warehous_id&quot;) ?>)\n&lt;? endif ?>\n&lt;? if exists(&quot;agentUsername&quot;) ?>\n   AND (pohead_agent_username=&lt;? value(&quot;agentUsername&quot;) ?>)\n&lt;? endif ?>\n&lt;? if exists(&quot;openItems&quot;) ?>\n   AND (poitem_status='O')\n&lt;? elseif exists(&quot;closedItems&quot;) ?>\n   AND (poitem_status='C')\n&lt;? endif ?>\n   AND (poitem_itemsite_id=itemsite_id)\n   AND (itemsite_warehous_id=warehous_id)\n   AND (itemsite_item_id=&lt;? value(&quot;item_id&quot;) ?>)\n) \nORDER BY poitem_duedate;</sql>\n </querysource>\n <rpthead>\n  <height>221</height>\n  <label>\n   <rect>\n    <x>270</x>\n    <y>75</y>\n    <width>50</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>UOM</string>\n  </label>\n  <label>\n   <rect>\n    <x>135</x>\n    <y>200</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Vendor</string>\n  </label>\n  <label>\n   <rect>\n    <x>665</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Returned</string>\n  </label>\n  <label>\n   <rect>\n    <x>45</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>P/O #</string>\n  </label>\n  <label>\n   <rect>\n    <x>580</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Received</string>\n  </label>\n  <label>\n   <rect>\n    <x>345</x>\n    <y>5</y>\n    <width>400</width>\n    <height>40</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>P/O Line Items By Item</string>\n  </label>\n  <label>\n   <rect>\n    <x>20</x>\n    <y>75</y>\n    <width>85</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Item:</string>\n  </label>\n  <label>\n   <rect>\n    <x>493</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Ordered</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>215</ystart>\n   <xend>745</xend>\n   <yend>215</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>440</x>\n    <y>200</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>UOM</string>\n  </label>\n  <field>\n   <rect>\n    <x>325</x>\n    <y>75</y>\n    <width>80</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>uom_name</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>355</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Due Date</string>\n  </label>\n  <field>\n   <rect>\n    <x>475</x>\n    <y>130</y>\n    <width>165</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_whichitems</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>110</x>\n    <y>112</y>\n    <width>250</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>item_descrip2</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>535</x>\n    <y>95</y>\n    <width>200</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>warehouse</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>200</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Site</string>\n  </label>\n  <field>\n   <rect>\n    <x>110</x>\n    <y>75</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>item_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>430</x>\n    <y>95</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Site:</string>\n  </label>\n  <field>\n   <rect>\n    <x>110</x>\n    <y>95</y>\n    <width>250</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>item_descrip1</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>535</x>\n    <y>75</y>\n    <width>200</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>agentUsername</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>405</x>\n    <y>75</y>\n    <width>125</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Purchasing Agent:</string>\n  </label>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>21</height>\n  <label>\n   <rect>\n    <x>45</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>P/O #</string>\n  </label>\n  <label>\n   <rect>\n    <x>665</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Returned</string>\n  </label>\n  <label>\n   <rect>\n    <x>440</x>\n    <y>0</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>UOM</string>\n  </label>\n  <label>\n   <rect>\n    <x>580</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Received</string>\n  </label>\n  <label>\n   <rect>\n    <x>135</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Vendor</string>\n  </label>\n  <label>\n   <rect>\n    <x>350</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Due Date</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>15</ystart>\n   <xend>745</xend>\n   <yend>15</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>493</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Ordered</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Site</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>16</height>\n   <field>\n    <rect>\n     <x>580</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_received</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>440</x>\n     <y>0</y>\n     <width>50</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>uom_name</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>5</x>\n     <y>0</y>\n     <width>40</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>warehous_code</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>665</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_returned</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>355</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_duedate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>493</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_ordered</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>135</x>\n     <y>0</y>\n     <width>215</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>vend_name</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>45</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_ponumber</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>16</height>\n  <field>\n   <rect>\n    <x>103</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>600</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
146	POLineItemsByVendor	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>P/O Line Items By Vendor</title>\n <name>POLineItemsByVendor</name>\n <description></description>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT\n&lt;? if exists("vend_id") ?>\n       (SELECT ('Vendor = ' || vend_name) FROM vendinfo WHERE vend_id=&lt;? value("vend_id") ?>)\n&lt;? elseif exists("vendtype_id") ?>\n       (SELECT ('Vendor Type = ' || vendtype_code) FROM vendtype WHERE vendtype_id=&lt;? value("vendtype_id") ?>)\n&lt;? elseif exists("vendtype_pattern") ?>\n       ('Vendor Type pattern = ' || &lt;? value("vendtype_pattern") ?>)\n&lt;? else ?>\n       'All Vendors'\n&lt;? endif ?>\n       AS selection,\n       &lt;? if exists("warehous_id") ?>\n         ( SELECT warehous_code FROM whsinfo WHERE warehous_id=&lt;? value("warehous_id") ?>)\n       &lt;? else ?>\n         text('All Sites')\n       &lt;? endif ?>\n       AS warehouse,\n       &lt;? if exists("agentUsername") ?>\n       TEXT(&lt;? value("agentUsername" ?>)\n       &lt;? else ?>\n       TEXT('All Agents')\n       &lt;? endif ?>\n       AS agentUsername,\n       &lt;? if exists("openItems") ?>\n         text('Open Items')\n       &lt;? elseif exists("closedItems") ?>\n         text('Closed Items')\n       &lt;? else ?>\n         text('All Items')\n       &lt;? endif ?>\n       AS f_whichitems\n;</sql>\n </querysource>\n <querysource loadFromDb="true">\n  <name>detail</name>\n  <mqlgroup>poItems</mqlgroup>\n  <mqlname>detail</mqlname>\n </querysource>\n <rpthead>\n  <height>224</height>\n  <label>\n   <rect>\n    <x>580</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Received</string>\n  </label>\n  <label>\n   <rect>\n    <x>440</x>\n    <y>200</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>UOM</string>\n  </label>\n  <field>\n   <rect>\n    <x>535</x>\n    <y>75</y>\n    <width>200</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>agentUsername</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>430</x>\n    <y>95</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Site:</string>\n  </label>\n  <field>\n   <rect>\n    <x>475</x>\n    <y>130</y>\n    <width>165</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_whichitems</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>135</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Due Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>45</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>P/O #</string>\n  </label>\n  <label>\n   <rect>\n    <x>345</x>\n    <y>5</y>\n    <width>400</width>\n    <height>40</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>P/O Line Items By Vendor</string>\n  </label>\n  <label>\n   <rect>\n    <x>405</x>\n    <y>75</y>\n    <width>125</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Purchasing Agent:</string>\n  </label>\n  <label>\n   <rect>\n    <x>225</x>\n    <y>200</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>20</x>\n    <y>75</y>\n    <width>125</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Selection:</string>\n  </label>\n  <field>\n   <rect>\n    <x>535</x>\n    <y>95</y>\n    <width>200</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>warehouse</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>150</x>\n    <y>75</y>\n    <width>200</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>selection</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>493</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Ordered</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>200</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Site</string>\n  </label>\n  <label>\n   <rect>\n    <x>665</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Returned</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>215</ystart>\n   <xend>745</xend>\n   <yend>215</yend>\n   <weight>2</weight>\n  </line>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>9</height>\n </pghead>\n <pghead>\n  <height>24</height>\n  <label>\n   <rect>\n    <x>440</x>\n    <y>0</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>UOM</string>\n  </label>\n  <label>\n   <rect>\n    <x>580</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Received</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Site</string>\n  </label>\n  <label>\n   <rect>\n    <x>493</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Ordered</string>\n  </label>\n  <label>\n   <rect>\n    <x>135</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Due Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>225</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>45</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>P/O #</string>\n  </label>\n  <label>\n   <rect>\n    <x>665</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Returned</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>15</ystart>\n   <xend>745</xend>\n   <yend>15</yend>\n   <weight>2</weight>\n  </line>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>19</height>\n   <field>\n    <rect>\n     <x>440</x>\n     <y>0</y>\n     <width>50</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>itemuom</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>225</x>\n     <y>0</y>\n     <width>150</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>itemnumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>45</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>pohead_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>135</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>poitem_duedate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>5</x>\n     <y>0</y>\n     <width>40</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>warehous_code</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>493</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>poitem_qty_ordered</column>\n    </data>\n    <format builtin="true">qty</format>\n   </field>\n   <field>\n    <rect>\n     <x>580</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>poitem_qty_received</column>\n    </data>\n    <format builtin="true">qty</format>\n   </field>\n   <field>\n    <rect>\n     <x>665</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>poitem_qty_returned</column>\n    </data>\n    <format builtin="true">qty</format>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>19</height>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>103</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>600</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
350	POsByDate	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>P/Os By Date</title>\n <name>POsByDate</name>\n <description></description>\n <grid>\n  <snap/>\n  <show/>\n  <x>0.05</x>\n  <y>0.05</y>\n </grid>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT &lt;? if exists("warehous_id") ?>\n         (SELECT warehous_code FROM whsinfo WHERE warehous_id=&lt;? value("warehous_id") ?>)\n       &lt;? else ?>\n         text('All Sites')\n       &lt;? endif ?>\n       AS warehouse,\n       &lt;? if exists("agentUsername") ?>\n       TEXT(&lt;? value("agentUsername" ?>)\n       &lt;? else ?>\n       TEXT('All Agents')\n       &lt;? endif ?>\n       AS agentUsername,\n       formatDate(&lt;? value("startDate") ?>, 'Earliest') AS startdate,\n       formatDate(&lt;? value("endDate") ?>, 'Latest') AS enddate\n</sql>\n </querysource>\n <querysource loadFromDb="true">\n  <name>detail</name>\n  <mqlgroup>purchaseOrders</mqlgroup>\n  <mqlname>detail</mqlname>\n </querysource>\n <rpthead>\n  <height>221</height>\n  <field>\n   <rect>\n    <x>550</x>\n    <y>95</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>enddate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>330</x>\n    <y>198</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Vendor</string>\n  </label>\n  <label>\n   <rect>\n    <x>80</x>\n    <y>198</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>P/O #</string>\n  </label>\n  <label>\n   <rect>\n    <x>200</x>\n    <y>198</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Status</string>\n  </label>\n  <label>\n   <rect>\n    <x>650</x>\n    <y>198</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Due Date</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>215</ystart>\n   <xend>745</xend>\n   <yend>215</yend>\n   <weight>2</weight>\n  </line>\n  <field>\n   <rect>\n    <x>135</x>\n    <y>75</y>\n    <width>275</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>agentUsername</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>30</x>\n    <y>95</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Site:</string>\n  </label>\n  <field>\n   <rect>\n    <x>135</x>\n    <y>95</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>warehouse</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>550</x>\n    <y>75</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>startdate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>345</x>\n    <y>5</y>\n    <width>400</width>\n    <height>40</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>P/Os By Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>75</y>\n    <width>125</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Purchasing Agent:</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>198</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Site</string>\n  </label>\n  <label>\n   <rect>\n    <x>442</x>\n    <y>95</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>End Order Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>432</x>\n    <y>75</y>\n    <width>110</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Start Order Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>560</x>\n    <y>198</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Order Date</string>\n  </label>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>21</height>\n  <label>\n   <rect>\n    <x>80</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>P/O #</string>\n  </label>\n  <label>\n   <rect>\n    <x>650</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Due Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>200</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Status</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>15</ystart>\n   <xend>745</xend>\n   <yend>15</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Site</string>\n  </label>\n  <label>\n   <rect>\n    <x>330</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Vendor</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>18</height>\n   <field>\n    <rect>\n     <x>5</x>\n     <y>2</y>\n     <width>70</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>warehousecode</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>325</x>\n     <y>2</y>\n     <width>230</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>vend_name</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>650</x>\n     <y>2</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_duedate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>80</x>\n     <y>2</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>pohead_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>200</x>\n     <y>2</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_status</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>565</x>\n     <y>2</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_orderdate</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>18</height>\n  <label>\n   <rect>\n    <x>600</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>103</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
351	POsByVendor	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>P/Os By Vendor</title>\n <name>POsByVendor</name>\n <description></description>\n <grid>\n  <snap/>\n  <show/>\n  <x>0.05</x>\n  <y>0.05</y>\n </grid>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT &lt;? if exists("warehous_id") ?>\n         (SELECT warehous_code FROM whsinfo WHERE warehous_id=&lt;? value("warehous_id") ?>)\n       &lt;? else ?>\n         text('All Sites')\n       &lt;? endif ?>\n       AS warehouse,\n&lt;? if exists("vend_id") ?>\n       (SELECT ('Vendor = ' || vend_name) FROM vendinfo WHERE vend_id=&lt;? value("vend_id") ?>)\n&lt;? elseif exists("vendtype_id") ?>\n       (SELECT ('Vendor Type = ' || vendtype_code) FROM vendtype WHERE vendtype_id=&lt;? value("vendtype_id") ?>)\n&lt;? elseif exists("vendtype_pattern") ?>\n       ('Vendor Type pattern = ' || &lt;? value("vendtype_pattern") ?>)\n&lt;? else ?>\n       'All Vendors'\n&lt;? endif ?>\n       AS selection,\n       formatDate(&lt;? value("startDate") ?>, 'Earliest') AS startdate,\n       formatDate(&lt;? value("endDate") ?>, 'Latest') AS enddate,\n       &lt;? if exists("byReceiptDate") ?>\n         TEXT('By Receipt Date')\n       &lt;? elseif exists("byDueDate") ?>\n         TEXT('By Due Date')\n       &lt;? else ?>\n         TEXT('By Order Date')\n       &lt;? endif ?>\n       AS f_byDate,\n       &lt;? if exists("descrip_pattern") ?>\n         TEXT('Where Item Description contains ' || &lt;? value("descrip_pattern") ?>)\n       &lt;? else ?>\n         TEXT('')\n       &lt;? endif ?>\n       AS f_descrip\n</sql>\n </querysource>\n <querysource loadFromDb="true">\n  <name>detail</name>\n  <mqlgroup>purchaseOrders</mqlgroup>\n  <mqlname>detail</mqlname>\n </querysource>\n <rpthead>\n  <height>221</height>\n  <field>\n   <rect>\n    <x>135</x>\n    <y>135</y>\n    <width>540</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_descrip</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>550</x>\n    <y>115</y>\n    <width>180</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_byDate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>442</x>\n    <y>95</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>End Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>30</x>\n    <y>95</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Site:</string>\n  </label>\n  <field>\n   <rect>\n    <x>135</x>\n    <y>95</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>warehouse</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>442</x>\n    <y>75</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Start Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>80</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>P/O #</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>200</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Site</string>\n  </label>\n  <label>\n   <rect>\n    <x>200</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Status</string>\n  </label>\n  <label>\n   <rect>\n    <x>650</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>345</x>\n    <y>5</y>\n    <width>400</width>\n    <height>40</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>P/Os By Vendor</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>215</ystart>\n   <xend>745</xend>\n   <yend>215</yend>\n   <weight>2</weight>\n  </line>\n  <field>\n   <rect>\n    <x>135</x>\n    <y>75</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>selection</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>330</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Vendor</string>\n  </label>\n  <field>\n   <rect>\n    <x>550</x>\n    <y>95</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>enddate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>75</y>\n    <width>125</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Selection:</string>\n  </label>\n  <field>\n   <rect>\n    <x>550</x>\n    <y>75</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>startdate</column>\n   </data>\n  </field>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>21</height>\n  <label>\n   <rect>\n    <x>330</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Vendor</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>15</ystart>\n   <xend>745</xend>\n   <yend>15</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>200</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Status</string>\n  </label>\n  <label>\n   <rect>\n    <x>80</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>P/O #</string>\n  </label>\n  <label>\n   <rect>\n    <x>650</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Site</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>18</height>\n   <field>\n    <rect>\n     <x>650</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_orderdate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>5</x>\n     <y>0</y>\n     <width>70</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>warehousecode</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>200</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_status</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>80</x>\n     <y>0</y>\n     <width>110</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>pohead_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>330</x>\n     <y>0</y>\n     <width>250</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>vend_number</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>18</height>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>103</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>600</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
422	PackageMasterList	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Package Master List</title>\n <name>PackageMasterList</name>\n <description></description>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT *, formatboolyn(packageIsEnabled(pkghead_name)) AS enabled\nFROM pkghead\nORDER BY pkghead_name, pkghead_version DESC;</sql>\n </querysource>\n <rpthead>\n  <height>76</height>\n  <label>\n   <rect>\n    <x>265</x>\n    <y>55</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>295</x>\n    <y>10</y>\n    <width>450</width>\n    <height>38</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Package Master List</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>55</y>\n    <width>95</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Package</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>70</ystart>\n   <xend>745</xend>\n   <yend>70</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>565</x>\n    <y>55</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Version</string>\n  </label>\n  <label>\n   <rect>\n    <x>665</x>\n    <y>55</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Enabled</string>\n  </label>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>21</height>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>0</y>\n    <width>95</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Package</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>15</ystart>\n   <xend>745</xend>\n   <yend>15</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>265</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>565</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Version</string>\n  </label>\n  <label>\n   <rect>\n    <x>665</x>\n    <y>0</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Enabled</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>16</height>\n   <field>\n    <rect>\n     <x>265</x>\n     <y>0</y>\n     <width>300</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>pkghead_descrip</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>10</x>\n     <y>0</y>\n     <width>250</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>pkghead_name</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>565</x>\n     <y>0</y>\n     <width>100</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>pkghead_version</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>665</x>\n     <y>0</y>\n     <width>50</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>enabled</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>16</height>\n  <field>\n   <rect>\n    <x>90</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>615</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
328	PackingList-Shipment	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Packing List (Shipment)</title>\n <name>PackingList-Shipment</name>\n <description>Non-Hybrid version - driven only by shiphead_id parameter - Packing List showing the contents of a particular shipment - Shows RA# if SO is a replacement order for and RA</description>\n <parameter default="324" active="true" listtype="static" type="string" name="shiphead_id">\n  <description></description>\n </parameter>\n <grid>\n  <snap/>\n  <show/>\n  <x>0.05</x>\n  <y>0.05</y>\n </grid>\n <size>Letter</size>\n <portrait/>\n <topmargin>25</topmargin>\n <bottommargin>25</bottommargin>\n <rightmargin>25</rightmargin>\n <leftmargin>25</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT shiphead_number, 'S/O #:' AS ordertype,\n       cohead_number AS ordernumber,\n       formatsobarcode(cohead_id) AS order_barcode,\n       COALESCE(shiphead_shipvia, cohead_shipvia) AS shipvia,\n       cohead_shiptophone AS shiptophone,\n       cohead_custponumber,\n       formatDate(cohead_orderdate) AS orderdate,\n       cohead_shipcomments AS shipcomments,   \n       cohead_billtoname AS billtoname,\n       formataddr(cohead_billtoaddress1, cohead_billtoaddress2,\n                  cohead_billtoaddress3,\n                  (cohead_billtocity || '  ' ||   cohead_billtostate ||\n                  '  ' || cohead_billtozipcode), cohead_billtocountry) AS billing_address,\n       cohead_shiptoname AS shiptoname,\n       formataddr(cohead_shiptoaddress1, cohead_shiptoaddress2,\n                  cohead_shiptoaddress3,\n                  (cohead_shiptocity || '  ' ||   cohead_shiptostate ||\n                  '  ' || cohead_shiptozipcode), cohead_shiptocountry) AS shipping_address,           \n\n       cust_number,\n       trim(cntct_first_name || ' ' || cntct_last_name) AS cust_contact,\n       cntct_phone AS cust_phone,\n       terms_descrip\n  FROM shiphead\n  JOIN cohead ON (cohead_id=shiphead_order_id)\n  JOIN custinfo ON (cohead_cust_id=cust_id)\n  JOIN terms ON (cohead_terms_id=terms_id)\n  LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id)\n  LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id)\n WHERE (shiphead_id=&lt;? value("shiphead_id") ?>)\n\n&lt;? if exists("MultiWhs") ?>\nUNION\nSELECT shiphead_number, 'T/O #:' AS ordertype,\n       tohead_number AS ordernumber,\n       formattobarcode(tohead_id) AS order_barcode,\n       shiphead_shipvia AS shipvia,\n       tohead_destphone AS shiptophone,\n       TEXT(' ') AS cohead_custponumber,\n       formatDate(tohead_orderdate) AS orderdate,\n       tohead_shipcomments AS shipcomments,\n       tohead_srcname AS billtoname,\n       formataddr(tohead_srcaddress1, tohead_srcaddress2,\n                   tohead_srcaddress3,\n                  (tohead_srccity || ' ' || tohead_srcstate ||\n                   ' ' || tohead_srcpostalcode), tohead_srccountry) AS billing_address,\n       tohead_destname AS shiptoname,\n       formataddr(tohead_destaddress1, tohead_destaddress2,\n                   tohead_destaddress3,\n                  (tohead_destcity || ' ' || tohead_deststate ||\n                   ' ' || tohead_destpostalcode), tohead_destcountry) AS shipping_address,\n       'Transfer Order' AS cust_number,\n       tohead_destcntct_name AS cust_contact,\n       tohead_destphone AS cust_phone,\n       '' AS terms_descrip\n  FROM shiphead, tohead\n WHERE ((tohead_id=shiphead_order_id)\n   AND  (shiphead_order_type='TO')\n   AND  (shiphead_id=&lt;? value("shiphead_id") ?>)\n)\n&lt;? endif ?>;</sql>\n </querysource>\n <querysource>\n  <name>scheddate</name>\n  <sql>SELECT formatDate(MIN(coitem_scheddate)) AS scheddate\n  FROM coitem, shipitem\n WHERE ((coitem_status &lt;> 'X')\n   AND  (coitem_id=shipitem_orderitem_id)\n   AND  (shipitem_shiphead_id=&lt;? value("shiphead_id") ?>));</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT 1 AS groupby,\n       coitem_linenumber AS sortline, coitem_subnumber AS sortsubline,\n       formatsolinenumber(coitem_id) AS linenumber,\n       coitem_memo AS memo,\n       CASE WHEN (coitem_custpn != '') THEN coitem_custpn\n            ELSE item_number\n       END AS item_number,\n       formatitemsitebarcode(itemsite_id) AS item_barcode,\n       formatsoitembarcode(coitem_id) AS orderitem_barcode,\n--     In 2.3 replaced the next line:\n--     uom_name,\n--     with:\n       (select uom_name from uom where uom_id = coitem_qty_uom_id) AS uom_name,\n       itemsellinguom(item_id) AS shipuom,\n       CASE WHEN (coitem_custpn != '' AND itemalias_usedescrip=TRUE) THEN itemalias_descrip1\n            ELSE item_descrip1\n       END AS item_descrip1,\n       CASE WHEN (coitem_custpn != '' AND itemalias_usedescrip=TRUE) THEN itemalias_descrip2\n            ELSE item_descrip2\n       END AS item_descrip2,\n\n       formatQty(coitem_qtyord) AS ordered,\n       (SELECT formatQty(SUM(shipitem_qty)) FROM shipitem WHERE ((shipitem_shiphead_id=&lt;? value("shiphead_id") ?>) AND (shipitem_orderitem_id=coitem_id))) AS shipped,\n\n       CASE WHEN (coitem_status='O' AND (SELECT cust_creditstatus\n                                           FROM custinfo,cohead\n                                          WHERE coitem_cohead_id=cohead_id\n                                            AND (cust_id=cohead_cust_id))='H') THEN 'H'\n            WHEN (coitem_status='O' AND ((SELECT SUM(invcitem_billed)\n                                            FROM cohead, invchead, invcitem\n                                           WHERE ((invchead_ordernumber=cohead_number)\n                                             AND  (invcitem_invchead_id=invchead_id)\n                                             AND  (invcitem_item_id=item_id)\n                                             AND  (invcitem_warehous_id=itemsite_warehous_id)\n                                             AND  (invcitem_linenumber=coitem_linenumber)\n                                             AND  (cohead_id=coitem_cohead_id))) >= coitem_qtyord)) THEN 'I'\n            WHEN (coitem_status='O' AND ((SELECT SUM(invcitem_billed)\n                                            FROM cohead, invchead, invcitem\n                                           WHERE ((invchead_ordernumber=cohead_number)\n                                             AND  (invcitem_invchead_id=invchead_id)\n                                             AND  (invcitem_item_id=item_id)\n                                             AND  (invcitem_warehous_id=itemsite_warehous_id)\n                                             AND  (invcitem_linenumber=coitem_linenumber)\n                                             AND  (cohead_id=coitem_cohead_id))) > 0)) THEN 'P'\n            WHEN (coitem_status='O' AND (qtyAvailable(itemsite_id) - qtyAllocated(itemsite_id, CURRENT_DATE)\n                                         + qtyOrdered(itemsite_id, CURRENT_DATE))\n                                          >= (coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned)) THEN 'R'\n            ELSE coitem_status\n       END AS f_status,\n       CASE\n         WHEN (getPacklistItemLotSerial(shipitem_shiphead_id, coitem_id) = '') THEN\n           ''\n         ELSE\n           'Serial #/Lot Information:'\n       END AS lotserial_title,\n       getPacklistItemLotSerial(shipitem_shiphead_id, coitem_id) AS lotserial,\n       CASE\n         WHEN (getPacklistCharName(shipitem_shiphead_id, coitem_id) = '') THEN\n           ''\n         ELSE\n           'Characteristics:'\n       END AS char_title,\n       getPacklistCharName(shipitem_shiphead_id, coitem_id) AS char_name,\n       getPacklistCharValue(shipitem_shiphead_id, coitem_id) AS char_value\n  FROM shipitem\n       JOIN coitem ON (coitem_id=shipitem_orderitem_id)\n       JOIN itemsite ON (itemsite_id=coitem_itemsite_id)\n       JOIN item ON (item_id=itemsite_item_id)\n       JOIN uom ON (uom_id=item_inv_uom_id)\n       LEFT OUTER JOIN itemalias ON (itemalias_item_id=item_id AND itemalias_number=coitem_custpn) \n WHERE ( (coitem_status &lt;> 'X')\n   AND (shipitem_shiphead_id=&lt;? value("shiphead_id") ?>)\n)\n&lt;? if exists("MultiWhs") ?>\nUNION\nSELECT 2 AS groupby,\n       toitem_linenumber AS sortline, 0 AS sortsubline,\n       CAST(toitem_linenumber AS text) AS linenumber,\n       toitem_notes AS memo,\n       item_number,\n       formatitemsitebarcode(itemsite_id) AS item_barcode,\n       formattoitembarcode(toitem_id) AS orderitem_barcode,\n       uom_name,\n       itemsellinguom(item_id) AS shipuom,\n       item_descrip1,\n       item_descrip2,\n\n       formatQty(toitem_qty_ordered) AS ordered,\n\n       (SELECT formatQty(SUM(shipitem_qty))\n        FROM shipitem\n        WHERE ((shipitem_shiphead_id=&lt;? value("shiphead_id") ?>)\n          AND  (shipitem_orderitem_id=toitem_id))\n       ) AS shipped,\n\n       toitem_status AS f_status,\n       CASE\n         WHEN (getPacklistItemLotSerial(shiphead_id, toitem_id) = '') THEN\n           ''\n         ELSE\n           'Serial #/Lot Information:'\n       END AS lotserial_title,\n       getPacklistItemLotSerial(shiphead_id, toitem_id) AS lotserial,\n       '' AS char_title,\n       '' AS char_name,\n       '' AS char_value\n  FROM itemsite, item, toitem, tohead, shipitem, shiphead, uom\n WHERE ((toitem_item_id=item_id)\n   AND  (item_inv_uom_id=uom_id)\n   AND  (item_id=itemsite_item_id)\n   AND  (toitem_tohead_id=tohead_id)\n   AND  (toitem_status &lt;> 'X')\n   AND  (tohead_src_warehous_id=itemsite_warehous_id)\n   AND  (toitem_id=shipitem_orderitem_id)\n   AND  (shipitem_shiphead_id=shiphead_id)\n   AND  (shiphead_order_type='TO')\n   AND  (shiphead_id=&lt;? value("shiphead_id") ?>)\n)\n&lt;? endif ?>\nORDER BY sortline, sortsubline;</sql>\n </querysource>\n <querysource>\n  <name>logo</name>\n  <sql>SELECT image_data \nFROM image \nWHERE ((image_name='logo'));</sql>\n </querysource>\n <querysource>\n  <name>so_ra_relation</name>\n  <sql>--added in 2.3 to show RA link to S/O if the SO\n--was created as the result of a replacement RA\n&lt;? if exists("EnableReturnAuth") ?>\nselect \n'RA #' AS ratext,\nrahead_number\nfrom\nrahead, cohead, shiphead\nwhere \nrahead_new_cohead_id = cohead_id\nand cohead_id = shiphead_order_id\nand shiphead_id = &lt;? value("shiphead_id") ?>;\n&lt;? else ?>\nselect \n'' AS ratext,\n'' AS rahead_number\n&lt;? endif ?></sql>\n </querysource>\n <rpthead>\n  <height>463</height>\n  <image>\n   <rect>\n    <x>375</x>\n    <y>0</y>\n    <width>425</width>\n    <height>100</height>\n   </rect>\n   <mode>stretch</mode>\n   <data>\n    <query>logo</query>\n    <column>image_data</column>\n   </data>\n  </image>\n  <field>\n   <rect>\n    <x>170</x>\n    <y>112</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>ordernumber</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>10</y>\n    <width>355</width>\n    <height>50</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>20</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Shipment Packing List</string>\n  </label>\n  <label>\n   <rect>\n    <x>85</x>\n    <y>440</y>\n    <width>200</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>85</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Shipment #:</string>\n  </label>\n  <label>\n   <rect>\n    <x>525</x>\n    <y>425</y>\n    <width>75</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Verified</string>\n  </label>\n  <field>\n   <rect>\n    <x>170</x>\n    <y>175</y>\n    <width>170</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>cust_number</column>\n   </data>\n  </field>\n  <barcode>\n   <rect>\n    <x>375</x>\n    <y>202</y>\n    <width>307</width>\n    <height>25</height>\n   </rect>\n   <format>3of9</format>\n   <maxlength>20</maxlength>\n   <left/>\n   <narrowBarWidth>0.01</narrowBarWidth>\n   <data>\n    <query>head</query>\n    <column>cohead_custponumber</column>\n   </data>\n  </barcode>\n  <label>\n   <rect>\n    <x>375</x>\n    <y>400</y>\n    <width>75</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Terms:</string>\n  </label>\n  <field>\n   <rect>\n    <x>480</x>\n    <y>285</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>shiptoname</column>\n   </data>\n  </field>\n  <line>\n   <xstart>0</xstart>\n   <ystart>425</ystart>\n   <xend>797</xend>\n   <yend>425</yend>\n   <weight>0</weight>\n  </line>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>202</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Customer P/O #:</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>252</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Sched. Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>231</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Order Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>25</x>\n    <y>400</y>\n    <width>95</width>\n    <height>25</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <string>Attention:</string>\n  </label>\n  <barcode>\n   <rect>\n    <x>375</x>\n    <y>175</y>\n    <width>177</width>\n    <height>25</height>\n   </rect>\n   <format>3of9</format>\n   <maxlength>10</maxlength>\n   <left/>\n   <narrowBarWidth>0.01</narrowBarWidth>\n   <data>\n    <query>head</query>\n    <column>cust_number</column>\n   </data>\n  </barcode>\n  <field>\n   <rect>\n    <x>170</x>\n    <y>85</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>shiphead_number</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>10</x>\n    <y>145</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>so_ra_relation</query>\n    <column>ratext</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>10</x>\n    <y>112</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>ordertype</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>295</x>\n    <y>425</y>\n    <width>40</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>UOM</string>\n  </label>\n  <text>\n   <rect>\n    <x>480</x>\n    <y>305</y>\n    <width>300</width>\n    <height>15</height>\n   </rect>\n   <bottompad>10</bottompad>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>shipping_address</column>\n   </data>\n  </text>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>285</y>\n    <width>75</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Bill To:</string>\n  </label>\n  <field>\n   <rect>\n    <x>480</x>\n    <y>252</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>shipvia</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>455</x>\n    <y>400</y>\n    <width>320</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>terms_descrip</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>170</x>\n    <y>231</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>orderdate</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>170</x>\n    <y>202</y>\n    <width>170</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>cohead_custponumber</column>\n   </data>\n  </field>\n  <line>\n   <xstart>0</xstart>\n   <ystart>455</ystart>\n   <xend>797</xend>\n   <yend>455</yend>\n   <weight>0</weight>\n  </line>\n  <label>\n   <rect>\n    <x>375</x>\n    <y>252</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Ship Via:</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>425</y>\n    <width>75</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Order Line</string>\n  </label>\n  <label>\n   <rect>\n    <x>345</x>\n    <y>425</y>\n    <width>80</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Ordered</string>\n  </label>\n  <barcode>\n   <rect>\n    <x>375</x>\n    <y>112</y>\n    <width>231</width>\n    <height>25</height>\n   </rect>\n   <format>128</format>\n   <maxlength>10</maxlength>\n   <left/>\n   <narrowBarWidth>0.01</narrowBarWidth>\n   <data>\n    <query>head</query>\n    <column>order_barcode</column>\n   </data>\n  </barcode>\n  <field>\n   <rect>\n    <x>90</x>\n    <y>285</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>billtoname</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>170</x>\n    <y>252</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>scheddate</query>\n    <column>scheddate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>432</x>\n    <y>425</y>\n    <width>80</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Shipped</string>\n  </label>\n  <label>\n   <rect>\n    <x>85</x>\n    <y>425</y>\n    <width>200</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Number</string>\n  </label>\n  <field>\n   <rect>\n    <x>170</x>\n    <y>145</y>\n    <width>170</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>so_ra_relation</query>\n    <column>rahead_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>375</x>\n    <y>285</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Ship To:</string>\n  </label>\n  <field>\n   <rect>\n    <x>112</x>\n    <y>400</y>\n    <width>250</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>cust_contact</column>\n   </data>\n  </field>\n  <text>\n   <rect>\n    <x>90</x>\n    <y>305</y>\n    <width>300</width>\n    <height>15</height>\n   </rect>\n   <bottompad>10</bottompad>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>billing_address</column>\n   </data>\n  </text>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>175</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Customer #:</string>\n  </label>\n </rpthead>\n <section>\n  <name>detail</name>\n  <group>\n   <name>characteristic</name>\n   <column>linenumber</column>\n   <foot>\n    <height>35</height>\n    <text>\n     <rect>\n      <x>130</x>\n      <y>5</y>\n      <width>195</width>\n      <height>17</height>\n     </rect>\n     <bottompad>14</bottompad>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>char_name</column>\n     </data>\n    </text>\n    <text>\n     <rect>\n      <x>10</x>\n      <y>5</y>\n      <width>103</width>\n      <height>17</height>\n     </rect>\n     <bottompad>14</bottompad>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>char_title</column>\n     </data>\n    </text>\n    <text>\n     <rect>\n      <x>370</x>\n      <y>5</y>\n      <width>195</width>\n      <height>17</height>\n     </rect>\n     <bottompad>14</bottompad>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>char_value</column>\n     </data>\n    </text>\n   </foot>\n  </group>\n  <group>\n   <name>lotserial</name>\n   <column>linenumber</column>\n   <foot>\n    <height>29</height>\n    <text>\n     <rect>\n      <x>10</x>\n      <y>5</y>\n      <width>185</width>\n      <height>17</height>\n     </rect>\n     <bottompad>14</bottompad>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>lotserial_title</column>\n     </data>\n    </text>\n    <text>\n     <rect>\n      <x>228</x>\n      <y>5</y>\n      <width>550</width>\n      <height>17</height>\n     </rect>\n     <bottompad>14</bottompad>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>lotserial</column>\n     </data>\n    </text>\n   </foot>\n  </group>\n  <group>\n   <name>line</name>\n   <column>linenumber</column>\n   <foot>\n    <height>82</height>\n    <label>\n     <rect>\n      <x>610</x>\n      <y>0</y>\n      <width>50</width>\n      <height>17</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Status:</string>\n    </label>\n    <field>\n     <rect>\n      <x>430</x>\n      <y>0</y>\n      <width>80</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>shipped</column>\n     </data>\n    </field>\n    <text>\n     <rect>\n      <x>70</x>\n      <y>55</y>\n      <width>665</width>\n      <height>17</height>\n     </rect>\n     <bottompad>14</bottompad>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>memo</column>\n     </data>\n    </text>\n    <field>\n     <rect>\n      <x>80</x>\n      <y>0</y>\n      <width>200</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>11</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>item_number</column>\n     </data>\n    </field>\n    <line>\n     <xstart>545</xstart>\n     <ystart>15</ystart>\n     <xend>595</xend>\n     <yend>15</yend>\n     <weight>1</weight>\n    </line>\n    <field>\n     <rect>\n      <x>290</x>\n      <y>0</y>\n      <width>40</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <hcenter/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>uom_name</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>340</x>\n      <y>0</y>\n      <width>80</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>ordered</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>80</x>\n      <y>35</y>\n      <width>300</width>\n      <height>15</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>11</size>\n      <weight>normal</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>item_descrip2</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>670</x>\n      <y>0</y>\n      <width>50</width>\n      <height>17</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>f_status</column>\n     </data>\n    </field>\n    <barcode>\n     <rect>\n      <x>415</x>\n      <y>20</y>\n      <width>380</width>\n      <height>30</height>\n     </rect>\n     <format>128</format>\n     <maxlength>15</maxlength>\n     <right/>\n     <narrowBarWidth>0.01</narrowBarWidth>\n     <data>\n      <query>detail</query>\n      <column>item_barcode</column>\n     </data>\n    </barcode>\n    <field>\n     <rect>\n      <x>80</x>\n      <y>20</y>\n      <width>300</width>\n      <height>15</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>11</size>\n      <weight>normal</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>item_descrip1</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>5</x>\n      <y>0</y>\n      <width>42</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>11</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>linenumber</column>\n     </data>\n    </field>\n    <label>\n     <rect>\n      <x>10</x>\n      <y>55</y>\n      <width>55</width>\n      <height>17</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Notes:</string>\n    </label>\n   </foot>\n  </group>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>9</height>\n  </detail>\n </section>\n <section>\n  <name>packlist</name>\n  <detail>\n   <key>\n    <query>head</query>\n   </key>\n   <height>41</height>\n   <text>\n    <rect>\n     <x>5</x>\n     <y>10</y>\n     <width>625</width>\n     <height>17</height>\n    </rect>\n    <bottompad>14</bottompad>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>head</query>\n     <column>shipcomments</column>\n    </data>\n   </text>\n   <line>\n    <xstart>5</xstart>\n    <ystart>5</ystart>\n    <xend>842</xend>\n    <yend>5</yend>\n    <weight>0</weight>\n   </line>\n  </detail>\n </section>\n <pgfoot>\n  <height>57</height>\n  <field>\n   <rect>\n    <x>455</x>\n    <y>7</y>\n    <width>80</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>ordernumber</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>695</x>\n    <y>5</y>\n    <width>37</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>Page:</string>\n  </label>\n  <label>\n   <rect>\n    <x>25</x>\n    <y>5</y>\n    <width>61</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>Print Date: </string>\n  </label>\n  <field>\n   <rect>\n    <x>735</x>\n    <y>5</y>\n    <width>45</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>90</x>\n    <y>5</y>\n    <width>95</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>365</x>\n    <y>7</y>\n    <width>80</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>ordertype</column>\n   </data>\n  </field>\n </pgfoot>\n <rptfoot>\n  <height>94</height>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>45</y>\n    <width>160</width>\n    <height>35</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Completed By:</string>\n  </label>\n  <line>\n   <xstart>540</xstart>\n   <ystart>70</ystart>\n   <xend>790</xend>\n   <yend>70</yend>\n   <weight>0</weight>\n  </line>\n  <label>\n   <rect>\n    <x>415</x>\n    <y>45</y>\n    <width>165</width>\n    <height>30</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Checked By:</string>\n  </label>\n  <line>\n   <xstart>160</xstart>\n   <ystart>70</ystart>\n   <xend>407</xend>\n   <yend>70</yend>\n   <weight>0</weight>\n  </line>\n </rptfoot>\n</report>\n	Non-Hybrid version - driven only by shiphead_id parameter - Packing List showing the contents of a particular shipment - Shows RA# if SO is a replacement order for and RA	0	2015-10-01 17:14:33.361434
327	PackingList	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Packing List</title>\n <name>PackingList</name>\n <description>Hybrid Packing List - use the shiphead_id if it is passed but use the order id and type if they're passed but not shiphead_id - Shows Lot/Serial</description>\n <grid>\n  <snap/>\n  <show/>\n  <x>0.05</x>\n  <y>0.05</y>\n </grid>\n <size>Letter</size>\n <portrait/>\n <topmargin>25</topmargin>\n <bottommargin>25</bottommargin>\n <rightmargin>25</rightmargin>\n <leftmargin>25</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT COALESCE(shiphead_number::TEXT, 'Not Issued To Shipping') AS shiphead_number,\n       'S/O #:' AS ordertype,\n       cohead_number AS ordernumber,\n       formatsobarcode(cohead_id) AS order_barcode,\n       COALESCE(shiphead_shipvia, cohead_shipvia) AS shipvia,\n       cohead_shiptophone AS shiptophone,\n       cohead_custponumber,\n       formatDate(cohead_orderdate) AS orderdate,\n       cohead_shipcomments AS shipcomments,\n       cohead_billtoname AS billtoname,\n       formataddr(cohead_billtoaddress1,\n                  cohead_billtoaddress2,\n                  cohead_billtoaddress3,\n                  (cohead_billtocity || '  ' ||   cohead_billtostate || '  ' || cohead_billtozipcode),\n                  cohead_billtocountry) AS billing_address,\n       cohead_shiptoname AS shiptoname,\n       formataddr(cohead_shiptoaddress1,\n                  cohead_shiptoaddress2,\n                  cohead_shiptoaddress3,\n                  (cohead_shiptocity || '  ' ||   cohead_shiptostate || '  ' || cohead_shiptozipcode),\n                  cohead_shiptocountry) AS shipping_address,           \n       cust_number,\n       trim(cntct_first_name || ' ' || cntct_last_name) AS cust_contact,\n       cntct_phone AS cust_phone,\n       terms_descrip\n  FROM cohead\n  JOIN custinfo ON (cohead_cust_id=cust_id)\n  JOIN terms ON (cohead_terms_id=terms_id)\n  LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id)\n&lt;? if exists("shiphead_id") ?>\n   JOIN\n&lt;? else ?>\n   LEFT OUTER JOIN\n&lt;? endif ?>\n        shiphead ON (shiphead_order_type='SO') AND (shiphead_order_id=cohead_id)\nWHERE TRUE\n&lt;? if exists('shiphead_id') ?>\n    AND (shiphead_id=&lt;? value("shiphead_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("head_id") ?>\n   AND  (cohead_id=&lt;? value("head_id") ?>)\n   AND  (&lt;? value("head_type") ?>='SO')\n&lt;? endif ?>\n\n\n&lt;? if exists("MultiWhs") ?>\nUNION\nSELECT COALESCE(shiphead_number::TEXT, 'Not Issued To Shipping') AS shiphead_number,\n       'T/O #:' AS ordertype,\n       tohead_number AS ordernumber,\n       formattobarcode(tohead_id) AS order_barcode,\n       COALESCE(shiphead_shipvia, tohead_shipvia) AS shipvia,\n       tohead_destphone AS shiptophone,\n       TEXT(' ') AS cohead_custponumber,\n       formatDate(tohead_orderdate) AS orderdate,\n       tohead_shipcomments AS shipcomments,\n       tohead_srcname AS billtoname,\n       formataddr(tohead_srcaddress1,\n                  tohead_srcaddress2,\n                  tohead_srcaddress3,\n                  (tohead_srccity || ' ' || tohead_srcstate || ' ' || tohead_srcpostalcode),\n                  tohead_srccountry) AS billing_address,\n       tohead_destname AS shiptoname,\n       formataddr(tohead_destaddress1,\n                  tohead_destaddress2,\n                  tohead_destaddress3,\n                  (tohead_destcity || ' ' || tohead_deststate || ' ' || tohead_destpostalcode),\n                  tohead_destcountry) AS shipping_address,\n       'Transfer Order' AS cust_number,\n       tohead_destcntct_name AS cust_contact,\n       tohead_destphone AS cust_phone,\n       '' AS terms_descrip\n  FROM tohead \n&lt;? if exists("shiphead_id") ?>\n\tJOIN\n&lt;? else ?>\n\tLEFT OUTER JOIN\n&lt;? endif ?>\n       shiphead ON (shiphead_order_type='TO') AND (shiphead_order_id=tohead_id)\nWHERE TRUE\n&lt;? if exists('shiphead_id') ?>\n    AND (shiphead_id=&lt;? value("shiphead_id")?>)\n&lt;? endif ?>\n&lt;? if exists("head_id") ?>\n   AND (tohead_id=&lt;? value("head_id") ?>)\n   AND (&lt;? value("head_type") ?>='TO')\n&lt;? endif ?>\n&lt;? endif ?>;</sql>\n </querysource>\n <querysource>\n  <name>scheddate</name>\n  <sql>SELECT formatDate(MIN(orderitem_scheddate)) AS scheddate\n  FROM orderitem\n       &lt;? if exists("shiphead_id") ?>\n       JOIN shiphead ON ((orderitem_orderhead_type=shiphead_order_type)\n\t\t     AND (orderitem_orderhead_id=shiphead_order_id)\n\t\t     AND (shiphead_id=&lt;? value("shiphead_id")?>))\n       JOIN shipitem ON ((shiphead_id=shipitem_shiphead_id)\n\t\t     AND (shipitem_orderitem_id=orderitem_id))\n       &lt;? endif ?>\n WHERE ((orderitem_status &lt;> 'X')\n&lt;? if exists("head_id") ?>\n   AND  (orderitem_orderhead_type=&lt;? value("head_type") ?>)\n   AND  (orderitem_orderhead_id=&lt;? value("head_id") ?>)\n&lt;? endif ?>\n );</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT 1 AS groupby,\n       coitem_linenumber AS linenumber,\n       coitem_memo AS memo,\n       CASE WHEN (coitem_custpn != '') THEN coitem_custpn\n            ELSE item_number\n       END AS item_number,\n       formatitemsitebarcode(itemsite_id) AS item_barcode,\n       formatsoitembarcode(coitem_id) AS orderitem_barcode,\n       coitemuom.uom_name AS uom_name,\n       itemsellinguom(item_id) AS shipuom,\n       CASE WHEN (coitem_custpn != '' AND itemalias_usedescrip=TRUE) THEN itemalias_descrip1\n            ELSE item_descrip1\n       END AS item_descrip1,\n       CASE WHEN (coitem_custpn != '' AND itemalias_usedescrip=TRUE) THEN itemalias_descrip2\n            ELSE item_descrip2\n       END AS item_descrip2,\n       formatQty(coitem_qtyord) AS ordered,\n       formatQty(qtyAtShipping('SO', coitem_id)) AS atShipping,\n       getSoitemStatus(coitem_id) AS f_status\n  FROM coitem\n       JOIN itemsite ON (itemsite_id=coitem_itemsite_id)\n       JOIN item ON (item_id=itemsite_item_id)\n       JOIN uom invuom ON (invuom.uom_id = item_inv_uom_id)\n       JOIN uom coitemuom ON (coitemuom.uom_id = coitem_qty_uom_id) \n       LEFT OUTER JOIN itemalias ON (itemalias_item_id=item_id AND itemalias_number=coitem_custpn) \n WHERE ( (coitem_status &lt;> 'X')\n&lt;? if exists("shiphead_id") ?>\n   AND  (coitem_cohead_id IN (SELECT shiphead_order_id FROM shiphead\n\t\t\t      WHERE ((shiphead_id=&lt;? value("shiphead_id") ?>)\n\t\t\t        AND  (shiphead_order_type='SO'))))\n&lt;? endif ?>\n&lt;? if exists("head_id") ?>\n   AND  (&lt;? value("head_type") ?>='SO')\n   AND  (coitem_cohead_id=&lt;? value("head_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("warehous_id") ?>\n   AND (itemsite_warehous_id=&lt;? value("warehous_id") ?>)\n&lt;? endif ?>\n)\n&lt;? if exists("MultiWhs") ?>\nUNION\nSELECT 2 AS groupby,\n       toitem_linenumber AS linenumber,\n       toitem_notes AS memo,\n       item_number,\n       formatitemsitebarcode(itemsite_id) AS item_barcode,\n       formattoitembarcode(toitem_id) AS orderitem_barcode,\n       uom_name,\n       itemsellinguom(item_id) AS shipuom,\n       item_descrip1,\n       item_descrip2,\n       formatQty(toitem_qty_ordered) AS ordered,\n       formatQty(qtyAtShipping('TO', toitem_id)) AS atShipping,\n       toitem_status AS f_status\n  FROM itemsite, item, toitem, tohead, uom\n WHERE ((toitem_item_id=item_id)\n   AND  (item_inv_uom_id=uom_id)\n   AND  (item_id=itemsite_item_id)\n   AND  (toitem_tohead_id=tohead_id)\n   AND  (toitem_status &lt;> 'X')\n   AND  (tohead_src_warehous_id=itemsite_warehous_id)\n&lt;? if exists("shiphead_id") ?>\n   AND  (toitem_tohead_id IN (SELECT shiphead_order_id FROM shiphead\n\t\t\t      WHERE ((shiphead_id=&lt;? value("shiphead_id") ?>)\n\t\t\t        AND  (shiphead_order_type='TO'))))\n&lt;? endif ?>\n&lt;? if exists("head_id") ?>\n   AND  (&lt;? value("head_type") ?>='TO')\n   AND  (toitem_tohead_id=&lt;? value("head_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("warehous_id") ?>\n   AND (itemsite_warehous_id=&lt;? value("warehous_id") ?>)\n&lt;? endif ?>\n)\n&lt;? endif ?>\nORDER BY linenumber;</sql>\n </querysource>\n <querysource>\n  <name>logo</name>\n  <sql>SELECT image_data \nFROM image \nWHERE ((image_name='logo'));</sql>\n </querysource>\n <querysource>\n  <name>lotdetail</name>\n  <sql>SELECT * FROM \n(\n  SELECT\n    shiphead_number,\n    (cohead_number || '-' || coitem_linenumber) AS ordernumber,\n    item_number,\n    formatlotserialnumber(invdetail_ls_id) AS invdetail_lotserial,\n    SUM(invdetail_qty) * -1 AS lotqty,\n    SUM(invhist_invqty) as totalshipmentqty,\n    invhist_transtype,\n    formatdate(MAX(invhist_transdate)) AS invhistdate,\n    formatdate(MAX(shipitem_transdate)) AS shiptransdate\n  FROM shiphead\n    JOIN shipitem ON (shipitem_shiphead_id=shiphead_id)\n    JOIN invhist ON (invhist_id=shipitem_invhist_id)\n    JOIN invdetail ON (invdetail_invhist_id=invhist_id)\n    JOIN cohead ON (cohead_id=shiphead_order_id)\n    JOIN coitem ON (coitem_id=shipitem_orderitem_id)\n    JOIN itemsite ON (itemsite_id=coitem_itemsite_id)\n    JOIN item ON (item_id=itemsite_item_id)\n  WHERE ( (shiphead_id = &lt;? value("shiphead_id") ?> )\n    AND ('SO'=shiphead_order_type) )\n  GROUP BY shiphead_number,cohead_number,item_number,invdetail_ls_id,\n    coitem_linenumber,invhist_transtype\n&lt;? if exists("MultiWhs") ?>\nUNION\n  SELECT\n    shiphead_number,\n    (tohead_number || '-' || toitem_linenumber) AS ordernumber,\n    item_number,\n    formatlotserialnumber(invdetail_ls_id) AS invdetail_lotserial,\n    SUM(invdetail_qty) * -1 AS lotqty,\n    SUM(invhist_invqty) as totalshipmentqty,\n    invhist_transtype,\n    formatdate(MAX(invhist_transdate)) AS invhistdate,\n    formatdate(MAX(shipitem_transdate)) AS shiptransdate\n  FROM shiphead\n    JOIN shipitem ON (shipitem_shiphead_id=shiphead_id)\n    JOIN invhist ON (invhist_id=shipitem_invhist_id)\n    JOIN invdetail ON (invdetail_invhist_id=invhist_id)\n    JOIN tohead ON (tohead_id=shiphead_order_id)\n    JOIN toitem ON (toitem_id=shipitem_orderitem_id)\n    JOIN item ON (item_id=toitem_item_id)\n  WHERE ( (shiphead_id = &lt;? value("shiphead_id") ?> )\n    AND ('TO'=shiphead_order_type) )\n  GROUP BY shiphead_number,tohead_number,item_number,invdetail_ls_id,\n    toitem_linenumber,invhist_transtype\n&lt;? endif ?>\n) data\nORDER BY ordernumber;</sql>\n </querysource>\n <rpthead>\n  <height>451</height>\n  <image>\n   <rect>\n    <x>375</x>\n    <y>0</y>\n    <width>425</width>\n    <height>100</height>\n   </rect>\n   <mode>stretch</mode>\n   <data>\n    <query>logo</query>\n    <column>image_data</column>\n   </data>\n  </image>\n  <barcode>\n   <rect>\n    <x>375</x>\n    <y>180</y>\n    <width>307</width>\n    <height>25</height>\n   </rect>\n   <format>3of9</format>\n   <maxlength>20</maxlength>\n   <left/>\n   <narrowBarWidth>0.01</narrowBarWidth>\n   <data>\n    <query>head</query>\n    <column>cohead_custponumber</column>\n   </data>\n  </barcode>\n  <field>\n   <rect>\n    <x>170</x>\n    <y>150</y>\n    <width>170</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>cust_number</column>\n   </data>\n  </field>\n  <barcode>\n   <rect>\n    <x>375</x>\n    <y>120</y>\n    <width>231</width>\n    <height>25</height>\n   </rect>\n   <format>128</format>\n   <maxlength>10</maxlength>\n   <left/>\n   <narrowBarWidth>0.01</narrowBarWidth>\n   <data>\n    <query>head</query>\n    <column>order_barcode</column>\n   </data>\n  </barcode>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>150</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Customer #:</string>\n  </label>\n  <field>\n   <rect>\n    <x>120</x>\n    <y>360</y>\n    <width>250</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>cust_contact</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>180</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Customer P/O #:</string>\n  </label>\n  <field>\n   <rect>\n    <x>170</x>\n    <y>180</y>\n    <width>170</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>cohead_custponumber</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>480</x>\n    <y>260</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>shiptoname</column>\n   </data>\n  </field>\n  <barcode>\n   <rect>\n    <x>375</x>\n    <y>150</y>\n    <width>177</width>\n    <height>25</height>\n   </rect>\n   <format>3of9</format>\n   <maxlength>10</maxlength>\n   <left/>\n   <narrowBarWidth>0.01</narrowBarWidth>\n   <data>\n    <query>head</query>\n    <column>cust_number</column>\n   </data>\n  </barcode>\n  <text>\n   <rect>\n    <x>480</x>\n    <y>280</y>\n    <width>300</width>\n    <height>15</height>\n   </rect>\n   <bottompad>10</bottompad>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>shipping_address</column>\n   </data>\n  </text>\n  <label>\n   <rect>\n    <x>370</x>\n    <y>400</y>\n    <width>80</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Packed</string>\n  </label>\n  <label>\n   <rect>\n    <x>20</x>\n    <y>400</y>\n    <width>200</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Number</string>\n  </label>\n  <field>\n   <rect>\n    <x>10</x>\n    <y>120</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>ordertype</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>170</x>\n    <y>207</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>orderdate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>375</x>\n    <y>260</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Ship To:</string>\n  </label>\n  <field>\n   <rect>\n    <x>170</x>\n    <y>227</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>scheddate</query>\n    <column>scheddate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>30</x>\n    <y>360</y>\n    <width>95</width>\n    <height>25</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <string>Attention:</string>\n  </label>\n  <line>\n   <xstart>0</xstart>\n   <ystart>390</ystart>\n   <xend>797</xend>\n   <yend>390</yend>\n   <weight>0</weight>\n  </line>\n  <label>\n   <rect>\n    <x>380</x>\n    <y>360</y>\n    <width>75</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Terms:</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>260</y>\n    <width>75</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Bill To:</string>\n  </label>\n  <label>\n   <rect>\n    <x>280</x>\n    <y>400</y>\n    <width>80</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Ordered</string>\n  </label>\n  <line>\n   <xstart>0</xstart>\n   <ystart>430</ystart>\n   <xend>797</xend>\n   <yend>430</yend>\n   <weight>0</weight>\n  </line>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>10</y>\n    <width>300</width>\n    <height>50</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>20</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>PACKING List</string>\n  </label>\n  <field>\n   <rect>\n    <x>480</x>\n    <y>227</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>shipvia</column>\n   </data>\n  </field>\n  <text>\n   <rect>\n    <x>90</x>\n    <y>280</y>\n    <width>300</width>\n    <height>15</height>\n   </rect>\n   <bottompad>10</bottompad>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>billing_address</column>\n   </data>\n  </text>\n  <label>\n   <rect>\n    <x>375</x>\n    <y>227</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Ship Via:</string>\n  </label>\n  <field>\n   <rect>\n    <x>90</x>\n    <y>260</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>billtoname</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>90</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Shipment #:</string>\n  </label>\n  <field>\n   <rect>\n    <x>457</x>\n    <y>360</y>\n    <width>320</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>terms_descrip</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>170</x>\n    <y>90</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>shiphead_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>20</x>\n    <y>417</y>\n    <width>200</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>227</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Sched. Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>170</x>\n    <y>120</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>ordernumber</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>207</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Order Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>227</x>\n    <y>400</y>\n    <width>40</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>UOM</string>\n  </label>\n  <label>\n   <rect>\n    <x>457</x>\n    <y>400</y>\n    <width>75</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Verified</string>\n  </label>\n </rpthead>\n <section>\n  <name>detail</name>\n  <group>\n   <name>detail</name>\n   <column>groupby</column>\n   <foot>\n    <height>43</height>\n    <text>\n     <rect>\n      <x>50</x>\n      <y>5</y>\n      <width>625</width>\n      <height>17</height>\n     </rect>\n     <bottompad>14</bottompad>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>head</query>\n      <column>shipcomments</column>\n     </data>\n    </text>\n   </foot>\n  </group>\n  <group>\n   <name>lineitem</name>\n   <column>linenumber</column>\n   <foot>\n    <height>21</height>\n    <line>\n     <xstart>0</xstart>\n     <ystart>0</ystart>\n     <xend>837</xend>\n     <yend>0</yend>\n     <weight>0</weight>\n    </line>\n   </foot>\n  </group>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>81</height>\n   <field>\n    <rect>\n     <x>227</x>\n     <y>0</y>\n     <width>40</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>uom_name</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>610</x>\n     <y>0</y>\n     <width>50</width>\n     <height>17</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_status</column>\n    </data>\n   </field>\n   <label>\n    <rect>\n     <x>20</x>\n     <y>50</y>\n     <width>55</width>\n     <height>17</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <string>Notes:</string>\n   </label>\n   <label>\n    <rect>\n     <x>550</x>\n     <y>0</y>\n     <width>50</width>\n     <height>17</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <string>Status:</string>\n   </label>\n   <field>\n    <rect>\n     <x>280</x>\n     <y>0</y>\n     <width>80</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>ordered</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>20</x>\n     <y>0</y>\n     <width>200</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>11</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_number</column>\n    </data>\n   </field>\n   <text>\n    <rect>\n     <x>90</x>\n     <y>50</y>\n     <width>560</width>\n     <height>17</height>\n    </rect>\n    <bottompad>14</bottompad>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>memo</column>\n    </data>\n   </text>\n   <barcode>\n    <rect>\n     <x>507</x>\n     <y>30</y>\n     <width>280</width>\n     <height>30</height>\n    </rect>\n    <format>128</format>\n    <maxlength>15</maxlength>\n    <right/>\n    <narrowBarWidth>0.01</narrowBarWidth>\n    <data>\n     <query>detail</query>\n     <column>item_barcode</column>\n    </data>\n   </barcode>\n   <field>\n    <rect>\n     <x>20</x>\n     <y>35</y>\n     <width>300</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>11</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_descrip2</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>20</x>\n     <y>20</y>\n     <width>300</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>11</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_descrip1</column>\n    </data>\n   </field>\n   <line>\n    <xstart>470</xstart>\n    <ystart>20</ystart>\n    <xend>520</xend>\n    <yend>20</yend>\n    <weight>1</weight>\n   </line>\n   <field>\n    <rect>\n     <x>370</x>\n     <y>0</y>\n     <width>80</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>atShipping</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <section>\n  <name>lotdetail</name>\n  <group>\n   <name>lotdetail</name>\n   <column>ordernumber</column>\n   <head>\n    <height>48</height>\n    <label>\n     <rect>\n      <x>232</x>\n      <y>20</y>\n      <width>180</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Lot / Serial Number</string>\n    </label>\n    <label>\n     <rect>\n      <x>455</x>\n      <y>20</y>\n      <width>200</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Quantity</string>\n    </label>\n    <line>\n     <xstart>0</xstart>\n     <ystart>40</ystart>\n     <xend>797</xend>\n     <yend>40</yend>\n     <weight>0</weight>\n    </line>\n    <label>\n     <rect>\n      <x>25</x>\n      <y>20</y>\n      <width>200</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Item</string>\n    </label>\n    <label>\n     <rect>\n      <x>25</x>\n      <y>0</y>\n      <width>200</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Lot Detail Information:</string>\n    </label>\n   </head>\n   <foot>\n    <height>13</height>\n    <line>\n     <xstart>0</xstart>\n     <ystart>5</ystart>\n     <xend>797</xend>\n     <yend>5</yend>\n     <weight>0</weight>\n    </line>\n   </foot>\n  </group>\n  <detail>\n   <key>\n    <query>lotdetail</query>\n   </key>\n   <height>23</height>\n   <field>\n    <rect>\n     <x>232</x>\n     <y>5</y>\n     <width>195</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>11</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>lotdetail</query>\n     <column>invdetail_lotserial</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>30</x>\n     <y>5</y>\n     <width>195</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>11</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>lotdetail</query>\n     <column>item_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>457</x>\n     <y>5</y>\n     <width>60</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>11</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>lotdetail</query>\n     <column>lotqty</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>57</height>\n  <label>\n   <rect>\n    <x>25</x>\n    <y>8</y>\n    <width>61</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>Print Date: </string>\n  </label>\n  <field>\n   <rect>\n    <x>90</x>\n    <y>8</y>\n    <width>95</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>735</x>\n    <y>8</y>\n    <width>45</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>695</x>\n    <y>8</y>\n    <width>37</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>Page:</string>\n  </label>\n  <field>\n   <rect>\n    <x>455</x>\n    <y>8</y>\n    <width>80</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>ordernumber</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>365</x>\n    <y>8</y>\n    <width>80</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>ordertype</column>\n   </data>\n  </field>\n </pgfoot>\n <rptfoot>\n  <height>57</height>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>10</y>\n    <width>160</width>\n    <height>35</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Completed By:</string>\n  </label>\n  <label>\n   <rect>\n    <x>417</x>\n    <y>10</y>\n    <width>165</width>\n    <height>30</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Checked By:</string>\n  </label>\n  <line>\n   <xstart>540</xstart>\n   <ystart>40</ystart>\n   <xend>790</xend>\n   <yend>40</yend>\n   <weight>0</weight>\n  </line>\n  <line>\n   <xstart>160</xstart>\n   <ystart>40</ystart>\n   <xend>407</xend>\n   <yend>40</yend>\n   <weight>0</weight>\n  </line>\n </rptfoot>\n</report>\n	Hybrid Packing List - use the shiphead_id if it is passed but use the order id and type if they're passed but not shiphead_id - Shows Lot/Serial	0	2015-10-01 17:14:33.361434
173	PackingListBatchEditList	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Packing List Batch Edit List</title>\n <name>PackingListBatchEditList</name>\n <description></description>\n <grid>\n  <snap/>\n  <show/>\n  <x>0.05</x>\n  <y>0.05</y>\n </grid>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource loadFromDb="true">\n  <name>detail</name>\n  <mqlgroup>packingListBatch</mqlgroup>\n  <mqlname>detail</mqlname>\n </querysource>\n <rpthead>\n  <height>75</height>\n  <label>\n   <rect>\n    <x>600</x>\n    <y>55</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Hold Type</string>\n  </label>\n  <label>\n   <rect>\n    <x>115</x>\n    <y>55</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Shipment #</string>\n  </label>\n  <label>\n   <rect>\n    <x>320</x>\n    <y>55</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Customer Name</string>\n  </label>\n  <label>\n   <rect>\n    <x>295</x>\n    <y>10</y>\n    <width>450</width>\n    <height>38</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Packing List Batch Edit List</string>\n  </label>\n  <label>\n   <rect>\n    <x>220</x>\n    <y>55</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Customer #</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>55</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Order #</string>\n  </label>\n  <label>\n   <rect>\n    <x>675</x>\n    <y>55</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Printed</string>\n  </label>\n  <label>\n   <rect>\n    <x>490</x>\n    <y>55</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Ship Via</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>70</ystart>\n   <xend>745</xend>\n   <yend>70</yend>\n   <weight>2</weight>\n  </line>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>5</height>\n </pghead>\n <pghead>\n  <height>31</height>\n  <label>\n   <rect>\n    <x>675</x>\n    <y>5</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Printed</string>\n  </label>\n  <label>\n   <rect>\n    <x>220</x>\n    <y>5</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Customer #</string>\n  </label>\n  <label>\n   <rect>\n    <x>115</x>\n    <y>5</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Shipment #</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>20</ystart>\n   <xend>745</xend>\n   <yend>20</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>320</x>\n    <y>5</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Customer Name</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>5</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Order #</string>\n  </label>\n  <label>\n   <rect>\n    <x>600</x>\n    <y>5</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Hold Type</string>\n  </label>\n  <label>\n   <rect>\n    <x>490</x>\n    <y>5</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Ship Via</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>15</height>\n   <field>\n    <rect>\n     <x>115</x>\n     <y>0</y>\n     <width>100</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>shipment_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>675</x>\n     <y>0</y>\n     <width>50</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>pack_printed</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>220</x>\n     <y>0</y>\n     <width>100</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>10</x>\n     <y>0</y>\n     <width>100</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>order_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>600</x>\n     <y>0</y>\n     <width>50</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_holdtype</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>320</x>\n     <y>0</y>\n     <width>160</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>name</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>490</x>\n     <y>0</y>\n     <width>100</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>shipvia</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>15</height>\n  <field>\n   <rect>\n    <x>90</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>615</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
156	PartiallyShippedOrders	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Partially Shipped Orders</title>\n <name>PartiallyShippedOrders</name>\n <description></description>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT CASE WHEN (cohead_holdtype IN ('P', 'C', 'R')) THEN -1\n            ELSE cohead_id\n       END AS _coheadid, cohead_id,\n       cohead_holdtype, cohead_number, cust_name,\n       CASE WHEN (cohead_holdtype='N') THEN &lt;? value(&quot;none&quot;) ?>\n            WHEN (cohead_holdtype='C') THEN &lt;? value(&quot;credit&quot;) ?>\n            WHEN (cohead_holdtype='S') THEN &lt;? value(&quot;ship&quot;) ?>\n            WHEN (cohead_holdtype='P') THEN &lt;? value(&quot;pack&quot;) ?>\n            WHEN (cohead_holdtype='R') THEN &lt;? value(&quot;return&quot;) ?>\n            ELSE &lt;? value(&quot;Other&quot;) ?>\n       END AS f_holdtype,\n       formatDate(cohead_orderdate) AS f_orderdate,\n       formatDate(MIN(coitem_scheddate)) AS f_scheddate,\n       formatDate(cohead_packdate) AS f_packdate,\n       &lt;? if exists(&quot;showPrices&quot;) ?>\n         formatExtPrice( SUM( (noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio) *\n                            (coitem_price / coitem_price_invuomratio) ) )\n       &lt;? else ?>\n         text('')\n       &lt;? endif ?>\n       AS f_extprice,\n       SUM( (noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio) *\n            (coitem_price / coitem_price_invuomratio) ) AS backlog,\n       MIN(coitem_scheddate) AS scheddate,\n       COALESCE(MIN(shipitem_id), 0) AS shipped\n  FROM cohead, itemsite, item, custinfo,\n       coitem LEFT OUTER JOIN shipitem ON (shipitem_orderitem_id=coitem_id) \n WHERE ( (coitem_cohead_id=cohead_id)\n   AND (cohead_cust_id=cust_id)\n   AND (coitem_itemsite_id=itemsite_id)\n   AND (itemsite_item_id=item_id)\n   AND (coitem_status='O')\n   AND (cohead_id IN ( SELECT DISTINCT coitem_cohead_id\n                         FROM coitem\n                        WHERE (coitem_qtyshipped > 0) ))\n   AND (coitem_qtyshipped &lt; coitem_qtyord)\n   AND (coitem_scheddate BETWEEN &lt;? value(&quot;startDate&quot;) ?> AND &lt;? value(&quot;endDate&quot;) ?>)\n&lt;? if exists(&quot;warehous_id&quot;) ?>\n   AND (itemsite_warehous_id=&lt;? value(&quot;warehous_id&quot;) ?>)\n&lt;? endif ?>\n)\nGROUP BY cohead_id, cohead_number, cust_name, cohead_holdtype,\n         cohead_orderdate, cohead_packdate\nORDER BY scheddate, cohead_number;</sql>\n </querysource>\n <querysource>\n  <name>head</name>\n  <sql>SELECT &lt;? if exists(&quot;warehous_id&quot;) ?>\n         ( SELECT (warehous_code||'-'||warehous_descrip)\n             FROM whsinfo\n            WHERE (warehous_id=&lt;? value(&quot;warehous_id&quot;) ?>) )\n       &lt;? else ?>\n         text('All Sites')\n       &lt;? endif ?>\n       AS warehouse,\n       &lt;? if exists(&quot;showPrices&quot;) ?>\n         text('$ Amount')\n       &lt;? else ?>\n         text('')\n       &lt;? endif ?>\n       AS f_amount,\n       formatDate(&lt;? value(&quot;startDate&quot;) ?>, 'Earliest') AS startdate,\n       formatDate(&lt;? value(&quot;endDate&quot;) ?>, 'Latest') AS enddate;</sql>\n </querysource>\n <rpthead>\n  <height>205</height>\n  <label>\n   <rect>\n    <x>380</x>\n    <y>95</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>End Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>484</x>\n    <y>75</y>\n    <width>220</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>startdate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>380</x>\n    <y>75</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Start Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>113</x>\n    <y>75</y>\n    <width>220</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>warehouse</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>75</x>\n    <y>185</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Customer</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>75</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Site:</string>\n  </label>\n  <label>\n   <rect>\n    <x>495</x>\n    <y>185</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Scheduled</string>\n  </label>\n  <field>\n   <rect>\n    <x>484</x>\n    <y>95</y>\n    <width>220</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>enddate</column>\n   </data>\n  </field>\n  <line>\n   <xstart>5</xstart>\n   <ystart>200</ystart>\n   <xend>745</xend>\n   <yend>200</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>385</x>\n    <y>5</y>\n    <width>356</width>\n    <height>37</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Partially Shipped Orders</string>\n  </label>\n  <label>\n   <rect>\n    <x>409</x>\n    <y>185</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Ordered</string>\n  </label>\n  <label>\n   <rect>\n    <x>325</x>\n    <y>185</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Hold Type</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>185</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>S/O #</string>\n  </label>\n  <field>\n   <rect>\n    <x>665</x>\n    <y>185</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_amount</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>580</x>\n    <y>185</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Pack Date</string>\n  </label>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>8</height>\n </pghead>\n <pghead>\n  <height>28</height>\n  <label>\n   <rect>\n    <x>325</x>\n    <y>5</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Hold Type</string>\n  </label>\n  <label>\n   <rect>\n    <x>495</x>\n    <y>5</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Scheduled</string>\n  </label>\n  <label>\n   <rect>\n    <x>580</x>\n    <y>5</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Pack Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>409</x>\n    <y>5</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Ordered</string>\n  </label>\n  <field>\n   <rect>\n    <x>665</x>\n    <y>5</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_amount</column>\n   </data>\n  </field>\n  <line>\n   <xstart>5</xstart>\n   <ystart>20</ystart>\n   <xend>745</xend>\n   <yend>20</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>75</x>\n    <y>5</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Customer</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>5</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>S/O #</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>18</height>\n   <field>\n    <rect>\n     <x>580</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_packdate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>409</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_orderdate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>75</x>\n     <y>0</y>\n     <width>250</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>cust_name</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>665</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_extprice</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>325</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_holdtype</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>495</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_scheddate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>5</x>\n     <y>0</y>\n     <width>65</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>cohead_number</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>19</height>\n  <field>\n   <rect>\n    <x>80</x>\n    <y>0</y>\n    <width>140</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>635</x>\n    <y>0</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>715</x>\n    <y>0</y>\n    <width>30</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
53	PendingBOMChanges	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Pending Bill of Material Changes</title>\n <name>PendingBOMChanges</name>\n <description></description>\n <grid>\n  <snap/>\n  <show/>\n  <x>0.05</x>\n  <y>0.05</y>\n </grid>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT item_number,\n       uom_name,\n       item_descrip1,\n       item_descrip2,\n       CASE WHEN (&lt;? value("cutOffDate") ?> >= date('2099-12-31')) THEN text('Latest')\n            ELSE formatDate(&lt;? value("cutOffDate") ?>)\n       END AS cutoffdate\n  FROM item JOIN uom ON (item_inv_uom_id=uom_id)\n WHERE (item_id=&lt;? value("item_id") ?>);\n    </sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT formatDate(bomitem_effective) as actiondate,\n       'Effective' AS action,\n       bomitem_seqnumber, item_number, uom_name,\n       item_descrip1, item_descrip2, uom_name,\n       formatQty(itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, bomitem_qtyfxd)) AS qtyfxd,\n       formatQtyPer(itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, bomitem_qtyper)) AS qtyper,\n       formatScrap(bomitem_scrap) AS scrap,\n       formatQtyPer(itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, (bomitem_qtyfxd + bomitem_qtyper) * (1 + bomitem_scrap))) AS qtyreq,\n       formatDate(bomitem_effective, 'Always') AS effective,\n       formatDate(bomitem_expires, 'Never') AS expires,\n       formatBoolYN(bomitem_createwo) AS createchild,\n       CASE WHEN (bomitem_issuemethod='S') THEN 'Push'\n            WHEN (bomitem_issuemethod='L') THEN 'Pull'\n            WHEN (bomitem_issuemethod='M') THEN 'Mixed'\n            ELSE 'Special'\n       END AS issuemethod\n  FROM bomitem(&lt;? value("item_id") ?>,&lt;? value("revision_id") ?>), item, uom\n WHERE ((bomitem_item_id=item_id)\n   AND (item_inv_uom_id=uom_id)\n   AND (bomitem_effective BETWEEN CURRENT_DATE AND &lt;? value("cutOffDate") ?>)\n)\nUNION\nSELECT formatDate(bomitem_expires) as actiondate,\n       'Expires' AS action,\n       bomitem_seqnumber, item_number, uom_name,\n       item_descrip1, item_descrip2, uom_name,\n       formatQty(itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, bomitem_qtyfxd)) AS qtyfxd,\n       formatQtyPer(itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, bomitem_qtyper)) AS qtyper,\n       formatScrap(bomitem_scrap) AS scrap,\n       formatQtyPer(itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, bomitem_qtyper + (1 * bomitem_scrap))) AS qtyreq,\n       formatDate(bomitem_effective, 'Always') AS effective,\n       formatDate(bomitem_expires, 'Never') AS expires,\n       formatBoolYN(bomitem_createwo) AS createchild,\n       CASE WHEN (bomitem_issuemethod='S') THEN 'Push'\n            WHEN (bomitem_issuemethod='L') THEN 'Pull'\n            WHEN (bomitem_issuemethod='M') THEN 'Mixed'\n            ELSE 'Special'\n       END AS issuemethod\nFROM bomitem(&lt;? value("item_id") ?>,&lt;? value("revision_id") ?>), item, uom\nWHERE ((bomitem_item_id=item_id)\n AND (item_inv_uom_id=uom_id)\n AND (bomitem_expires BETWEEN CURRENT_DATE AND &lt;? value("cutOffDate") ?>)\n)\nORDER BY action, actiondate, bomitem_seqnumber;\n    </sql>\n </querysource>\n <querysource>\n  <name>bomhead</name>\n  <sql>SELECT bomhead_docnum, bomhead_revision, formatDate(bomhead_revisiondate) AS f_revisiondate\nFROM bomhead\nWHERE ((bomhead_item_id=&lt;? value("item_id") ?>)\n  AND  (bomhead_rev_id=&lt;? value("revision_id") ?>));</sql>\n </querysource>\n <rpthead>\n  <height>234</height>\n  <label>\n   <rect>\n    <x>35</x>\n    <y>120</y>\n    <width>80</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Item:</string>\n  </label>\n  <label>\n   <rect>\n    <x>675</x>\n    <y>200</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Qty. Required</string>\n  </label>\n  <field>\n   <rect>\n    <x>120</x>\n    <y>140</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>item_descrip1</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>320</x>\n    <y>10</y>\n    <width>405</width>\n    <height>40</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Pending Bill of Materials Changes</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>229</ystart>\n   <xend>745</xend>\n   <yend>229</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>340</x>\n    <y>55</y>\n    <width>80</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Cutoff Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>475</x>\n    <y>140</y>\n    <width>200</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>bomhead</query>\n    <column>f_revisiondate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>380</x>\n    <y>140</y>\n    <width>90</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Revision Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>430</x>\n    <y>55</y>\n    <width>110</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>cutoffdate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>254</x>\n    <y>215</y>\n    <width>229</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Description</string>\n  </label>\n  <field>\n   <rect>\n    <x>120</x>\n    <y>120</y>\n    <width>200</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>item_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>254</x>\n    <y>200</y>\n    <width>229</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Component Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>600</x>\n    <y>215</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Create W/O</string>\n  </label>\n  <label>\n   <rect>\n    <x>560</x>\n    <y>200</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>UOM</string>\n  </label>\n  <label>\n   <rect>\n    <x>380</x>\n    <y>160</y>\n    <width>90</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Revision:</string>\n  </label>\n  <label>\n   <rect>\n    <x>200</x>\n    <y>200</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Seq. #</string>\n  </label>\n  <field>\n   <rect>\n    <x>475</x>\n    <y>160</y>\n    <width>200</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>bomhead</query>\n    <column>bomhead_revision</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>380</x>\n    <y>120</y>\n    <width>90</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Document #:</string>\n  </label>\n  <field>\n   <rect>\n    <x>120</x>\n    <y>160</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>item_descrip2</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>600</x>\n    <y>200</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Scrap</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>200</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Action</string>\n  </label>\n  <label>\n   <rect>\n    <x>100</x>\n    <y>200</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>484</x>\n    <y>200</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Qty. Per</string>\n  </label>\n  <field>\n   <rect>\n    <x>475</x>\n    <y>120</y>\n    <width>200</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>bomhead</query>\n    <column>bomhead_docnum</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>675</x>\n    <y>215</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Issue Method</string>\n  </label>\n  <label>\n   <rect>\n    <x>485</x>\n    <y>213</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Fxd. Qty.</string>\n  </label>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>36</height>\n  <label>\n   <rect>\n    <x>600</x>\n    <y>15</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Create W/O</string>\n  </label>\n  <label>\n   <rect>\n    <x>100</x>\n    <y>0</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>675</x>\n    <y>0</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Qty. Required</string>\n  </label>\n  <label>\n   <rect>\n    <x>600</x>\n    <y>0</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Scrap</string>\n  </label>\n  <label>\n   <rect>\n    <x>560</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>UOM</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>0</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Action</string>\n  </label>\n  <label>\n   <rect>\n    <x>675</x>\n    <y>15</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Issue Method</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>30</ystart>\n   <xend>745</xend>\n   <yend>30</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>200</x>\n    <y>0</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Seq. #</string>\n  </label>\n  <label>\n   <rect>\n    <x>254</x>\n    <y>0</y>\n    <width>229</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Component Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>484</x>\n    <y>0</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Qty. Per</string>\n  </label>\n  <label>\n   <rect>\n    <x>254</x>\n    <y>15</y>\n    <width>229</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>485</x>\n    <y>14</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Fxd. Qty.</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>53</height>\n   <field>\n    <rect>\n     <x>100</x>\n     <y>0</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>actiondate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>5</x>\n     <y>0</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>action</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>600</x>\n     <y>0</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>scrap</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>600</x>\n     <y>15</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>createchild</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>254</x>\n     <y>30</y>\n     <width>229</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_descrip2</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>675</x>\n     <y>15</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>issuemethod</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>254</x>\n     <y>0</y>\n     <width>229</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>254</x>\n     <y>15</y>\n     <width>229</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_descrip1</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>675</x>\n     <y>0</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>qtyreq</column>\n    </data>\n   </field>\n   <line>\n    <xstart>5</xstart>\n    <ystart>45</ystart>\n    <xend>745</xend>\n    <yend>45</yend>\n    <weight>0</weight>\n   </line>\n   <field>\n    <rect>\n     <x>560</x>\n     <y>0</y>\n     <width>38</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>uom_name</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>484</x>\n     <y>0</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>qtyper</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>204</x>\n     <y>0</y>\n     <width>40</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>bomitem_seqnumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>485</x>\n     <y>14</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>qtyfxd</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>18</height>\n  <field>\n   <rect>\n    <x>95</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>615</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
91	PendingWOMaterialAvailability	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Pending W/O Material Availability</title>\n <name>PendingWOMaterialAvailability</name>\n <description></description>\n <grid>\n  <snap/>\n  <show/>\n  <x>0.05</x>\n  <y>0.05</y>\n </grid>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT item_number, item_descrip1, item_descrip2,\n       &lt;? if exists("warehous_id") ?>\n         ( SELECT warehous_code\n             FROM whsinfo\n            WHERE (warehous_id=&lt;? value("warehous_id") ?>) )\n       &lt;? else ?>\n         text('All Sites')\n       &lt;? endif ?>\n       AS warehouse\n  FROM item\nWHERE (item_id=&lt;? value("item_id") ?>);</sql>\n </querysource>\n <querysource loadFromDb="true">\n  <name>detail</name>\n  <mqlgroup>pendingAvailability</mqlgroup>\n  <mqlname>detail</mqlname>\n </querysource>\n <rpthead>\n  <height>234</height>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>140</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>item_descrip2</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>275</x>\n    <y>10</y>\n    <width>450</width>\n    <height>38</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Pending W/O Material Availability</string>\n  </label>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>160</y>\n    <width>200</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>warehouse</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>30</x>\n    <y>160</y>\n    <width>104</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Site:</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>229</ystart>\n   <xend>745</xend>\n   <yend>229</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>290</x>\n    <y>200</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>UOM</string>\n  </label>\n  <label>\n   <rect>\n    <x>60</x>\n    <y>203</y>\n    <width>35</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Seq. #</string>\n  </label>\n  <label>\n   <rect>\n    <x>110</x>\n    <y>203</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>575</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>QOH</string>\n  </label>\n  <label>\n   <rect>\n    <x>490</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Total Alloc.</string>\n  </label>\n  <label>\n   <rect>\n    <x>660</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Available</string>\n  </label>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>100</y>\n    <width>198</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>item_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>110</x>\n    <y>213</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>30</x>\n    <y>100</y>\n    <width>104</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Item Number:</string>\n  </label>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>120</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>item_descrip1</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>405</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Pend. Alloc.</string>\n  </label>\n  <label>\n   <rect>\n    <x>30</x>\n    <y>120</y>\n    <width>104</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Description:</string>\n  </label>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>203</y>\n    <width>35</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Level</string>\n  </label>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>36</height>\n  <label>\n   <rect>\n    <x>115</x>\n    <y>14</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>405</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Pend. Alloc.</string>\n  </label>\n  <label>\n   <rect>\n    <x>575</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>QOH</string>\n  </label>\n  <label>\n   <rect>\n    <x>660</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Available</string>\n  </label>\n  <label>\n   <rect>\n    <x>65</x>\n    <y>-1</y>\n    <width>35</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Seq. #</string>\n  </label>\n  <label>\n   <rect>\n    <x>290</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>UOM</string>\n  </label>\n  <label>\n   <rect>\n    <x>115</x>\n    <y>-1</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>490</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Total Alloc.</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>30</ystart>\n   <xend>745</xend>\n   <yend>30</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>-1</y>\n    <width>35</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Level</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>41</height>\n   <field>\n    <rect>\n     <x>290</x>\n     <y>0</y>\n     <width>100</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>uom_name</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>405</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>pendalloc</column>\n    </data>\n    <format builtin="true">qty</format>\n   </field>\n   <line>\n    <xstart>6</xstart>\n    <ystart>32</ystart>\n    <xend>745</xend>\n    <yend>32</yend>\n    <weight>0</weight>\n   </line>\n   <field>\n    <rect>\n     <x>110</x>\n     <y>-1</y>\n     <width>150</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>575</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>qoh</column>\n    </data>\n    <format builtin="true">qty</format>\n   </field>\n   <field>\n    <rect>\n     <x>110</x>\n     <y>15</y>\n     <width>615</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_descrip</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>490</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>totalalloc</column>\n    </data>\n    <format builtin="true">qty</format>\n   </field>\n   <field>\n    <rect>\n     <x>660</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>totalavail</column>\n    </data>\n    <format builtin="true">qty</format>\n   </field>\n   <field>\n    <rect>\n     <x>60</x>\n     <y>-1</y>\n     <width>35</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>bomitem_seqnumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>15</x>\n     <y>-1</y>\n     <width>35</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>bomdata_bomwork_level</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>18</height>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>90</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>615</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
81	PickList	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Pick List</title>\n <name>PickList</name>\n <description></description>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>28</bottommargin>\n <rightmargin>0</rightmargin>\n <leftmargin>0</leftmargin>\n <querysource>\n  <name>Head</name>\n  <sql>SELECT formatWoNumber(wo_id) AS wonumber, wo_prodnotes,\n                item_number, uom_name, item_descrip1, item_descrip2,\n                warehous_code, formatQty(wo_qtyord) AS qtyord,\n                formatQty(wo_qtyrcv) AS qtyrcv,\n                formatDate(wo_startdate) AS startdate,\n                formatDate(wo_duedate) AS duedate\n         FROM wo, itemsite, item, whsinfo, uom\n         WHERE ((wo_itemsite_id=itemsite_id)\n          AND (itemsite_item_id=item_id)\n          AND (item_inv_uom_id=uom_id)\n          AND (itemsite_warehous_id=warehous_id)\n          AND (wo_id=&lt;? value("wo_id") ?>))\n    </sql>\n </querysource>\n <querysource>\n  <name>Detail</name>\n  <sql>SELECT item_number,\n       uom_name,\n       item_descrip1,\n       item_descrip2,\n       formatQty(womatl_qtyreq) AS qtyreq,\n       formatQty(womatl_qtyiss) AS qtyiss,\n       formatQty(noNeg(womatl_qtyreq - womatl_qtyiss)) AS qtybalance,\n       itemsite_location,\n       CASE WHEN (womatl_issuemethod='S') THEN text('Push')\n            WHEN (womatl_issuemethod='L') THEN text('Pull')\n            WHEN (womatl_issuemethod='M') THEN text('Mixed')\n            ELSE text(womatl_issuemethod)\n       END AS f_issuemethod\n  FROM womatl, itemsite, item, uom\n WHERE ((item_picklist)\n   AND (womatl_itemsite_id=itemsite_id)\n   AND (itemsite_item_id=item_id)\n   AND (womatl_uom_id=uom_id)\n   AND (womatl_wo_id=&lt;? value("wo_id") ?>) );\n    </sql>\n </querysource>\n <rpthead>\n  <height>246</height>\n  <label>\n   <rect>\n    <x>45</x>\n    <y>225</y>\n    <width>300</width>\n    <height>14</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Description</string>\n  </label>\n  <field>\n   <rect>\n    <x>196</x>\n    <y>140</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>Head</query>\n    <column>qtyord</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>653</x>\n    <y>65</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Head</query>\n    <column>wonumber</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>196</x>\n    <y>102</y>\n    <width>300</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Head</query>\n    <column>item_descrip2</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>494</x>\n    <y>84</y>\n    <width>154</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>653</x>\n    <y>102</y>\n    <width>130</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Head</query>\n    <column>startdate</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>653</x>\n    <y>84</y>\n    <width>130</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>494</x>\n    <y>65</y>\n    <width>154</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Work Order #:</string>\n  </label>\n  <label>\n   <rect>\n    <x>560</x>\n    <y>204</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Qty. To Pick</string>\n  </label>\n  <field>\n   <rect>\n    <x>653</x>\n    <y>121</y>\n    <width>130</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Head</query>\n    <column>duedate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>494</x>\n    <y>121</y>\n    <width>154</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Due Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>196</x>\n    <y>65</y>\n    <width>200</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Head</query>\n    <column>item_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>37</x>\n    <y>121</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Site:</string>\n  </label>\n  <label>\n   <rect>\n    <x>37</x>\n    <y>65</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Item:</string>\n  </label>\n  <label>\n   <rect>\n    <x>37</x>\n    <y>158</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Qty. Received:</string>\n  </label>\n  <label>\n   <rect>\n    <x>578</x>\n    <y>18</y>\n    <width>204</width>\n    <height>40</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>20</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Pick List</string>\n  </label>\n  <label>\n   <rect>\n    <x>681</x>\n    <y>204</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Qty. Picked</string>\n  </label>\n  <label>\n   <rect>\n    <x>215</x>\n    <y>205</y>\n    <width>125</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Location</string>\n  </label>\n  <label>\n   <rect>\n    <x>354</x>\n    <y>204</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Qty. Required</string>\n  </label>\n  <field>\n   <rect>\n    <x>196</x>\n    <y>158</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>Head</query>\n    <column>qtyrcv</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>196</x>\n    <y>84</y>\n    <width>300</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Head</query>\n    <column>item_descrip1</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>195</x>\n    <y>120</y>\n    <width>120</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Head</query>\n    <column>warehous_code</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>455</x>\n    <y>220</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Issue Method</string>\n  </label>\n  <label>\n   <rect>\n    <x>45</x>\n    <y>204</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Number</string>\n  </label>\n  <line>\n   <xstart>10</xstart>\n   <ystart>240</ystart>\n   <xend>822</xend>\n   <yend>240</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>37</x>\n    <y>140</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Qty. Ordered:</string>\n  </label>\n  <label>\n   <rect>\n    <x>457</x>\n    <y>204</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Qty. Issued</string>\n  </label>\n  <label>\n   <rect>\n    <x>355</x>\n    <y>220</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Issue UOM</string>\n  </label>\n  <label>\n   <rect>\n    <x>494</x>\n    <y>102</y>\n    <width>154</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Start Date:</string>\n  </label>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>47</height>\n  <label>\n   <rect>\n    <x>340</x>\n    <y>20</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Issue UOM</string>\n  </label>\n  <label>\n   <rect>\n    <x>30</x>\n    <y>5</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Number</string>\n  </label>\n  <line>\n   <xstart>10</xstart>\n   <ystart>40</ystart>\n   <xend>822</xend>\n   <yend>40</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>215</x>\n    <y>5</y>\n    <width>125</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Location</string>\n  </label>\n  <label>\n   <rect>\n    <x>440</x>\n    <y>20</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Issue Method</string>\n  </label>\n  <label>\n   <rect>\n    <x>665</x>\n    <y>5</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Qty. Picked</string>\n  </label>\n  <label>\n   <rect>\n    <x>440</x>\n    <y>5</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Qty. Issued</string>\n  </label>\n  <label>\n   <rect>\n    <x>340</x>\n    <y>5</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Qty. Required</string>\n  </label>\n  <label>\n   <rect>\n    <x>30</x>\n    <y>25</y>\n    <width>300</width>\n    <height>14</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>545</x>\n    <y>5</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Qty. To Pick</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>Detail</query>\n   </key>\n   <height>61</height>\n   <field>\n    <rect>\n     <x>215</x>\n     <y>0</y>\n     <width>130</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>Detail</query>\n     <column>itemsite_location</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>45</x>\n     <y>0</y>\n     <width>160</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>Detail</query>\n     <column>item_number</column>\n    </data>\n   </field>\n   <line>\n    <xstart>680</xstart>\n    <ystart>30</ystart>\n    <xend>780</xend>\n    <yend>30</yend>\n    <weight>1</weight>\n   </line>\n   <field>\n    <rect>\n     <x>350</x>\n     <y>0</y>\n     <width>100</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>Detail</query>\n     <column>qtyreq</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>457</x>\n     <y>0</y>\n     <width>100</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>Detail</query>\n     <column>qtyiss</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>350</x>\n     <y>20</y>\n     <width>100</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>Detail</query>\n     <column>uom_name</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>46</x>\n     <y>37</y>\n     <width>300</width>\n     <height>14</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>Detail</query>\n     <column>item_descrip2</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>459</x>\n     <y>20</y>\n     <width>100</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>Detail</query>\n     <column>f_issuemethod</column>\n    </data>\n   </field>\n   <line>\n    <xstart>10</xstart>\n    <ystart>55</ystart>\n    <xend>822</xend>\n    <yend>55</yend>\n    <weight>0</weight>\n   </line>\n   <field>\n    <rect>\n     <x>569</x>\n     <y>0</y>\n     <width>100</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>Detail</query>\n     <column>qtybalance</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>45</x>\n     <y>20</y>\n     <width>300</width>\n     <height>14</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>Detail</query>\n     <column>item_descrip1</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <rptfoot>\n  <height>57</height>\n  <label>\n   <rect>\n    <x>46</x>\n    <y>9</y>\n    <width>139</width>\n    <height>22</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>48</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Production Notes:</string>\n  </label>\n  <text>\n   <rect>\n    <x>46</x>\n    <y>28</y>\n    <width>746</width>\n    <height>22</height>\n   </rect>\n   <bottompad>0</bottompad>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>48</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>Head</query>\n    <column>wo_prodnotes</column>\n   </data>\n  </text>\n </rptfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
369	PickListWOShowLocations	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Pick List WO Show Locations</title>\n <name>PickListWOShowLocations</name>\n <description>This WO Pick List Shows All Locations and Lots for Each Requirement</description>\n <parameter default="565" active="true" listtype="static" type="integer" name="wo_id" >\n  <description></description>\n </parameter>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>28</bottommargin>\n <rightmargin>33</rightmargin>\n <leftmargin>33</leftmargin>\n <querysource>\n  <name>Head</name>\n  <sql>SELECT formatWoNumber(wo_id) AS wonumber, wo_prodnotes,\n                item_number, uom_name, item_descrip1, item_descrip2,\n                warehous_code, formatQty(wo_qtyord) AS qtyord,\n                formatQty(wo_qtyrcv) AS qtyrcv,\n                formatDate(wo_startdate) AS startdate,\n                formatDate(wo_duedate) AS duedate\n         FROM wo, itemsite, item, whsinfo, uom\n         WHERE ((wo_itemsite_id=itemsite_id)\n          AND (itemsite_item_id=item_id)\n          AND (item_inv_uom_id=uom_id)\n          AND (itemsite_warehous_id=warehous_id)\n          AND (wo_id=%1))\n    </sql>\n </querysource>\n <querysource>\n  <name>Detail</name>\n  <sql>SELECT\n     warehous_code, \n     wo_number,\n     womatl_id,\n     item_number,\n     item_descrip1,\n     item_descrip2, \n     uom_name,\n--   itemuomtouomratio(item_id,item_inv_uom_id, womatl_uom_id) * womatl_qtyreq AS required_qty,\n     womatl_qtyreq AS required_qty,\n--   formatqty(itemuomtouomratio(item_id,item_inv_uom_id, womatl_uom_id) * womatl_qtyreq) AS required_fmt,\n     formatqty(womatl_qtyreq) AS required_fmt,\n--   itemuomtouomratio(item_id,item_inv_uom_id, womatl_uom_id) * womatl_qtyiss AS issued_qty,\n     womatl_qtyiss AS issued_qty,\n     formatqty(womatl_qtyiss) AS issued_fmt,\n--   (itemuomtouomratio(item_id,item_inv_uom_id, womatl_uom_id) * womatl_qtyreq) - \n               (itemuomtouomratio(item_id,item_inv_uom_id, womatl_uom_id)  * womatl_qtyiss) AS pick_qty,\n     womatl_qtyreq - womatl_qtyiss AS pick_qty,   \n    formatqty(womatl_qtyreq - womatl_qtyiss) AS pick_fmt,\n     CASE WHEN (womatl_issuemethod='S') THEN text('Push')\n            WHEN (womatl_issuemethod='L') THEN text('Pull')\n            WHEN (womatl_issuemethod='M') THEN text('Mixed')\n            ELSE text(womatl_issuemethod)\n     END AS f_issuemethod,\n     location_aisle || '-' || location_rack || '-' || location_bin || '-' || location_name  AS location_name,\n     formatlotserialnumber(itemloc_ls_id),\n--     itemloc_lotserial,\n     itemsite_location_comments AS location_comment,\n     itemloc_qty AS location_qty_qty,\n     itemuomtouomratio(item_id,item_inv_uom_id, womatl_uom_id) * itemloc_qty AS loc_issue_uom_qty,\n     formatqty(itemuomtouomratio(item_id,item_inv_uom_id, womatl_uom_id) * itemloc_qty) AS loc_issue_uom_fmt,\n     CASE WHEN itemloc_expiration = '1970-01-01' THEN text ('N/A')\n          WHEN itemloc_expiration = '2100-01-01' THEN text ('N/A')\n          ELSE CAST(formatdate(itemloc_expiration) AS text)\n     END AS expiration \n\nFROM\n\n     item, uom, whsinfo, womatl, wo, itemsite\n     LEFT OUTER JOIN itemloc  ON (itemloc_itemsite_id = itemsite_id)\n     LEFT OUTER JOIN location ON (itemloc_location_id = location_id)\n\n\nWHERE\n     itemsite_item_id = item_id\n     and \n     itemsite_warehous_id = warehous_id\n     and\n     womatl_uom_id = uom_id\n     and\n     itemsite_id = womatl_itemsite_id\n     and\n     womatl_wo_id = wo_id\n     and\n     wo_id = &lt;? value("wo_id") ?>\nORDER BY wo_number, womatl_id, item_number, itemloc_expiration, location_name;</sql>\n </querysource>\n <rpthead>\n  <height>188</height>\n  <field>\n   <rect>\n    <x>196</x>\n    <y>5</y>\n    <width>150</width>\n    <height>40</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Head</query>\n    <column>wonumber</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>196</x>\n    <y>140</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>Head</query>\n    <column>qtyord</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>489</x>\n    <y>100</y>\n    <width>154</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Start Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>37</x>\n    <y>121</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Site:</string>\n  </label>\n  <field>\n   <rect>\n    <x>195</x>\n    <y>120</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>Head</query>\n    <column>warehous_code</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>37</x>\n    <y>5</y>\n    <width>154</width>\n    <height>40</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Work Order #:</string>\n  </label>\n  <field>\n   <rect>\n    <x>196</x>\n    <y>102</y>\n    <width>300</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Head</query>\n    <column>item_descrip2</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>649</x>\n    <y>100</y>\n    <width>130</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>Head</query>\n    <column>startdate</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>196</x>\n    <y>65</y>\n    <width>200</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Head</query>\n    <column>item_number</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>649</x>\n    <y>120</y>\n    <width>130</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>Head</query>\n    <column>duedate</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>649</x>\n    <y>80</y>\n    <width>130</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>196</x>\n    <y>84</y>\n    <width>300</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Head</query>\n    <column>item_descrip1</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>489</x>\n    <y>120</y>\n    <width>154</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Due Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>196</x>\n    <y>158</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>Head</query>\n    <column>qtyrcv</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>489</x>\n    <y>80</y>\n    <width>154</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>37</x>\n    <y>140</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Qty. Ordered:</string>\n  </label>\n  <label>\n   <rect>\n    <x>37</x>\n    <y>158</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Qty. Received:</string>\n  </label>\n  <label>\n   <rect>\n    <x>575</x>\n    <y>5</y>\n    <width>204</width>\n    <height>40</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>20</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>WO Pick List</string>\n  </label>\n  <label>\n   <rect>\n    <x>37</x>\n    <y>65</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item:</string>\n  </label>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>6</height>\n </pghead>\n <section>\n  <name>detail_group</name>\n  <group>\n   <name>detail_group</name>\n   <column>womatl_id</column>\n   <head>\n    <height>133</height>\n    <field>\n     <rect>\n      <x>208</x>\n      <y>40</y>\n      <width>100</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <data>\n      <query>Detail</query>\n      <column>required_fmt</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>330</x>\n      <y>55</y>\n      <width>100</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <data>\n      <query>Detail</query>\n      <column>f_issuemethod</column>\n     </data>\n    </field>\n    <label>\n     <rect>\n      <x>330</x>\n      <y>15</y>\n      <width>100</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>bold</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <string>Issue Method</string>\n    </label>\n    <label>\n     <rect>\n      <x>330</x>\n      <y>0</y>\n      <width>100</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>bold</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <string>Qty. Issued</string>\n    </label>\n    <label>\n     <rect>\n      <x>465</x>\n      <y>15</y>\n      <width>100</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>bold</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <string>Qty. To Pick</string>\n    </label>\n    <line>\n     <xstart>10</xstart>\n     <ystart>35</ystart>\n     <xend>822</xend>\n     <yend>35</yend>\n     <weight>2</weight>\n    </line>\n    <label>\n     <rect>\n      <x>208</x>\n      <y>0</y>\n      <width>100</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>bold</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <string>Qty. Required</string>\n    </label>\n    <field>\n     <rect>\n      <x>575</x>\n      <y>40</y>\n      <width>45</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>Detail</query>\n      <column>uom_name</column>\n     </data>\n    </field>\n    <label>\n     <rect>\n      <x>660</x>\n      <y>15</y>\n      <width>120</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>bold</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <string>Total Qty. Picked</string>\n    </label>\n    <field>\n     <rect>\n      <x>469</x>\n      <y>75</y>\n      <width>300</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>Detail</query>\n      <column>location_comment</column>\n     </data>\n    </field>\n    <line>\n     <xstart>80</xstart>\n     <ystart>100</ystart>\n     <xend>817</xend>\n     <yend>100</yend>\n     <weight>1</weight>\n    </line>\n    <label>\n     <rect>\n      <x>240</x>\n      <y>100</y>\n      <width>125</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Lot</string>\n    </label>\n    <label>\n     <rect>\n      <x>37</x>\n      <y>0</y>\n      <width>150</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Item Number</string>\n    </label>\n    <field>\n     <rect>\n      <x>469</x>\n      <y>40</y>\n      <width>100</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>bold</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <data>\n      <query>Detail</query>\n      <column>pick_fmt</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>37</x>\n      <y>60</y>\n      <width>195</width>\n      <height>14</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>normal</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>Detail</query>\n      <column>item_descrip1</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>37</x>\n      <y>40</y>\n      <width>160</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>Detail</query>\n      <column>item_number</column>\n     </data>\n    </field>\n    <label>\n     <rect>\n      <x>305</x>\n      <y>75</y>\n      <width>125</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <string>Location Coment;</string>\n    </label>\n    <label>\n     <rect>\n      <x>540</x>\n      <y>104</y>\n      <width>90</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>bold</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <string>Expiration</string>\n    </label>\n    <label>\n     <rect>\n      <x>37</x>\n      <y>15</y>\n      <width>300</width>\n      <height>14</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Item Description</string>\n    </label>\n    <field>\n     <rect>\n      <x>208</x>\n      <y>55</y>\n      <width>100</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <data>\n      <query>Detail</query>\n      <column>uom_name</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>37</x>\n      <y>75</y>\n      <width>300</width>\n      <height>14</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>normal</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>Detail</query>\n      <column>item_descrip2</column>\n     </data>\n    </field>\n    <label>\n     <rect>\n      <x>208</x>\n      <y>15</y>\n      <width>100</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>bold</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <string>Issue UOM</string>\n    </label>\n    <field>\n     <rect>\n      <x>330</x>\n      <y>40</y>\n      <width>100</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <data>\n      <query>Detail</query>\n      <column>issued_fmt</column>\n     </data>\n    </field>\n    <line>\n     <xstart>680</xstart>\n     <ystart>57</ystart>\n     <xend>780</xend>\n     <yend>57</yend>\n     <weight>1</weight>\n    </line>\n    <label>\n     <rect>\n      <x>405</x>\n      <y>104</y>\n      <width>125</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>bold</weight>\n     </font>\n     <hcenter/>\n     <vcenter/>\n     <string>Qty / UOM</string>\n    </label>\n    <label>\n     <rect>\n      <x>645</x>\n      <y>104</y>\n      <width>140</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>bold</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <string>Loc / Lot Qty Picked</string>\n    </label>\n    <label>\n     <rect>\n      <x>80</x>\n      <y>100</y>\n      <width>125</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Location</string>\n    </label>\n   </head>\n   <foot>\n    <height>36</height>\n    <line>\n     <xstart>75</xstart>\n     <ystart>25</ystart>\n     <xend>825</xend>\n     <yend>25</yend>\n     <weight>1</weight>\n    </line>\n    <line>\n     <xstart>75</xstart>\n     <ystart>5</ystart>\n     <xend>822</xend>\n     <yend>5</yend>\n     <weight>1</weight>\n    </line>\n    <field>\n     <rect>\n      <x>465</x>\n      <y>5</y>\n      <width>50</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>Detail</query>\n      <column>uom_name</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>355</x>\n      <y>5</y>\n      <width>100</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <data>\n      <query>Detail</query>\n      <column>loc_issue_uom_qty</column>\n     </data>\n     <tracktotal subtotal="true" builtin="true" >qty</tracktotal>\n    </field>\n    <label>\n     <rect>\n      <x>185</x>\n      <y>5</y>\n      <width>165</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>bold</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <string>Total All Lot/Locations:</string>\n    </label>\n   </foot>\n  </group>\n  <detail>\n   <key>\n    <query>Detail</query>\n   </key>\n   <height>21</height>\n   <field>\n    <rect>\n     <x>75</x>\n     <y>0</y>\n     <width>115</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>Detail</query>\n     <column>location_name</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>555</x>\n     <y>0</y>\n     <width>75</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>Detail</query>\n     <column>expiration</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>465</x>\n     <y>0</y>\n     <width>50</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>Detail</query>\n     <column>uom_name</column>\n    </data>\n   </field>\n   <line>\n    <xstart>690</xstart>\n    <ystart>17</ystart>\n    <xend>790</xend>\n    <yend>17</yend>\n    <weight>1</weight>\n   </line>\n   <field>\n    <rect>\n     <x>215</x>\n     <y>0</y>\n     <width>115</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>Detail</query>\n     <column>formatlotserialnumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>355</x>\n     <y>0</y>\n     <width>100</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>Detail</query>\n     <column>loc_issue_uom_fmt</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <rptfoot>\n  <height>57</height>\n  <text>\n   <rect>\n    <x>110</x>\n    <y>30</y>\n    <width>480</width>\n    <height>22</height>\n   </rect>\n   <bottompad>0</bottompad>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>48</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>Head</query>\n    <column>wo_prodnotes</column>\n   </data>\n  </text>\n  <label>\n   <rect>\n    <x>110</x>\n    <y>10</y>\n    <width>194</width>\n    <height>22</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>48</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Production Notes:</string>\n  </label>\n </rptfoot>\n</report>\n	This WO Pick List Shows All Locations and Lots for Each Requirement	0	2015-10-01 17:14:33.361434
329	PickingListSOClosedLines	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Picking List - SO</title>\n <name>PickingListSOClosedLines</name>\n <description>Shows Closed Lines -- With Barcodes formatitemsitebarcode(itemsite_id) -- SO # barcoded formatsobarcode(cohead_id) -- With Logo, place logo graphic in images DB with name "logo"\n</description>\n <grid>\n  <snap/>\n  <show/>\n  <x>0.05</x>\n  <y>0.05</y>\n </grid>\n <size>Letter</size>\n <portrait/>\n <topmargin>25</topmargin>\n <bottommargin>25</bottommargin>\n <rightmargin>25</rightmargin>\n <leftmargin>25</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT cust_number,\n       formatsobarcode(cohead_id) AS order_barcode,\n       formataddr(cohead_billtoaddress1,\n                  cohead_billtoaddress2,\n                  cohead_billtoaddress3,\n                  (cohead_billtocity || '  ' ||   cohead_billtostate || '  ' || cohead_billtozipcode),\n                  cohead_billtocountry) AS billing_address, \n       formataddr(cohead_shiptoaddress1,\n                  cohead_shiptoaddress2,\n                  cohead_shiptoaddress3,\n                  (cohead_shiptocity || '  ' ||   cohead_shiptostate || '  ' || cohead_shiptozipcode),\n                  cohead_shiptocountry) AS shipping_address,           \n       trim(cntct_first_name || ' ' || cntct_last_name) AS cust_contact,\n       cohead_billtoname,\n       cohead_billtoaddress1,\n       cohead_billtoaddress2,\n       cohead_billtoaddress3,\n       (cohead_billtocity || '  ' || cohead_billtostate || '  ' || cohead_billtozipcode) AS billtocitystatezip,\n       cntct_phone AS cust_phone,\n       cohead_shiptoname,\n       cohead_shiptoaddress1,\n       cohead_shiptoaddress2,\n       cohead_shiptoaddress3,\n       (cohead_shiptocity || '  ' || cohead_shiptostate || ' ' || cohead_shiptozipcode) AS shiptocitystatezip,\n       cohead_number,\n       cohead_shipvia,\n       cohead_shiptophone,\n       cohead_custponumber,\n       formatDate(cohead_orderdate) AS orderdate,\n       formatDate(getSoSchedDate(cohead_id)) AS scheddate,\n       cohead_shipcomments, \n       terms_descrip\n  FROM cohead JOIN custinfo ON (cohead_cust_id=cust_id)\n              JOIN terms ON (cohead_terms_id=terms_id)\n              LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id)\n  WHERE (cohead_id=&lt;? value("sohead_id") ?>);\n  </sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT 1 AS groupby,\n       coitem_linenumber AS sortline,\n       coitem_subnumber AS sortsubline,\n       formatsolinenumber(coitem_id) AS linenumber,\n       coitem_memo,\n       item_number,\n       formatitemsitebarcode(itemsite_id) AS item_barcode,\n       coitemuom.uom_name AS uom_name,\n       itemsellinguom(item_id) AS shipuom,\n       item_descrip1,\n       item_descrip2,\n       formatQty(coitem_qtyord) AS ordered,\n       CASE WHEN (coitem_qtyreserved > 0.0)\n            THEN formatQty(coitem_qtyreserved)\n            ELSE NULL\n       END AS reserved,\n       CASE WHEN ((coitem_qtyshipped - coitem_qtyreturned) > 0.0)\n            THEN formatQty(coitem_qtyshipped - coitem_qtyreturned)\n            ELSE NULL\n       END AS shipped,\n       CASE WHEN (fetchMetricBool('RequireSOReservations'))\n            THEN formatQty(coitem_qtyreserved)\n            ELSE formatQty(noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned - qtyAtShipping('SO', coitem_id)))\n       END AS balance,\n       CASE WHEN (qtyAtShipping('SO', coitem_id) > 0.0)\n            THEN formatQty(qtyAtShipping('SO', coitem_id))\n            ELSE NULL\n       END AS atShipping,\n       getSoitemStatus(coitem_id) AS f_status\n   FROM coitem JOIN itemsite ON (itemsite_id = coitem_itemsite_id)\n               JOIN item ON (item_id = itemsite_item_id)\n               JOIN whsinfo ON (warehous_id = itemsite_warehous_id)\n               JOIN uom invuom ON (invuom.uom_id = item_inv_uom_id)\n               JOIN uom coitemuom ON (coitemuom.uom_id = coitem_qty_uom_id) \n WHERE ( (coitem_cohead_id=&lt;? value("sohead_id") ?>)\n   AND   (coitem_status &lt;> 'X')\n   AND   (coitem_status &lt;> 'C')\n   AND   (item_type != 'K')\n   AND   ( (fetchMetricBool('RequireSOReservations') AND (coitem_qtyreserved > 0.0)) OR\n           (NOT fetchMetricBool('RequireSOReservations')) )\n&lt;? if exists("warehous_id") ?>\n   AND (itemsite_warehous_id=&lt;? value("warehous_id") ?>)\n&lt;? endif ?>\n)\nORDER BY sortline, sortsubline;</sql>\n </querysource>\n <querysource>\n  <name>logo</name>\n  <sql>SELECT image_data \nFROM image \nWHERE ((image_name='logo'));</sql>\n </querysource>\n <querysource>\n  <name>site</name>\n  <sql>&lt;? if exists("warehous_id") ?>\n  SELECT warehous_code AS f_site\n  FROM whsinfo\n  WHERE (warehous_id=&lt;? value("warehous_id") ?>);\n&lt;? else ?>\n  SELECT text('') AS f_site;\n&lt;? endif ?>\n</sql>\n </querysource>\n <rpthead>\n  <height>477</height>\n  <image>\n   <rect>\n    <x>375</x>\n    <y>0</y>\n    <width>425</width>\n    <height>85</height>\n   </rect>\n   <mode>stretch</mode>\n   <data>\n    <query>logo</query>\n    <column>image_data</column>\n   </data>\n  </image>\n  <text>\n   <rect>\n    <x>465</x>\n    <y>280</y>\n    <width>305</width>\n    <height>20</height>\n   </rect>\n   <bottompad>10</bottompad>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>shipping_address</column>\n   </data>\n  </text>\n  <field>\n   <rect>\n    <x>120</x>\n    <y>400</y>\n    <width>252</width>\n    <height>25</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>cust_contact</column>\n   </data>\n  </field>\n  <line>\n   <xstart>25</xstart>\n   <ystart>425</ystart>\n   <xend>822</xend>\n   <yend>425</yend>\n   <weight>0</weight>\n  </line>\n  <field>\n   <rect>\n    <x>170</x>\n    <y>155</y>\n    <width>170</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>cohead_custponumber</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>340</x>\n    <y>425</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Reserved</string>\n  </label>\n  <text>\n   <rect>\n    <x>75</x>\n    <y>280</y>\n    <width>295</width>\n    <height>20</height>\n   </rect>\n   <bottompad>10</bottompad>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>billing_address</column>\n   </data>\n  </text>\n  <label>\n   <rect>\n    <x>650</x>\n    <y>425</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>At Shipping</string>\n  </label>\n  <label>\n   <rect>\n    <x>232</x>\n    <y>425</y>\n    <width>80</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Ordered</string>\n  </label>\n  <barcode>\n   <rect>\n    <x>375</x>\n    <y>95</y>\n    <width>232</width>\n    <height>25</height>\n   </rect>\n   <format>128</format>\n   <maxlength>10</maxlength>\n   <left/>\n   <narrowBarWidth>0.01</narrowBarWidth>\n   <data>\n    <query>head</query>\n    <column>order_barcode</column>\n   </data>\n  </barcode>\n  <label>\n   <rect>\n    <x>440</x>\n    <y>425</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Shipped</string>\n  </label>\n  <label>\n   <rect>\n    <x>70</x>\n    <y>195</y>\n    <width>102</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>S/O Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>465</x>\n    <y>260</y>\n    <width>305</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>cohead_shiptoname</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>745</x>\n    <y>425</y>\n    <width>55</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Packed</string>\n  </label>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>95</y>\n    <width>60</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>S/O #:</string>\n  </label>\n  <field>\n   <rect>\n    <x>432</x>\n    <y>215</y>\n    <width>331</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>cohead_shipvia</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>170</x>\n    <y>125</y>\n    <width>170</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>cust_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>385</x>\n    <y>260</y>\n    <width>75</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Ship To:</string>\n  </label>\n  <field>\n   <rect>\n    <x>75</x>\n    <y>260</y>\n    <width>305</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>cohead_billtoname</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>170</x>\n    <y>95</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>cohead_number</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>175</x>\n    <y>195</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>orderdate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>50</x>\n    <y>215</y>\n    <width>121</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Sched. Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>125</y>\n    <width>122</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Customer #:</string>\n  </label>\n  <label>\n   <rect>\n    <x>545</x>\n    <y>425</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Balance</string>\n  </label>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>155</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Customer P/O #:</string>\n  </label>\n  <line>\n   <xstart>25</xstart>\n   <ystart>465</ystart>\n   <xend>822</xend>\n   <yend>465</yend>\n   <weight>0</weight>\n  </line>\n  <field>\n   <rect>\n    <x>175</x>\n    <y>215</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>scheddate</column>\n   </data>\n  </field>\n  <barcode>\n   <rect>\n    <x>375</x>\n    <y>160</y>\n    <width>307</width>\n    <height>25</height>\n   </rect>\n   <format>3of9</format>\n   <maxlength>20</maxlength>\n   <left/>\n   <narrowBarWidth>0.01</narrowBarWidth>\n   <data>\n    <query>head</query>\n    <column>cohead_custponumber</column>\n   </data>\n  </barcode>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>5</y>\n    <width>330</width>\n    <height>40</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>20</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Picking List (SO)</string>\n  </label>\n  <field>\n   <rect>\n    <x>467</x>\n    <y>400</y>\n    <width>320</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>terms_descrip</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>25</x>\n    <y>400</y>\n    <width>95</width>\n    <height>25</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <string>Attention:</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>260</y>\n    <width>65</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Bill To:</string>\n  </label>\n  <label>\n   <rect>\n    <x>365</x>\n    <y>400</y>\n    <width>75</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Terms:</string>\n  </label>\n  <barcode>\n   <rect>\n    <x>375</x>\n    <y>130</y>\n    <width>177</width>\n    <height>25</height>\n   </rect>\n   <format>3of9</format>\n   <maxlength>10</maxlength>\n   <left/>\n   <narrowBarWidth>0.01</narrowBarWidth>\n   <data>\n    <query>head</query>\n    <column>cust_number</column>\n   </data>\n  </barcode>\n  <label>\n   <rect>\n    <x>25</x>\n    <y>425</y>\n    <width>85</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>25</x>\n    <y>442</y>\n    <width>95</width>\n    <height>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>330</x>\n    <y>215</y>\n    <width>102</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Ship Via:</string>\n  </label>\n  <label>\n   <rect>\n    <x>20</x>\n    <y>65</y>\n    <width>60</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Site:</string>\n  </label>\n  <field>\n   <rect>\n    <x>170</x>\n    <y>65</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>site</query>\n    <column>f_site</column>\n   </data>\n  </field>\n </rpthead>\n <section>\n  <name>detail</name>\n  <group>\n   <name>detail</name>\n   <column>groupby</column>\n   <foot>\n    <height>73</height>\n    <text>\n     <rect>\n      <x>50</x>\n      <y>5</y>\n      <width>625</width>\n      <height>17</height>\n     </rect>\n     <bottompad>14</bottompad>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>head</query>\n      <column>cohead_shipcomments</column>\n     </data>\n    </text>\n   </foot>\n  </group>\n  <group>\n   <name>lineitem</name>\n   <column>linenumber</column>\n   <foot>\n    <height>28</height>\n    <line>\n     <xstart>5</xstart>\n     <ystart>5</ystart>\n     <xend>842</xend>\n     <yend>5</yend>\n     <weight>0</weight>\n    </line>\n   </foot>\n  </group>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>156</height>\n   <label>\n    <rect>\n     <x>565</x>\n     <y>103</y>\n     <width>60</width>\n     <height>17</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <top/>\n    <string>Status:</string>\n   </label>\n   <line>\n    <xstart>415</xstart>\n    <ystart>80</ystart>\n    <xend>500</xend>\n    <yend>80</yend>\n    <weight>0</weight>\n   </line>\n   <line>\n    <xstart>305</xstart>\n    <ystart>110</ystart>\n    <xend>395</xend>\n    <yend>110</yend>\n    <weight>0</weight>\n   </line>\n   <line>\n    <xstart>80</xstart>\n    <ystart>80</ystart>\n    <xend>170</xend>\n    <yend>80</yend>\n    <weight>0</weight>\n   </line>\n   <line>\n    <xstart>745</xstart>\n    <ystart>15</ystart>\n    <xend>795</xend>\n    <yend>15</yend>\n    <weight>1</weight>\n   </line>\n   <field>\n    <rect>\n     <x>25</x>\n     <y>0</y>\n     <width>200</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>11</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_number</column>\n    </data>\n   </field>\n   <text>\n    <rect>\n     <x>100</x>\n     <y>120</y>\n     <width>700</width>\n     <height>17</height>\n    </rect>\n    <bottompad>14</bottompad>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>coitem_memo</column>\n    </data>\n   </text>\n   <line>\n    <xstart>415</xstart>\n    <ystart>110</ystart>\n    <xend>500</xend>\n    <yend>110</yend>\n    <weight>0</weight>\n   </line>\n   <line>\n    <xstart>305</xstart>\n    <ystart>80</ystart>\n    <xend>395</xend>\n    <yend>80</yend>\n    <weight>0</weight>\n   </line>\n   <field>\n    <rect>\n     <x>630</x>\n     <y>103</y>\n     <width>85</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_status</column>\n    </data>\n   </field>\n   <barcode>\n    <rect>\n     <x>365</x>\n     <y>30</y>\n     <width>467</width>\n     <height>35</height>\n    </rect>\n    <format>128</format>\n    <maxlength>15</maxlength>\n    <left/>\n    <narrowBarWidth>0.01</narrowBarWidth>\n    <data>\n     <query>detail</query>\n     <column>item_barcode</column>\n    </data>\n   </barcode>\n   <label>\n    <rect>\n     <x>20</x>\n     <y>120</y>\n     <width>75</width>\n     <height>17</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <string>Notes:</string>\n   </label>\n   <label>\n    <rect>\n     <x>25</x>\n     <y>65</y>\n     <width>47</width>\n     <height>17</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <string>Carton:</string>\n   </label>\n   <line>\n    <xstart>190</xstart>\n    <ystart>80</ystart>\n    <xend>280</xend>\n    <yend>80</yend>\n    <weight>0</weight>\n   </line>\n   <field>\n    <rect>\n     <x>530</x>\n     <y>0</y>\n     <width>100</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>balance</column>\n    </data>\n   </field>\n   <line>\n    <xstart>80</xstart>\n    <ystart>110</ystart>\n    <xend>170</xend>\n    <yend>110</yend>\n    <weight>0</weight>\n   </line>\n   <line>\n    <xstart>632</xstart>\n    <ystart>80</ystart>\n    <xend>720</xend>\n    <yend>80</yend>\n    <weight>0</weight>\n   </line>\n   <label>\n    <rect>\n     <x>25</x>\n     <y>95</y>\n     <width>47</width>\n     <height>17</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <string>Qty:</string>\n   </label>\n   <field>\n    <rect>\n     <x>25</x>\n     <y>40</y>\n     <width>295</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>11</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_descrip2</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>320</x>\n     <y>0</y>\n     <width>100</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>reserved</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>227</x>\n     <y>0</y>\n     <width>85</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>ordered</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>425</x>\n     <y>0</y>\n     <width>100</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>shipped</column>\n    </data>\n   </field>\n   <line>\n    <xstart>190</xstart>\n    <ystart>110</ystart>\n    <xend>280</xend>\n    <yend>110</yend>\n    <weight>0</weight>\n   </line>\n   <field>\n    <rect>\n     <x>25</x>\n     <y>20</y>\n     <width>295</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>11</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_descrip1</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>635</x>\n     <y>0</y>\n     <width>100</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>atshipping</column>\n    </data>\n   </field>\n   <label>\n    <rect>\n     <x>565</x>\n     <y>70</y>\n     <width>60</width>\n     <height>17</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <top/>\n    <string>Batch #:</string>\n   </label>\n   <field>\n    <rect>\n     <x>630</x>\n     <y>88</y>\n     <width>85</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>uom_name</column>\n    </data>\n   </field>\n   <label>\n    <rect>\n     <x>565</x>\n     <y>88</y>\n     <width>60</width>\n     <height>17</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <top/>\n    <string>UOM:</string>\n   </label>\n  </detail>\n </section>\n <pgfoot>\n  <height>57</height>\n  <label>\n   <rect>\n    <x>25</x>\n    <y>5</y>\n    <width>62</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>Print Date: </string>\n  </label>\n  <label>\n   <rect>\n    <x>695</x>\n    <y>5</y>\n    <width>37</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>Page:</string>\n  </label>\n  <field>\n   <rect>\n    <x>735</x>\n    <y>5</y>\n    <width>45</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>90</x>\n    <y>5</y>\n    <width>95</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>360</x>\n    <y>5</y>\n    <width>90</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>Sales Order #:</string>\n  </label>\n  <field>\n   <rect>\n    <x>455</x>\n    <y>5</y>\n    <width>80</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>cohead_number</column>\n   </data>\n  </field>\n </pgfoot>\n <rptfoot>\n  <height>113</height>\n  <label>\n   <rect>\n    <x>40</x>\n    <y>5</y>\n    <width>165</width>\n    <height>30</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Checked By:</string>\n  </label>\n  <line>\n   <xstart>186</xstart>\n   <ystart>90</ystart>\n   <xend>360</xend>\n   <yend>90</yend>\n   <weight>0</weight>\n  </line>\n  <label>\n   <rect>\n    <x>40</x>\n    <y>65</y>\n    <width>160</width>\n    <height>35</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Completed By:</string>\n  </label>\n  <line>\n   <xstart>185</xstart>\n   <ystart>25</ystart>\n   <xend>362</xend>\n   <yend>25</yend>\n   <weight>0</weight>\n  </line>\n </rptfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
368	PickingListSOLocsNoClosedLines	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Picking List SO With Locations</title>\n <name>PickingListSOLocsNoClosedLines</name>\n <description>This report definition shows location / lot / serial information on an SO Pick List.  If the item is not Location Controlled it shows the contents of its Location Comment in the corresponding Item Site record.</description>\n <parameter default="3349" active="true" listtype="static" type="string" name="sohead_id">\n  <description></description>\n </parameter>\n <grid>\n  <snap/>\n  <show/>\n  <x>0.05</x>\n  <y>0.05</y>\n </grid>\n <size>Letter</size>\n <portrait/>\n <topmargin>25</topmargin>\n <bottommargin>25</bottommargin>\n <rightmargin>25</rightmargin>\n <leftmargin>25</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT cust_number,\n       formatsobarcode(cohead_id) AS order_barcode,\n\n       formataddr(cohead_billtoaddress1,\n                  cohead_billtoaddress2,\n                  cohead_billtoaddress3,\n                  (cohead_billtocity || '  ' ||   cohead_billtostate || '  ' || cohead_billtozipcode),\n                  cohead_billtocountry) AS billing_address, \n       formataddr(cohead_shiptoaddress1,\n                  cohead_shiptoaddress2,\n                  cohead_shiptoaddress3,\n                  (cohead_shiptocity || '  ' ||   cohead_shiptostate || '  ' || cohead_shiptozipcode),\n                  cohead_shiptocountry) AS shipping_address,           \n       trim(cntct_first_name || ' ' || cntct_last_name) AS cust_contact,\n       cohead_billtoname,\n       cohead_billtoaddress1,\n       cohead_billtoaddress2,\n       cohead_billtoaddress3,\n       (cohead_billtocity || '  ' || cohead_billtostate || '  ' || cohead_billtozipcode) AS billtocitystatezip,\n       cntct_phone AS cust_phone,\n       cohead_shiptoname,\n       cohead_shiptoaddress1,\n       cohead_shiptoaddress2,\n       cohead_shiptoaddress3,\n       (cohead_shiptocity || '  ' || cohead_shiptostate || ' ' || cohead_shiptozipcode) AS shiptocitystatezip,\n       cohead_number,\n       cohead_shipvia,\n       cohead_shiptophone,\n       cohead_custponumber,\n       formatDate(cohead_orderdate) AS orderdate,\n       formatDate(getSoSchedDate(cohead_id)) AS scheddate,\n       cohead_shipcomments, \n       terms_descrip\n  FROM cohead JOIN custinfo ON (cohead_cust_id=cust_id)\n              LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id)\n              LEFT OUTER JOIN terms ON (cohead_terms_id=terms_id)\n WHERE (cohead_id=&lt;? value("sohead_id") ?>)\n;</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT \n       coitem_linenumber AS sortline,\n       coitem_subnumber AS sortsubline,\n       formatsolinenumber(coitem_id) AS linenumber,\n       coitem_memo,\n       item_number,\n       formatitemsitebarcode(itemsite_id) AS item_barcode,\n       CASE WHEN (formatLocationName(location_id) = 'N/A') THEN itemsite_location_comments || ' ' || '(comment)'\n            ELSE formatLocationName(location_id)\n       END AS location_name,\n       itemsite_location_comments AS location_comment,\n       formatlotserialnumber(itemloc_ls_id),\n       formatDate(itemloc_expiration, 'N/A') AS expiration,\n       itemloc_qty AS location_qty_qty,\n       CASE WHEN fetchMetricBool('EnableSOReservationsByLocation')\n            THEN formatQty(qtyReservedLocation(itemloc_id, 'SO', coitem_id)) \n            ELSE  formatQty(0) \n       END AS location_reserved_qty,\n       itemuomtouomratio(item_id,item_inv_uom_id, coitem_qty_uom_id) * itemloc_qty AS loc_issue_uom_qty,\n       formatqty(itemuomtouomratio(item_id,item_inv_uom_id, coitem_qty_uom_id) * itemloc_qty) AS loc_issue_uom_fmt,\n       coitemuom.uom_name AS uom_name,\n       item_descrip1,\n       item_descrip2,\n       formatQty(coitem_qtyord) AS ordered,\n       CASE WHEN (coitem_qtyreserved > 0.0)\n            THEN formatQty(coitem_qtyreserved)\n            ELSE NULL\n       END AS reserved,\n       CASE WHEN ((coitem_qtyshipped - coitem_qtyreturned) > 0.0)\n            THEN formatQty(coitem_qtyshipped - coitem_qtyreturned)\n            ELSE NULL\n       END AS shipped,\n       CASE WHEN (fetchMetricBool('RequireSOReservations'))\n            THEN formatQty(coitem_qtyreserved)\n            ELSE formatQty(noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned - qtyAtShipping('SO', coitem_id)))\n       END AS balance,\n       CASE WHEN (qtyAtShipping('SO', coitem_id) > 0.0)\n            THEN formatQty(qtyAtShipping('SO', coitem_id))\n            ELSE NULL\n       END AS atShipping,\n       formatQty(roundUp((coitem_qtyord * coitem_qty_invuomratio))) AS shipordered,\n       formatQty(roundUp(((coitem_qtyshipped - coitem_qtyreturned) * coitem_qty_invuomratio))) AS shipshipped,\n       formatQty(roundUp((noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio))) AS shipbalance,\n       getSoitemStatus(coitem_id) AS f_status\n   FROM coitem JOIN cohead ON (cohead_id = coitem_cohead_id)\n               JOIN custinfo ON (cust_id = cohead_cust_id)\n               JOIN itemsite ON (itemsite_id = coitem_itemsite_id)\n               JOIN item ON (item_id = itemsite_item_id)\n               JOIN whsinfo ON (warehous_id = itemsite_warehous_id)\n               JOIN uom invuom ON (invuom.uom_id = item_inv_uom_id)\n               JOIN uom coitemuom ON (coitemuom.uom_id = coitem_qty_uom_id) \n               LEFT OUTER JOIN itemloc  ON (itemloc_itemsite_id = itemsite_id)\n               LEFT OUTER JOIN location ON (itemloc_location_id = location_id)\n WHERE ( (coitem_cohead_id=&lt;? value("sohead_id") ?>)\n   AND   (coitem_status &lt;> 'X')\n   AND   (coitem_status &lt;> 'C')\n   AND   (item_type != 'K')\n   AND   ( (fetchMetricBool('RequireSOReservations') AND (coitem_qtyreserved > 0.0)) OR\n           (NOT fetchMetricBool('RequireSOReservations')) )\n&lt;? if exists("warehous_id") ?>\n   AND (itemsite_warehous_id=&lt;? value("warehous_id") ?>)\n&lt;? endif ?>\n)\nORDER BY sortline, sortsubline, expiration, location_name;</sql>\n </querysource>\n <querysource>\n  <name>logo</name>\n  <sql>SELECT image_data \nFROM image \nWHERE ((image_name='logo'));</sql>\n </querysource>\n <querysource>\n  <name>site</name>\n  <sql>&lt;? if exists("warehous_id") ?>\n  SELECT warehous_code AS f_site\n  FROM whsinfo\n  WHERE (warehous_id=&lt;? value("warehous_id") ?>);\n&lt;? else ?>\n  SELECT text('') AS f_site;\n&lt;? endif ?>\n</sql>\n </querysource>\n <rpthead>\n  <height>467</height>\n  <image>\n   <rect>\n    <x>375</x>\n    <y>5</y>\n    <width>425</width>\n    <height>85</height>\n   </rect>\n   <mode>stretch</mode>\n   <data>\n    <query>logo</query>\n    <column>image_data</column>\n   </data>\n  </image>\n  <field>\n   <rect>\n    <x>170</x>\n    <y>125</y>\n    <width>170</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>cust_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>380</x>\n    <y>400</y>\n    <width>75</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Terms:</string>\n  </label>\n  <label>\n   <rect>\n    <x>385</x>\n    <y>260</y>\n    <width>75</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Ship To:</string>\n  </label>\n  <label>\n   <rect>\n    <x>433</x>\n    <y>444</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Shipped</string>\n  </label>\n  <text>\n   <rect>\n    <x>75</x>\n    <y>280</y>\n    <width>295</width>\n    <height>20</height>\n   </rect>\n   <bottompad>10</bottompad>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>billing_address</column>\n   </data>\n  </text>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>400</y>\n    <width>95</width>\n    <height>25</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <string>Attention:</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>425</ystart>\n   <xend>797</xend>\n   <yend>425</yend>\n   <weight>0</weight>\n  </line>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>400</y>\n    <width>253</width>\n    <height>25</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>cust_contact</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>170</x>\n    <y>200</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>scheddate</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>475</x>\n    <y>400</y>\n    <width>320</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>terms_descrip</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>155</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Customer P/O #:</string>\n  </label>\n  <field>\n   <rect>\n    <x>170</x>\n    <y>220</y>\n    <width>390</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>cohead_shipvia</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>170</x>\n    <y>155</y>\n    <width>170</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>cohead_custponumber</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>233</x>\n    <y>444</y>\n    <width>80</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Ordered</string>\n  </label>\n  <field>\n   <rect>\n    <x>170</x>\n    <y>95</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>cohead_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>125</y>\n    <width>122</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Customer #:</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>95</y>\n    <width>60</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>S/O #:</string>\n  </label>\n  <label>\n   <rect>\n    <x>325</x>\n    <y>444</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Reserved</string>\n  </label>\n  <barcode>\n   <rect>\n    <x>375</x>\n    <y>130</y>\n    <width>177</width>\n    <height>25</height>\n   </rect>\n   <format>3of9</format>\n   <maxlength>10</maxlength>\n   <left/>\n   <narrowBarWidth>0.01</narrowBarWidth>\n   <data>\n    <query>head</query>\n    <column>cust_number</column>\n   </data>\n  </barcode>\n  <barcode>\n   <rect>\n    <x>375</x>\n    <y>95</y>\n    <width>233</width>\n    <height>25</height>\n   </rect>\n   <format>128</format>\n   <maxlength>10</maxlength>\n   <left/>\n   <narrowBarWidth>0.01</narrowBarWidth>\n   <data>\n    <query>head</query>\n    <column>order_barcode</column>\n   </data>\n  </barcode>\n  <field>\n   <rect>\n    <x>170</x>\n    <y>180</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>orderdate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>5</y>\n    <width>330</width>\n    <height>40</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>20</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Sales Order Pick List</string>\n  </label>\n  <field>\n   <rect>\n    <x>465</x>\n    <y>260</y>\n    <width>305</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>cohead_shiptoname</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>220</y>\n    <width>125</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Ship Via:</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>180</y>\n    <width>125</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>S/O Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>535</x>\n    <y>430</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Balance</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>425</y>\n    <width>85</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>444</y>\n    <width>95</width>\n    <height>13</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>730</x>\n    <y>444</y>\n    <width>55</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Packed</string>\n  </label>\n  <label>\n   <rect>\n    <x>630</x>\n    <y>444</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>At Shipping</string>\n  </label>\n  <field>\n   <rect>\n    <x>75</x>\n    <y>260</y>\n    <width>305</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>cohead_billtoname</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>535</x>\n    <y>444</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>To Pick</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>260</y>\n    <width>65</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Bill To:</string>\n  </label>\n  <text>\n   <rect>\n    <x>465</x>\n    <y>280</y>\n    <width>305</width>\n    <height>20</height>\n   </rect>\n   <bottompad>10</bottompad>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>shipping_address</column>\n   </data>\n  </text>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>200</y>\n    <width>125</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Sched. Date:</string>\n  </label>\n  <barcode>\n   <rect>\n    <x>375</x>\n    <y>160</y>\n    <width>307</width>\n    <height>25</height>\n   </rect>\n   <format>3of9</format>\n   <maxlength>20</maxlength>\n   <left/>\n   <narrowBarWidth>0.01</narrowBarWidth>\n   <data>\n    <query>head</query>\n    <column>cohead_custponumber</column>\n   </data>\n  </barcode>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>70</y>\n    <width>60</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Site:</string>\n  </label>\n  <field>\n   <rect>\n    <x>170</x>\n    <y>70</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>site</query>\n    <column>f_site</column>\n   </data>\n  </field>\n </rpthead>\n <section>\n  <name>detail</name>\n  <group>\n   <name>lineitems</name>\n   <column>linenumber</column>\n   <head>\n    <height>132</height>\n    <line>\n     <xstart>5</xstart>\n     <ystart>5</ystart>\n     <xend>797</xend>\n     <yend>5</yend>\n     <weight>2</weight>\n    </line>\n    <label>\n     <rect>\n      <x>630</x>\n      <y>100</y>\n      <width>90</width>\n      <height>17</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>bold</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <string>Expiration</string>\n    </label>\n    <label>\n     <rect>\n      <x>30</x>\n      <y>80</y>\n      <width>48</width>\n      <height>17</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Qty:</string>\n    </label>\n    <field>\n     <rect>\n      <x>30</x>\n      <y>25</y>\n      <width>285</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>11</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>item_descrip1</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>20</x>\n      <y>10</y>\n      <width>200</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>11</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>item_number</column>\n     </data>\n    </field>\n    <label>\n     <rect>\n      <x>415</x>\n      <y>100</y>\n      <width>205</width>\n      <height>17</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>bold</weight>\n     </font>\n     <hcenter/>\n     <vcenter/>\n     <string>QtyAtLocn   QtyReserved   UOM</string>\n    </label>\n    <barcode>\n     <rect>\n      <x>408</x>\n      <y>35</y>\n      <width>380</width>\n      <height>45</height>\n     </rect>\n     <format>128</format>\n     <maxlength>15</maxlength>\n     <left/>\n     <narrowBarWidth>0.01</narrowBarWidth>\n     <data>\n      <query>detail</query>\n      <column>item_barcode</column>\n     </data>\n    </barcode>\n    <label>\n     <rect>\n      <x>80</x>\n      <y>100</y>\n      <width>80</width>\n      <height>17</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Location:</string>\n    </label>\n    <label>\n     <rect>\n      <x>250</x>\n      <y>100</y>\n      <width>145</width>\n      <height>17</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>bold</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <string>Lot / Serial</string>\n    </label>\n    <label>\n     <rect>\n      <x>30</x>\n      <y>60</y>\n      <width>48</width>\n      <height>17</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Carton:</string>\n    </label>\n    <field>\n     <rect>\n      <x>225</x>\n      <y>10</y>\n      <width>85</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>ordered</column>\n     </data>\n    </field>\n    <label>\n     <rect>\n      <x>660</x>\n      <y>100</y>\n      <width>135</width>\n      <height>17</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>bold</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <string>Qty Picked</string>\n    </label>\n    <field>\n     <rect>\n      <x>620</x>\n      <y>10</y>\n      <width>100</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>atshipping</column>\n     </data>\n    </field>\n    <line>\n     <xstart>135</xstart>\n     <ystart>75</ystart>\n     <xend>175</xend>\n     <yend>75</yend>\n     <weight>0</weight>\n    </line>\n    <line>\n     <xstart>75</xstart>\n     <ystart>75</ystart>\n     <xend>112</xend>\n     <yend>75</yend>\n     <weight>0</weight>\n    </line>\n    <label>\n     <rect>\n      <x>320</x>\n      <y>63</y>\n      <width>40</width>\n      <height>17</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Status:</string>\n    </label>\n    <label>\n     <rect>\n      <x>660</x>\n      <y>85</y>\n      <width>135</width>\n      <height>17</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>bold</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <string>Loc / Lot</string>\n    </label>\n    <line>\n     <xstart>75</xstart>\n     <ystart>95</ystart>\n     <xend>112</xend>\n     <yend>95</yend>\n     <weight>0</weight>\n    </line>\n    <line>\n     <xstart>252</xstart>\n     <ystart>75</ystart>\n     <xend>295</xend>\n     <yend>75</yend>\n     <weight>0</weight>\n    </line>\n    <field>\n     <rect>\n      <x>515</x>\n      <y>10</y>\n      <width>100</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>bold</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>balance</column>\n     </data>\n    </field>\n    <line>\n     <xstart>252</xstart>\n     <ystart>95</ystart>\n     <xend>295</xend>\n     <yend>95</yend>\n     <weight>0</weight>\n    </line>\n    <line>\n     <xstart>615</xstart>\n     <ystart>30</ystart>\n     <xend>535</xend>\n     <yend>30</yend>\n     <weight>0</weight>\n    </line>\n    <line>\n     <xstart>135</xstart>\n     <ystart>95</ystart>\n     <xend>175</xend>\n     <yend>95</yend>\n     <weight>0</weight>\n    </line>\n    <field>\n     <rect>\n      <x>415</x>\n      <y>10</y>\n      <width>100</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>shipped</column>\n     </data>\n    </field>\n    <line>\n     <xstart>745</xstart>\n     <ystart>25</ystart>\n     <xend>795</xend>\n     <yend>25</yend>\n     <weight>1</weight>\n    </line>\n    <line>\n     <xstart>195</xstart>\n     <ystart>95</ystart>\n     <xend>235</xend>\n     <yend>95</yend>\n     <weight>0</weight>\n    </line>\n    <field>\n     <rect>\n      <x>365</x>\n      <y>63</y>\n      <width>25</width>\n      <height>17</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>f_status</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>30</x>\n      <y>40</y>\n      <width>285</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>11</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>item_descrip2</column>\n     </data>\n    </field>\n    <line>\n     <xstart>195</xstart>\n     <ystart>75</ystart>\n     <xend>235</xend>\n     <yend>75</yend>\n     <weight>0</weight>\n    </line>\n    <line>\n     <xstart>70</xstart>\n     <ystart>120</ystart>\n     <xend>793</xend>\n     <yend>120</yend>\n     <weight>0</weight>\n    </line>\n    <field>\n     <rect>\n      <x>305</x>\n      <y>10</y>\n      <width>100</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>reserved</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>365</x>\n      <y>43</y>\n      <width>25</width>\n      <height>17</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>uom_name</column>\n     </data>\n    </field>\n    <label>\n     <rect>\n      <x>320</x>\n      <y>43</y>\n      <width>40</width>\n      <height>17</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>UOM:</string>\n    </label>\n   </head>\n   <foot>\n    <height>29</height>\n    <field>\n     <rect>\n      <x>490</x>\n      <y>5</y>\n      <width>50</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>uom_name</column>\n     </data>\n    </field>\n    <label>\n     <rect>\n      <x>80</x>\n      <y>5</y>\n      <width>48</width>\n      <height>17</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Item:</string>\n    </label>\n    <line>\n     <xstart>70</xstart>\n     <ystart>5</ystart>\n     <xend>793</xend>\n     <yend>5</yend>\n     <weight>0</weight>\n    </line>\n    <field>\n     <rect>\n      <x>415</x>\n      <y>5</y>\n      <width>70</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>loc_issue_uom_qty</column>\n     </data>\n     <format builtin="true">qty</format>\n     <tracktotal subtotal="true"/>\n    </field>\n    <field>\n     <rect>\n      <x>110</x>\n      <y>5</y>\n      <width>135</width>\n      <height>17</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>item_number</column>\n     </data>\n    </field>\n    <label>\n     <rect>\n      <x>250</x>\n      <y>5</y>\n      <width>145</width>\n      <height>17</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>bold</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <string>Total, All Lot/Ser/Loc:</string>\n    </label>\n   </foot>\n  </group>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>29</height>\n   <field>\n    <rect>\n     <x>250</x>\n     <y>0</y>\n     <width>145</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>formatlotserialnumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>490</x>\n     <y>0</y>\n     <width>70</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>location_reserved_qty</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>415</x>\n     <y>0</y>\n     <width>70</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>loc_issue_uom_fmt</column>\n    </data>\n   </field>\n   <line>\n    <xstart>745</xstart>\n    <ystart>15</ystart>\n    <xend>795</xend>\n    <yend>15</yend>\n    <weight>1</weight>\n   </line>\n   <field>\n    <rect>\n     <x>80</x>\n     <y>0</y>\n     <width>155</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>location_name</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>565</x>\n     <y>0</y>\n     <width>50</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>uom_name</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>635</x>\n     <y>0</y>\n     <width>85</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>expiration</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>29</height>\n  <label>\n   <rect>\n    <x>330</x>\n    <y>5</y>\n    <width>90</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>Sales Order #:</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>5</y>\n    <width>62</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <string>Print Date: </string>\n  </label>\n  <field>\n   <rect>\n    <x>750</x>\n    <y>5</y>\n    <width>45</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>430</x>\n    <y>5</y>\n    <width>80</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>cohead_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>705</x>\n    <y>5</y>\n    <width>37</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>Page:</string>\n  </label>\n  <field>\n   <rect>\n    <x>70</x>\n    <y>5</y>\n    <width>95</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n </pgfoot>\n <rptfoot>\n  <height>94</height>\n  <line>\n   <xstart>0</xstart>\n   <ystart>0</ystart>\n   <xend>203</xend>\n   <yend>0</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>0</y>\n    <width>160</width>\n    <height>35</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Completed By:</string>\n  </label>\n  <text>\n   <rect>\n    <x>215</x>\n    <y>35</y>\n    <width>580</width>\n    <height>17</height>\n   </rect>\n   <bottompad>14</bottompad>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>cohead_shipcomments</column>\n   </data>\n  </text>\n  <line>\n   <xstart>202</xstart>\n   <ystart>0</ystart>\n   <xend>203</xend>\n   <yend>55</yend>\n   <weight>2</weight>\n  </line>\n  <line>\n   <xstart>155</xstart>\n   <ystart>25</ystart>\n   <xend>195</xend>\n   <yend>25</yend>\n   <weight>0</weight>\n  </line>\n  <label>\n   <rect>\n    <x>215</x>\n    <y>10</y>\n    <width>85</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Order Notes:</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>25</y>\n    <width>165</width>\n    <height>30</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Checked By:</string>\n  </label>\n  <line>\n   <xstart>155</xstart>\n   <ystart>50</ystart>\n   <xend>195</xend>\n   <yend>50</yend>\n   <weight>0</weight>\n  </line>\n  <line>\n   <xstart>0</xstart>\n   <ystart>55</ystart>\n   <xend>203</xend>\n   <yend>55</yend>\n   <weight>2</weight>\n  </line>\n </rptfoot>\n</report>\n	This report definition shows location / lot / serial information on an SO Pick List.  If the item is not Location Controlled it shows the contents of its Location Comment in the corresponding Item Site record.	0	2015-10-01 17:14:33.361434
330	PickingListSONoClosedLines	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Picking List</title>\n <name>PickingListSONoClosedLines</name>\n <description>Omits Closed Lines -- With Barcodes formatitemsitebarcode(itemsite_id) -- SO # barcoded formatsobarcode(cohead_id) -- With Logo, place logo graphic in images DB with name "logo"</description>\n <parameter default="3203" active="true" listtype="static" type="string" name="sohead_id">\n  <description></description>\n </parameter>\n <grid>\n  <snap/>\n  <show/>\n  <x>0.05</x>\n  <y>0.05</y>\n </grid>\n <size>Letter</size>\n <portrait/>\n <topmargin>25</topmargin>\n <bottommargin>25</bottommargin>\n <rightmargin>25</rightmargin>\n <leftmargin>25</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT cust_number,\n       formatsobarcode(cohead_id) AS order_barcode,\n       formataddr(cohead_billtoaddress1,\n                  cohead_billtoaddress2,\n                  cohead_billtoaddress3,\n                  (cohead_billtocity || '  ' ||   cohead_billtostate || '  ' || cohead_billtozipcode),\n                  cohead_billtocountry) AS billing_address, \n       formataddr(cohead_shiptoaddress1,\n                  cohead_shiptoaddress2,\n                  cohead_shiptoaddress3,\n                  (cohead_shiptocity || '  ' ||   cohead_shiptostate || '  ' || cohead_shiptozipcode),\n                  cohead_shiptocountry) AS shipping_address,           \n       trim(cntct_first_name || ' ' || cntct_last_name) AS cust_contact,\n       cohead_billtoname,\n       cohead_billtoaddress1,\n       cohead_billtoaddress2,\n       cohead_billtoaddress3,\n       (cohead_billtocity || '  ' || cohead_billtostate || '  ' || cohead_billtozipcode) AS billtocitystatezip,\n       cntct_phone AS cust_phone,\n       cohead_shiptoname,\n       cohead_shiptoaddress1,\n       cohead_shiptoaddress2,\n       cohead_shiptoaddress3,\n       (cohead_shiptocity || '  ' || cohead_shiptostate || ' ' || cohead_shiptozipcode) AS shiptocitystatezip,\n       cohead_number,\n       cohead_shipvia,\n       cohead_shiptophone,\n       cohead_custponumber,\n       formatDate(cohead_orderdate) AS orderdate,\n       formatDate(getSoSchedDate(cohead_id)) AS scheddate,\n       cohead_shipcomments, \n       terms_descrip\n  FROM cohead JOIN custinfo ON (cohead_cust_id=cust_id)\n              JOIN terms ON (cohead_terms_id=terms_id)\n              LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id)\n              LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id)\n WHERE (cohead_id=&lt;? value("sohead_id") ?>);</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT 1 AS groupby,\n       coitem_linenumber AS sortline,\n       coitem_subnumber AS sortsubline,\n       formatsolinenumber(coitem_id) AS linenumber,\n       coitem_memo,\n       item_number,\n       formatitemsitebarcode(itemsite_id) AS item_barcode,\n       uom_name AS item_invuom,\n       item_descrip1,\n       item_descrip2,\n       formatQty(coitem_qtyord) AS ordered,\n       CASE WHEN (coitem_qtyreserved > 0.0)\n            THEN formatQty(coitem_qtyreserved)\n            ELSE NULL\n       END AS reserved,\n       CASE WHEN ((coitem_qtyshipped - coitem_qtyreturned) > 0.0)\n            THEN formatQty(coitem_qtyshipped - coitem_qtyreturned)\n            ELSE NULL\n       END AS shipped,\n       CASE WHEN (fetchMetricBool('RequireSOReservations'))\n            THEN formatQty(coitem_qtyreserved)\n            ELSE formatQty(noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned - qtyAtShipping('SO', coitem_id)))\n       END AS balance,\n       CASE WHEN (qtyAtShipping('SO', coitem_id) > 0.0)\n            THEN formatQty(qtyAtShipping('SO', coitem_id))\n            ELSE NULL\n       END AS atShipping,\n       getSoitemStatus(coitem_id) AS f_status\n  FROM coitem JOIN uom ON (uom_id=coitem_qty_uom_id)\n              JOIN itemsite ON (itemsite_id=coitem_itemsite_id)\n              JOIN item ON (item_id=itemsite_item_id)\n WHERE ((coitem_cohead_id=&lt;? value("sohead_id") ?>)\n   AND (coitem_status &lt;> 'X')\n   AND (coitem_status &lt;> 'C')\n   AND (item_type != 'K')\n   AND   ( (fetchMetricBool('RequireSOReservations') AND (coitem_qtyreserved > 0.0)) OR\n           (NOT fetchMetricBool('RequireSOReservations')) )\n-- 1 REMOVE THIS AND CLOSED LINES WILL NOT DISPLAY ON PACKING LIST  \n&lt;? if exists("hide closed") ?>\n   AND (coitem_status &lt;> 'C')\n-- 2 REMOVE THIS AND CLOSED LINES WILL NOT DISPLAY ON PACKING LIST  \n&lt;? endif ?>\n&lt;? if exists("warehous_id") ?>\n   AND (itemsite_warehous_id=&lt;? value("warehous_id") ?>)\n&lt;? endif ?>\n)\nORDER BY sortline, sortsubline;</sql>\n </querysource>\n <querysource>\n  <name>logo</name>\n  <sql>SELECT image_data \nFROM image \nWHERE ((image_name='logo'));</sql>\n </querysource>\n <querysource>\n  <name>site</name>\n  <sql>&lt;? if exists("warehous_id") ?>\n  SELECT warehous_code AS f_site\n  FROM whsinfo\n  WHERE (warehous_id=&lt;? value("warehous_id") ?>);\n&lt;? else ?>\n  SELECT text('') AS f_site;\n&lt;? endif ?>\n</sql>\n </querysource>\n <rpthead>\n  <height>477</height>\n  <image>\n   <rect>\n    <x>375</x>\n    <y>0</y>\n    <width>425</width>\n    <height>85</height>\n   </rect>\n   <mode>stretch</mode>\n   <data>\n    <query>logo</query>\n    <column>image_data</column>\n   </data>\n  </image>\n  <field>\n   <rect>\n    <x>120</x>\n    <y>400</y>\n    <width>253</width>\n    <height>25</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>cust_contact</column>\n   </data>\n  </field>\n  <barcode>\n   <rect>\n    <x>375</x>\n    <y>160</y>\n    <width>307</width>\n    <height>25</height>\n   </rect>\n   <format>3of9</format>\n   <maxlength>20</maxlength>\n   <left/>\n   <narrowBarWidth>0.01</narrowBarWidth>\n   <data>\n    <query>head</query>\n    <column>cohead_custponumber</column>\n   </data>\n  </barcode>\n  <label>\n   <rect>\n    <x>650</x>\n    <y>425</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>At Shipping</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>260</y>\n    <width>65</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Bill To:</string>\n  </label>\n  <label>\n   <rect>\n    <x>385</x>\n    <y>260</y>\n    <width>75</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Ship To:</string>\n  </label>\n  <label>\n   <rect>\n    <x>50</x>\n    <y>215</y>\n    <width>121</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Sched. Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>175</x>\n    <y>215</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>scheddate</column>\n   </data>\n  </field>\n  <text>\n   <rect>\n    <x>465</x>\n    <y>280</y>\n    <width>305</width>\n    <height>20</height>\n   </rect>\n   <bottompad>10</bottompad>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>shipping_address</column>\n   </data>\n  </text>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>125</y>\n    <width>122</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Customer #:</string>\n  </label>\n  <label>\n   <rect>\n    <x>340</x>\n    <y>425</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Reserved</string>\n  </label>\n  <field>\n   <rect>\n    <x>170</x>\n    <y>125</y>\n    <width>170</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>cust_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>5</y>\n    <width>270</width>\n    <height>40</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>20</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Picking List (SO)</string>\n  </label>\n  <field>\n   <rect>\n    <x>433</x>\n    <y>215</y>\n    <width>331</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>cohead_shipvia</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>253</x>\n    <y>425</y>\n    <width>55</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Ordered</string>\n  </label>\n  <field>\n   <rect>\n    <x>468</x>\n    <y>400</y>\n    <width>320</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>terms_descrip</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>170</x>\n    <y>155</y>\n    <width>170</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>cohead_custponumber</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>330</x>\n    <y>215</y>\n    <width>102</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Ship Via:</string>\n  </label>\n  <text>\n   <rect>\n    <x>75</x>\n    <y>280</y>\n    <width>295</width>\n    <height>20</height>\n   </rect>\n   <bottompad>10</bottompad>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>billing_address</column>\n   </data>\n  </text>\n  <label>\n   <rect>\n    <x>365</x>\n    <y>400</y>\n    <width>75</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Terms:</string>\n  </label>\n  <barcode>\n   <rect>\n    <x>375</x>\n    <y>95</y>\n    <width>233</width>\n    <height>25</height>\n   </rect>\n   <format>128</format>\n   <maxlength>10</maxlength>\n   <left/>\n   <narrowBarWidth>0.01</narrowBarWidth>\n   <data>\n    <query>head</query>\n    <column>order_barcode</column>\n   </data>\n  </barcode>\n  <field>\n   <rect>\n    <x>175</x>\n    <y>195</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>orderdate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>25</x>\n    <y>400</y>\n    <width>95</width>\n    <height>25</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <string>Attention:</string>\n  </label>\n  <label>\n   <rect>\n    <x>440</x>\n    <y>425</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Shipped</string>\n  </label>\n  <field>\n   <rect>\n    <x>170</x>\n    <y>95</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>cohead_number</column>\n   </data>\n  </field>\n  <line>\n   <xstart>25</xstart>\n   <ystart>465</ystart>\n   <xend>823</xend>\n   <yend>465</yend>\n   <weight>0</weight>\n  </line>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>95</y>\n    <width>60</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>S/O #:</string>\n  </label>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>155</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Customer P/O #:</string>\n  </label>\n  <line>\n   <xstart>25</xstart>\n   <ystart>425</ystart>\n   <xend>823</xend>\n   <yend>425</yend>\n   <weight>0</weight>\n  </line>\n  <field>\n   <rect>\n    <x>465</x>\n    <y>260</y>\n    <width>305</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>cohead_shiptoname</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>25</x>\n    <y>443</y>\n    <width>95</width>\n    <height>13</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Description</string>\n  </label>\n  <barcode>\n   <rect>\n    <x>375</x>\n    <y>130</y>\n    <width>177</width>\n    <height>25</height>\n   </rect>\n   <format>3of9</format>\n   <maxlength>10</maxlength>\n   <left/>\n   <narrowBarWidth>0.01</narrowBarWidth>\n   <data>\n    <query>head</query>\n    <column>cust_number</column>\n   </data>\n  </barcode>\n  <label>\n   <rect>\n    <x>745</x>\n    <y>425</y>\n    <width>55</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Packed</string>\n  </label>\n  <label>\n   <rect>\n    <x>25</x>\n    <y>425</y>\n    <width>85</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>545</x>\n    <y>425</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Balance</string>\n  </label>\n  <field>\n   <rect>\n    <x>75</x>\n    <y>260</y>\n    <width>305</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>cohead_billtoname</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>70</x>\n    <y>195</y>\n    <width>102</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>S/O Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>65</y>\n    <width>122</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Site:</string>\n  </label>\n  <field>\n   <rect>\n    <x>170</x>\n    <y>65</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>site</query>\n    <column>f_site</column>\n   </data>\n  </field>\n </rpthead>\n <section>\n  <name>detail</name>\n  <group>\n   <name>detail</name>\n   <column>groupby</column>\n   <foot>\n    <height>68</height>\n    <text>\n     <rect>\n      <x>50</x>\n      <y>5</y>\n      <width>625</width>\n      <height>17</height>\n     </rect>\n     <bottompad>14</bottompad>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>head</query>\n      <column>cohead_shipcomments</column>\n     </data>\n    </text>\n   </foot>\n  </group>\n  <group>\n   <name>lineitem</name>\n   <column>linenumber</column>\n   <foot>\n    <height>23</height>\n    <line>\n     <xstart>5</xstart>\n     <ystart>5</ystart>\n     <xend>843</xend>\n     <yend>5</yend>\n     <weight>0</weight>\n    </line>\n   </foot>\n  </group>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>148</height>\n   <label>\n    <rect>\n     <x>25</x>\n     <y>65</y>\n     <width>48</width>\n     <height>17</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <string>Carton:</string>\n   </label>\n   <field>\n    <rect>\n     <x>630</x>\n     <y>98</y>\n     <width>85</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_status</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>25</x>\n     <y>40</y>\n     <width>295</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>11</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_descrip2</column>\n    </data>\n   </field>\n   <line>\n    <xstart>190</xstart>\n    <ystart>110</ystart>\n    <xend>280</xend>\n    <yend>110</yend>\n    <weight>0</weight>\n   </line>\n   <field>\n    <rect>\n     <x>635</x>\n     <y>0</y>\n     <width>100</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>atshipping</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>25</x>\n     <y>20</y>\n     <width>295</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>11</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_descrip1</column>\n    </data>\n   </field>\n   <label>\n    <rect>\n     <x>565</x>\n     <y>98</y>\n     <width>60</width>\n     <height>17</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <top/>\n    <string>Status:</string>\n   </label>\n   <text>\n    <rect>\n     <x>100</x>\n     <y>120</y>\n     <width>690</width>\n     <height>17</height>\n    </rect>\n    <bottompad>14</bottompad>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>coitem_memo</column>\n    </data>\n   </text>\n   <line>\n    <xstart>415</xstart>\n    <ystart>110</ystart>\n    <xend>500</xend>\n    <yend>110</yend>\n    <weight>0</weight>\n   </line>\n   <label>\n    <rect>\n     <x>565</x>\n     <y>70</y>\n     <width>60</width>\n     <height>17</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <top/>\n    <string>Batch #:</string>\n   </label>\n   <label>\n    <rect>\n     <x>20</x>\n     <y>120</y>\n     <width>75</width>\n     <height>17</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <string>Notes:</string>\n   </label>\n   <line>\n    <xstart>415</xstart>\n    <ystart>80</ystart>\n    <xend>500</xend>\n    <yend>80</yend>\n    <weight>0</weight>\n   </line>\n   <line>\n    <xstart>80</xstart>\n    <ystart>110</ystart>\n    <xend>170</xend>\n    <yend>110</yend>\n    <weight>0</weight>\n   </line>\n   <line>\n    <xstart>190</xstart>\n    <ystart>80</ystart>\n    <xend>280</xend>\n    <yend>80</yend>\n    <weight>0</weight>\n   </line>\n   <field>\n    <rect>\n     <x>530</x>\n     <y>0</y>\n     <width>100</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>balance</column>\n    </data>\n   </field>\n   <line>\n    <xstart>305</xstart>\n    <ystart>110</ystart>\n    <xend>395</xend>\n    <yend>110</yend>\n    <weight>0</weight>\n   </line>\n   <line>\n    <xstart>305</xstart>\n    <ystart>80</ystart>\n    <xend>395</xend>\n    <yend>80</yend>\n    <weight>0</weight>\n   </line>\n   <field>\n    <rect>\n     <x>25</x>\n     <y>0</y>\n     <width>200</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>11</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_number</column>\n    </data>\n   </field>\n   <label>\n    <rect>\n     <x>25</x>\n     <y>95</y>\n     <width>48</width>\n     <height>17</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <string>Qty:</string>\n   </label>\n   <field>\n    <rect>\n     <x>425</x>\n     <y>0</y>\n     <width>100</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>shipped</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>228</x>\n     <y>0</y>\n     <width>85</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>ordered</column>\n    </data>\n   </field>\n   <line>\n    <xstart>745</xstart>\n    <ystart>15</ystart>\n    <xend>795</xend>\n    <yend>15</yend>\n    <weight>1</weight>\n   </line>\n   <line>\n    <xstart>80</xstart>\n    <ystart>80</ystart>\n    <xend>170</xend>\n    <yend>80</yend>\n    <weight>0</weight>\n   </line>\n   <barcode>\n    <rect>\n     <x>325</x>\n     <y>23</y>\n     <width>468</width>\n     <height>35</height>\n    </rect>\n    <format>128</format>\n    <maxlength>15</maxlength>\n    <left/>\n    <narrowBarWidth>0.01</narrowBarWidth>\n    <data>\n     <query>detail</query>\n     <column>item_barcode</column>\n    </data>\n   </barcode>\n   <line>\n    <xstart>632</xstart>\n    <ystart>80</ystart>\n    <xend>720</xend>\n    <yend>80</yend>\n    <weight>0</weight>\n   </line>\n   <field>\n    <rect>\n     <x>320</x>\n     <y>0</y>\n     <width>100</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>reserved</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>630</x>\n     <y>83</y>\n     <width>85</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_invuom</column>\n    </data>\n   </field>\n   <label>\n    <rect>\n     <x>565</x>\n     <y>83</y>\n     <width>60</width>\n     <height>17</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <top/>\n    <string>UOM:</string>\n   </label>\n  </detail>\n </section>\n <pgfoot>\n  <height>56</height>\n  <label>\n   <rect>\n    <x>695</x>\n    <y>5</y>\n    <width>37</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>Page:</string>\n  </label>\n  <field>\n   <rect>\n    <x>455</x>\n    <y>5</y>\n    <width>80</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>head</query>\n    <column>cohead_number</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>90</x>\n    <y>5</y>\n    <width>95</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>735</x>\n    <y>5</y>\n    <width>45</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>360</x>\n    <y>5</y>\n    <width>90</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>Sales Order #:</string>\n  </label>\n  <label>\n   <rect>\n    <x>25</x>\n    <y>5</y>\n    <width>62</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>Print Date: </string>\n  </label>\n </pgfoot>\n <rptfoot>\n  <height>111</height>\n  <line>\n   <xstart>185</xstart>\n   <ystart>25</ystart>\n   <xend>363</xend>\n   <yend>25</yend>\n   <weight>0</weight>\n  </line>\n  <label>\n   <rect>\n    <x>40</x>\n    <y>65</y>\n    <width>160</width>\n    <height>35</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Completed By:</string>\n  </label>\n  <line>\n   <xstart>186</xstart>\n   <ystart>90</ystart>\n   <xend>360</xend>\n   <yend>90</yend>\n   <weight>0</weight>\n  </line>\n  <label>\n   <rect>\n    <x>40</x>\n    <y>5</y>\n    <width>165</width>\n    <height>30</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Checked By:</string>\n  </label>\n </rptfoot>\n</report>\n	Omits Closed Lines -- With Barcodes formatitemsitebarcode(itemsite_id) -- SO # barcoded formatsobarcode(cohead_id) -- With Logo, place logo graphic in images DB with name "logo"	0	2015-10-01 17:14:33.361434
141	PlannerCodeMasterList	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Planner Code Master List</title>\n <name>PlannerCodeMasterList</name>\n <description></description>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT plancode_id,\n       plancode_code,  \n       plancode_name\n  FROM plancode\nORDER BY plancode_code;</sql>\n </querysource>\n <rpthead>\n  <height>76</height>\n  <label>\n   <rect>\n    <x>175</x>\n    <y>55</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>55</y>\n    <width>95</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Code</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>70</ystart>\n   <xend>745</xend>\n   <yend>70</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>295</x>\n    <y>10</y>\n    <width>450</width>\n    <height>38</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Planner Code Master List</string>\n  </label>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>21</height>\n  <line>\n   <xstart>5</xstart>\n   <ystart>15</ystart>\n   <xend>745</xend>\n   <yend>15</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>0</y>\n    <width>95</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Code</string>\n  </label>\n  <label>\n   <rect>\n    <x>175</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Description</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>16</height>\n   <field>\n    <rect>\n     <x>175</x>\n     <y>0</y>\n     <width>565</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>plancode_name</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>10</x>\n     <y>0</y>\n     <width>150</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>plancode_code</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>16</height>\n  <label>\n   <rect>\n    <x>615</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n  <field>\n   <rect>\n    <x>90</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
68	PricesByCustomer	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Prices By Customer</title>\n <name>PricesByCustomer</name>\n <description></description>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT cust_name,\n       addr_line1 AS cust_address1,\n       addr_line2 AS cust_address2,\n       addr_line3 AS cust_address3,\n       &lt;? if exists("showExpired") ?>\n         text('Yes')\n       &lt;? else ?>\n         text('No')\n       &lt;? endif ?>\n       AS f_showexpired,\n       &lt;? if exists("showFuture") ?>\n         text('Yes')\n       &lt;? else ?>\n         text('No')\n       &lt;? endif ?>\n       AS f_showfuture,\n       &lt;? if exists("showCosts") ?>\n         &lt;? if exists("actualCosts") ?>\n           text('Show Costs and Margins using Actual Costs')\n         &lt;? else ?>\n           text('Show Costs and Margins using Standard Costs')\n         &lt;? endif ?>\n         AS f_showcosts,\n         text('Cost') AS f_costlabel,\n         text('Margin') AS f_marginlabel\n       &lt;? else ?>\n         text('') AS f_showcosts,\n         text('') AS f_costlabel,\n         text('') AS f_marginlabel\n       &lt;? endif ?>\n   FROM custinfo\n   LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id)\n   LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id)\nWHERE (cust_id=&lt;? value("cust_id") ?>);\n</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT itemid, sourcetype, schedulename, type, itemnumber,\n       item_descrip1, item_descrip2,\n       CASE WHEN (qtybreak = -1) THEN 'N/A'\n            ELSE formatQty(qtybreak)\n       END AS f_qtybreak,\n       price, formatPrice(price) AS f_price,\n       &lt;? if exists("showCosts") ?>\n         cost AS cost,\n         formatCost(cost) AS f_cost,\n         CASE WHEN ((price = 0) OR (cost = 0)) THEN 'N/A'\n              ELSE formatScrap((price - cost) / price)\n         END AS f_margin\n       &lt;? else ?>\n         0 AS cost,\n         text('') AS f_cost,\n         text('') AS f_margin\n       &lt;? endif ?>\nFROM (\n  SELECT ipsprice_id AS itemid, 1 AS sourcetype,\n         ipshead_name AS schedulename, 'Customer' AS type,\n         item_number AS itemnumber, item_descrip1, item_descrip2,\n         ipsprice_qtybreak AS qtybreak, ipsprice_price AS price,\n         &lt;? if exists("actualCosts") ?>\n           (actcost(item_id) * iteminvpricerat(item_id))\n         &lt;? else ?>\n           (stdcost(item_id) * iteminvpricerat(item_id))\n         &lt;? endif ?>\n         AS cost\n    FROM ipsass, ipshead, ipsprice, item\n   WHERE ((ipsass_ipshead_id=ipshead_id)\n     AND (ipsprice_ipshead_id=ipshead_id)\n     AND (ipsprice_item_id=item_id)\n     AND (ipsass_cust_id=&lt;? value("cust_id") ?>)\n&lt;? if not exists("showExpired") ?>\n     AND (ipshead_expires > CURRENT_DATE)\n&lt;? endif ?>\n&lt;? if not exists("showFuture") ?>\n     AND (ipshead_effective &lt;= CURRENT_DATE)\n&lt;? endif ?>\n  )\n\n  UNION\n  SELECT ipsprice_id AS itemid, 2 AS sourcetype,\n         ipshead_name AS schedulename, 'Cust. Type' AS type,\n         item_number AS itemnumber, item_descrip1, item_descrip2,\n         ipsprice_qtybreak AS qtybreak, ipsprice_price AS price,\n         &lt;? if exists("actualCosts") ?>\n           (actcost(item_id) * iteminvpricerat(item_id))\n         &lt;? else ?>\n           (stdcost(item_id) * iteminvpricerat(item_id))\n         &lt;? endif ?>\n         AS cost\n    FROM ipsass, ipshead, ipsprice, item, custinfo\n   WHERE ((ipsass_ipshead_id=ipshead_id)\n     AND (ipsprice_ipshead_id=ipshead_id)\n     AND (ipsprice_item_id=item_id)\n     AND (ipsass_custtype_id=cust_custtype_id)\n     AND (cust_id=&lt;? value("cust_id") ?>)\n&lt;? if not exists("showExpired") ?>\n     AND (ipshead_expires > CURRENT_DATE)\n&lt;? endif ?>\n&lt;? if not exists("showFuture") ?>\n     AND (ipshead_effective &lt;= CURRENT_DATE)\n&lt;? endif ?>\n  )\n\n  UNION\n  SELECT ipsprice_id AS itemid, 3 AS sourcetype,\n         ipshead_name AS schedulename, ('Sale' || '-' || sale_name) AS type,\n         item_number AS itemnumber, item_descrip1, item_descrip2,\n         ipsprice_qtybreak AS qtybreak, ipsprice_price AS price,\n         &lt;? if exists("actualCosts") ?>\n           (actcost(item_id) * iteminvpricerat(item_id))\n         &lt;? else ?>\n           (stdcost(item_id) * iteminvpricerat(item_id))\n         &lt;? endif ?>\n         AS cost\n    FROM sale, ipshead, ipsprice, item\n   WHERE ((sale_ipshead_id=ipshead_id)\n     AND (ipsprice_ipshead_id=ipshead_id)\n     AND (ipsprice_item_id=item_id)\n&lt;? if not exists("showExpired") ?>\n     AND (sale_enddate > CURRENT_DATE)\n&lt;? endif ?>\n&lt;? if not exists("showFuture") ?>\n     AND (sale_startdate &lt;= CURRENT_DATE)\n&lt;? endif ?>\n  )\n\n  UNION\n  SELECT item_id AS itemid, 0 AS sourcetype,\n         '' AS schedulename, 'List Price' AS type,\n         item_number AS itemnumber, item_descrip1, item_descrip2,\n         -1 AS qtybreak, (item_listprice - (item_listprice * cust_discntprcnt)) AS price,\n         &lt;? if exists("actualCosts") ?>\n           (actcost(item_id) * iteminvpricerat(item_id))\n         &lt;? else ?>\n           (stdcost(item_id) * iteminvpricerat(item_id))\n         &lt;? endif ?>\n         AS cost\n    FROM item, custinfo\n   WHERE ( (item_sold)\n     AND (item_active)\n     AND (cust_id=&lt;? value("cust_id") ?>)\n     AND (NOT item_exclusive) )\n) AS data\nORDER BY itemnumber, price;</sql>\n </querysource>\n <rpthead>\n  <height>236</height>\n  <label>\n   <rect>\n    <x>405</x>\n    <y>120</y>\n    <width>155</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Show Future Prices:</string>\n  </label>\n  <label>\n   <rect>\n    <x>405</x>\n    <y>100</y>\n    <width>155</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Show Expired Prices:</string>\n  </label>\n  <field>\n   <rect>\n    <x>565</x>\n    <y>120</y>\n    <width>114</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_showfuture</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>80</y>\n    <width>605</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>cust_name</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>665</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_marginlabel</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>585</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_costlabel</column>\n   </data>\n  </field>\n  <line>\n   <xstart>5</xstart>\n   <ystart>229</ystart>\n   <xend>745</xend>\n   <yend>229</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>320</x>\n    <y>200</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Source</string>\n  </label>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>140</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>cust_address3</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>200</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Number</string>\n  </label>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>100</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>cust_address1</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>405</x>\n    <y>140</y>\n    <width>335</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_showcosts</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>195</x>\n    <y>200</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Schedule</string>\n  </label>\n  <field>\n   <rect>\n    <x>565</x>\n    <y>100</y>\n    <width>114</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_showexpired</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>425</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Qty. Break</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>215</y>\n    <width>155</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>80</y>\n    <width>80</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Customer:</string>\n  </label>\n  <label>\n   <rect>\n    <x>375</x>\n    <y>10</y>\n    <width>350</width>\n    <height>38</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Prices by Customer</string>\n  </label>\n  <label>\n   <rect>\n    <x>505</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Price</string>\n  </label>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>120</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>cust_address2</column>\n   </data>\n  </field>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>41</height>\n  <field>\n   <rect>\n    <x>665</x>\n    <y>5</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_marginlabel</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>195</x>\n    <y>5</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Schedule</string>\n  </label>\n  <label>\n   <rect>\n    <x>425</x>\n    <y>5</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Qty. Break</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>35</ystart>\n   <xend>745</xend>\n   <yend>35</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>20</y>\n    <width>155</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>505</x>\n    <y>5</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Price</string>\n  </label>\n  <field>\n   <rect>\n    <x>585</x>\n    <y>5</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_costlabel</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>320</x>\n    <y>5</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Source</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>5</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Number</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>56</height>\n   <field>\n    <rect>\n     <x>10</x>\n     <y>30</y>\n     <width>240</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_descrip2</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>10</x>\n     <y>0</y>\n     <width>150</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>itemnumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>425</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_qtybreak</column>\n    </data>\n   </field>\n   <line>\n    <xstart>5</xstart>\n    <ystart>50</ystart>\n    <xend>745</xend>\n    <yend>50</yend>\n    <weight>0</weight>\n   </line>\n   <field>\n    <rect>\n     <x>585</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_cost</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>195</x>\n     <y>0</y>\n     <width>120</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>schedulename</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>505</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_price</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>10</x>\n     <y>15</y>\n     <width>240</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_descrip1</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>665</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_margin</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>320</x>\n     <y>0</y>\n     <width>100</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>type</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>16</height>\n  <field>\n   <rect>\n    <x>90</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>615</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
69	PricesByCustomerType	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Prices By Customer Type</title>\n <name>PricesByCustomerType</name>\n <description></description>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT (custtype_code || '-' || custtype_descrip) as custtype,\n       &lt;? if exists("showExpired") ?>\n         text('Yes')\n       &lt;? else ?>\n         text('No')\n       &lt;? endif ?>\n       AS f_showexpired,\n       &lt;? if exists("showFuture") ?>\n         text('Yes')\n       &lt;? else ?>\n         text('No')\n       &lt;? endif ?>\n       AS f_showfuture,\n       &lt;? if exists("showCosts") ?>\n         &lt;? if exists("actualCosts") ?>\n           text('Show Costs and Margins using Actual Costs')\n         &lt;? else ?>\n           text('Show Costs and Margins using Standard Costs')\n         &lt;? endif ?>\n         AS f_showcosts,\n         text('Cost') AS f_costlabel,\n         text('Margin') AS f_marginlabel\n       &lt;? else ?>\n         text('') AS f_showcosts,\n         text('') AS f_costlabel,\n         text('') AS f_marginlabel\n       &lt;? endif ?>\n  FROM custtype\n WHERE (custtype_id=&lt;? value("custtype_id") ?>);\n</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT itemid, sourcetype, schedulename, type, itemnumber,\n       item_descrip1, item_descrip2,\n       CASE WHEN (qtybreak = -1) THEN 'N/A'\n            ELSE formatQty(qtybreak)\n       END AS f_qtybreak,\n       price, formatSalesPrice(price) AS f_price,\n       &lt;? if exists("showCosts") ?>\n         cost AS cost,\n         formatCost(cost) AS f_cost,\n         CASE WHEN ((price = 0) OR (cost = 0)) THEN 'N/A'\n              ELSE formatScrap((price - cost) / price)\n         END AS f_margin\n       &lt;? else ?>\n         0 AS cost,\n         '' AS f_cost,\n         '' AS f_margin\n       &lt;? endif ?>\nFROM (\n  SELECT ipsprice_id AS itemid, 2 AS sourcetype,\n         ipshead_name AS schedulename, 'Cust. Type' AS type,\n         item_number AS itemnumber, item_descrip1, item_descrip2,\n         ipsprice_qtybreak AS qtybreak, ipsprice_price AS price,\n         &lt;? if exists("actualCosts") ?>\n           (actcost(ipsprice_item_id) * iteminvpricerat(item_id))\n         &lt;? else ?>\n           (stdcost(ipsprice_item_id) * iteminvpricerat(item_id))\n         &lt;? endif ?>\n         AS cost\n    FROM ipsass, ipshead, ipsprice, item \n   WHERE ((ipsass_ipshead_id=ipshead_id)\n     AND (ipsprice_ipshead_id=ipshead_id)\n     AND (ipsprice_item_id=item_id)\n     AND (ipsass_custtype_id=&lt;? value("custtype_id") ?>)\n&lt;? if not exists("showExpired") ?>\n     AND (ipshead_expires > CURRENT_DATE)\n&lt;? endif ?>\n&lt;? if not exists("showFuture") ?>\n     AND (ipshead_effective &lt;= CURRENT_DATE)\n&lt;? endif ?>\n  )\n\n  UNION\n  SELECT ipsprice_id AS itemid, 3 AS sourcetype,\n         ipshead_name AS schedulename, ('Sale' || '-' || sale_name) AS type,\n         item_number AS itemnumber,\n         item_descrip1, item_descrip2,\n         ipsprice_qtybreak AS qtybreak, ipsprice_price AS price,\n         &lt;? if exists("actualCosts") ?>\n           (actcost(ipsprice_item_id) * iteminvpricerat(item_id))\n         &lt;? else ?>\n           (stdcost(ipsprice_item_id) * iteminvpricerat(item_id))\n         &lt;? endif ?>\n         AS cost\n    FROM sale, ipshead, ipsprice, item\n   WHERE ( (sale_ipshead_id=ipshead_id)\n     AND (ipsprice_ipshead_id=ipshead_id)\n     AND (ipsprice_item_id=item_id)\n&lt;? if not exists("showExpired") ?>\n     AND (sale_enddate > CURRENT_DATE)\n&lt;? endif ?>\n&lt;? if not exists("showFuture") ?>\n     AND (sale_startdate &lt;= CURRENT_DATE)\n&lt;? endif ?>\n  )\n\n  UNION\n  SELECT item_id AS itemid, 0 AS sourcetype,\n         '' AS schedulename, 'List Price' AS type,\n         item_number AS itemnumber, item_descrip1, item_descrip2,\n         -1 AS qtybreak, item_listprice AS price,\n         &lt;? if exists("actualCosts") ?>\n           (actcost(item_id) * iteminvpricerat(item_id))\n         &lt;? else ?>\n           (stdcost(item_id) * iteminvpricerat(item_id))\n         &lt;? endif ?>\n         AS cost\n    FROM item\n   WHERE ( (item_sold)\n     AND (item_active)\n     AND (NOT item_exclusive) )\n) AS data\nORDER BY itemnumber, price;</sql>\n </querysource>\n <rpthead>\n  <height>236</height>\n  <label>\n   <rect>\n    <x>320</x>\n    <y>200</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Source</string>\n  </label>\n  <label>\n   <rect>\n    <x>425</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Qty. Break</string>\n  </label>\n  <label>\n   <rect>\n    <x>375</x>\n    <y>10</y>\n    <width>350</width>\n    <height>38</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Prices by Customer Type</string>\n  </label>\n  <field>\n   <rect>\n    <x>585</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_costlabel</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>665</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_marginlabel</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>130</x>\n    <y>80</y>\n    <width>500</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>custtype</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>20</x>\n    <y>80</y>\n    <width>105</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Customer Type:</string>\n  </label>\n  <field>\n   <rect>\n    <x>565</x>\n    <y>120</y>\n    <width>113</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_showfuture</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>405</x>\n    <y>120</y>\n    <width>155</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Show Future Prices:</string>\n  </label>\n  <label>\n   <rect>\n    <x>195</x>\n    <y>200</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Schedule</string>\n  </label>\n  <field>\n   <rect>\n    <x>565</x>\n    <y>100</y>\n    <width>113</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_showexpired</column>\n   </data>\n  </field>\n  <line>\n   <xstart>5</xstart>\n   <ystart>229</ystart>\n   <xend>745</xend>\n   <yend>229</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>215</y>\n    <width>155</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>200</y>\n    <width>155</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>505</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Price</string>\n  </label>\n  <field>\n   <rect>\n    <x>405</x>\n    <y>140</y>\n    <width>335</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_showcosts</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>405</x>\n    <y>100</y>\n    <width>155</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Show Expired Prices:</string>\n  </label>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>41</height>\n  <label>\n   <rect>\n    <x>425</x>\n    <y>5</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Qty. Break</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>5</y>\n    <width>155</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>505</x>\n    <y>5</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Price</string>\n  </label>\n  <field>\n   <rect>\n    <x>665</x>\n    <y>5</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_marginlabel</column>\n   </data>\n  </field>\n  <line>\n   <xstart>5</xstart>\n   <ystart>35</ystart>\n   <xend>745</xend>\n   <yend>35</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>195</x>\n    <y>5</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Schedule</string>\n  </label>\n  <field>\n   <rect>\n    <x>585</x>\n    <y>5</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_costlabel</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>20</y>\n    <width>155</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>320</x>\n    <y>5</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Source</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>56</height>\n   <line>\n    <xstart>5</xstart>\n    <ystart>50</ystart>\n    <xend>745</xend>\n    <yend>50</yend>\n    <weight>0</weight>\n   </line>\n   <field>\n    <rect>\n     <x>425</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_qtybreak</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>10</x>\n     <y>15</y>\n     <width>240</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_descrip1</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>195</x>\n     <y>0</y>\n     <width>120</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>schedulename</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>10</x>\n     <y>0</y>\n     <width>150</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>itemnumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>505</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_price</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>665</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_margin</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>10</x>\n     <y>30</y>\n     <width>240</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item_descrip2</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>585</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_cost</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>320</x>\n     <y>0</y>\n     <width>100</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>type</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>16</height>\n  <label>\n   <rect>\n    <x>615</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>90</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
67	PricesByItem	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Prices By Item</title>\n <name>PricesByItem</name>\n <description></description>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT item_number,\n       item_descrip1,\n       item_descrip2,\n       &lt;? if exists(&quot;showExpired&quot;) ?>\n         text('Yes')\n       &lt;? else ?>\n         text('No')\n       &lt;? endif ?>\n       AS f_showexpired,\n       &lt;? if exists(&quot;showFuture&quot;) ?>\n         text('Yes')\n       &lt;? else ?>\n         text('No')\n       &lt;? endif ?>\n       AS f_showfuture,\n       &lt;? if exists(&quot;showCosts&quot;) ?>\n         &lt;? if exists(&quot;actualCosts&quot;) ?>\n           text('Show Costs and Margins using Actual Costs')\n         &lt;? else ?>\n           text('Show Costs and Margins using Standard Costs')\n         &lt;? endif ?>\n         AS f_showcosts,\n         text('Cost') AS f_costlabel,\n         text('Margin') AS f_marginlabel\n       &lt;? else ?>\n         text('') AS f_showcosts,\n         text('') AS f_costlabel,\n         text('') AS f_marginlabel\n       &lt;? endif ?>\n  FROM item\n WHERE (item_id=&lt;? value(&quot;item_id&quot;) ?>);\n</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT itemid, sourcetype, schedulename, type, typename,\n       CASE WHEN (qtybreak = -1) THEN 'N/A'\n            ELSE formatQty(qtybreak)\n       END AS f_qtybreak,\n       price, formatPrice(price) AS f_price,\n       &lt;? if exists(&quot;showCosts&quot;) ?>\n         cost AS cost,\n         formatCost(cost) AS f_cost,\n         CASE WHEN ((price = 0) OR (cost = 0)) THEN 'N/A'\n              ELSE formatScrap((price - cost) / price)\n         END AS f_margin\n       &lt;? else ?>\n         0 AS cost,\n         text('') AS f_cost,\n         text('') AS f_margin\n       &lt;? endif ?>\nFROM ( SELECT ipsprice_id AS itemid, 1 AS sourcetype,\n              ipshead_name AS schedulename, 'Customer' AS type,\n              cust_name AS typename,\n              ipsprice_qtybreak AS qtybreak,\n              ipsprice_price AS price,\n              &lt;? if exists(&quot;actualCosts&quot;) ?>\n                (actcost(item_id) * iteminvpricerat(item_id))\n              &lt;? else ?>\n                (stdcost(item_id) * iteminvpricerat(item_id))\n              &lt;? endif ?>\n              AS cost\n         FROM ipsass, ipshead, ipsprice, custinfo, item\n        WHERE ( (ipsass_ipshead_id=ipshead_id)\n          AND (ipsprice_ipshead_id=ipshead_id)\n          AND (ipsass_cust_id=cust_id)\n          AND (ipsprice_item_id=item_id)\n          AND (item_id=&lt;? value(&quot;item_id&quot;) ?>)\n&lt;? if not exists(&quot;showExpired&quot;) ?>\n          AND (ipshead_expires > CURRENT_DATE)\n&lt;? endif ?>\n&lt;? if not exists(&quot;showFuture&quot;) ?>\n          AND (ipshead_effective &lt;= CURRENT_DATE)\n&lt;? endif ?>\n  )\n\n  UNION\n  SELECT ipsprice_id AS itemid, 2 AS sourcetype,\n         ipshead_name AS schedulename, 'Cust. Type' AS type,\n         (custtype_code || '-' || custtype_descrip) AS typename,\n         ipsprice_qtybreak AS qtybreak,\n         ipsprice_price AS price,\n         &lt;? if exists(&quot;actualCosts&quot;) ?>\n           (actcost(item_id) * iteminvpricerat(item_id))\n         &lt;? else ?>\n           (stdcost(item_id) * iteminvpricerat(item_id))\n         &lt;? endif ?>\n         AS cost\n    FROM ipsass, ipshead, ipsprice, custtype, item\n   WHERE ( (ipsass_ipshead_id=ipshead_id)\n     AND (ipsprice_ipshead_id=ipshead_id)\n     AND (ipsass_custtype_id=custtype_id)\n     AND (ipsprice_item_id=item_id)\n     AND (item_id=&lt;? value(&quot;item_id&quot;) ?>)\n&lt;? if not exists(&quot;showExpired&quot;) ?>\n     AND (ipshead_expires > CURRENT_DATE)\n&lt;? endif ?>\n&lt;? if not exists(&quot;showFuture&quot;) ?>\n     AND (ipshead_effective &lt;= CURRENT_DATE)\n&lt;? endif ?>\n  )\n\n  UNION\n  SELECT ipsprice_id AS itemid, 3 AS sourcetype,\n         ipshead_name AS schedulename, 'Cust. Type Pattern' AS type,\n         (custtype_code || '-' || custtype_descrip) AS typename,\n         ipsprice_qtybreak AS qtybreak,\n         ipsprice_price AS price,\n         &lt;? if exists(&quot;actualCosts&quot;) ?>\n           (actcost(item_id) * iteminvpricerat(item_id))\n         &lt;? else ?>\n           (stdcost(item_id) * iteminvpricerat(item_id))\n         &lt;? endif ?>\n         AS cost\n    FROM ipsass, ipshead, ipsprice, custtype, item\n   WHERE ( (ipsass_ipshead_id=ipshead_id)\n     AND (ipsprice_ipshead_id=ipshead_id)\n     AND (COALESCE(LENGTH(ipsass_custtype_pattern), 0) > 0)\n     AND (custtype_code ~ ipsass_custtype_pattern)\n     AND (ipsprice_item_id=item_id)\n     AND (item_id=&lt;? value(&quot;item_id&quot;) ?>)\n&lt;? if not exists(&quot;showExpired&quot;) ?>\n     AND (ipshead_expires > CURRENT_DATE)\n&lt;? endif ?>\n&lt;? if not exists(&quot;showFuture&quot;) ?>\n     AND (ipshead_effective &lt;= CURRENT_DATE)\n&lt;? endif ?>\n  )\n\n  UNION\n  SELECT ipsprice_id AS itemid, 4 AS sourcetype,\n         ipshead_name AS schedulename, 'Sale' AS type,\n         sale_name AS typename,\n         ipsprice_qtybreak AS qtybreak,\n         ipsprice_price AS price,\n         &lt;? if exists(&quot;actualCosts&quot;) ?>\n           (actcost(item_id) * iteminvpricerat(item_id))\n         &lt;? else ?>\n           (stdcost(item_id) * iteminvpricerat(item_id))\n         &lt;? endif ?>\n         AS cost\n    FROM sale, ipshead, ipsprice, item\n   WHERE ( (sale_ipshead_id=ipshead_id)\n     AND (ipsprice_ipshead_id=ipshead_id)\n     AND (ipsprice_item_id=item_id)\n     AND (item_id=&lt;? value(&quot;item_id&quot;) ?>)\n&lt;? if not exists(&quot;showExpired&quot;) ?>\n     AND (sale_enddate > CURRENT_DATE)\n&lt;? endif ?>\n&lt;? if not exists(&quot;showFuture&quot;) ?>\n     AND (sale_startdate &lt;= CURRENT_DATE)\n&lt;? endif ?>\n  )\n\n  UNION\n  SELECT ipsprice_id AS itemid, 5 AS sourcetype,\n         ipshead_name AS schedulename, 'Cust. Ship-To' AS type,\n         (cust_name || '-' || shipto_num) AS typename,\n         ipsprice_qtybreak AS qtybreak,\n         ipsprice_price AS price,\n         &lt;? if exists(&quot;actualCosts&quot;) ?>\n           (actcost(item_id) * iteminvpricerat(item_id))\n         &lt;? else ?>\n           (stdcost(item_id) * iteminvpricerat(item_id))\n         &lt;? endif ?>\n         AS cost\n    FROM ipsass, ipshead, ipsprice, custinfo, shiptoinfo, item\n   WHERE ( (ipsass_ipshead_id=ipshead_id)\n     AND (ipsprice_ipshead_id=ipshead_id)\n     AND (ipsass_shipto_id=shipto_id)\n     AND (shipto_cust_id=cust_id)\n     AND (ipsprice_item_id=item_id)\n     AND (item_id=&lt;? value(&quot;item_id&quot;) ?>)\n&lt;? if not exists(&quot;showExpired&quot;) ?>\n     AND (ipshead_expires > CURRENT_DATE)\n&lt;? endif ?>\n&lt;? if not exists(&quot;showFuture&quot;) ?>\n     AND (ipshead_effective &lt;= CURRENT_DATE)\n&lt;? endif ?>\n  )\n\n  UNION\n  SELECT ipsprice_id AS itemid, 5 AS sourcetype,\n         ipshead_name AS schedulename, 'Cust. Ship-To Pattern' AS type,\n         (cust_name || '-' || shipto_num) AS typename,\n         ipsprice_qtybreak AS qtybreak,\n         ipsprice_price AS price,\n         &lt;? if exists(&quot;actualCosts&quot;) ?>\n           (actcost(item_id) * iteminvpricerat(item_id))\n         &lt;? else ?>\n           (stdcost(item_id) * iteminvpricerat(item_id))\n         &lt;? endif ?>\n         AS cost\n    FROM ipsass, ipshead, ipsprice, custinfo, shiptoinfo, item\n   WHERE ( (ipsass_ipshead_id=ipshead_id)\n     AND (ipsprice_ipshead_id=ipshead_id)\n     AND (COALESCE(LENGTH(ipsass_shipto_pattern), 0) > 0)\n     AND (shipto_num ~ ipsass_shipto_pattern)\n     AND (shipto_cust_id=cust_id)\n     AND (ipsprice_item_id=item_id)\n     AND (item_id=&lt;? value(&quot;item_id&quot;) ?>)\n&lt;? if not exists(&quot;showExpired&quot;) ?>\n     AND (ipshead_expires > CURRENT_DATE)\n&lt;? endif ?>\n&lt;? if not exists(&quot;showFuture&quot;) ?>\n     AND (ipshead_effective &lt;= CURRENT_DATE)\n&lt;? endif ?>\n  )\n\n  UNION\n  SELECT item_id AS itemid, 0 AS sourcetype,\n         'List Price' AS schedulename, 'N/A' AS type,\n         '' AS typename,\n         -1 AS qtybreak,\n         item_listprice AS price,\n         &lt;? if exists(&quot;actualCosts&quot;) ?>\n           (actcost(item_id) * iteminvpricerat(item_id))\n         &lt;? else ?>\n           (stdcost(item_id) * iteminvpricerat(item_id))\n         &lt;? endif ?>\n         AS cost\n    FROM item\n   WHERE ( (NOT item_exclusive)\n     AND (item_id=&lt;? value(&quot;item_id&quot;) ?>) ) ) AS data\nORDER BY price;</sql>\n </querysource>\n <rpthead>\n  <height>221</height>\n  <field>\n   <rect>\n    <x>565</x>\n    <y>80</y>\n    <width>114</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_showexpired</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>80</y>\n    <width>200</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>item_number</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>665</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_marginlabel</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>240</x>\n    <y>200</y>\n    <width>155</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Customer/Customer Type</string>\n  </label>\n  <label>\n   <rect>\n    <x>375</x>\n    <y>10</y>\n    <width>350</width>\n    <height>38</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Prices by Item</string>\n  </label>\n  <label>\n   <rect>\n    <x>405</x>\n    <y>80</y>\n    <width>155</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Show Expired Prices:</string>\n  </label>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>100</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>item_descrip1</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>425</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Qty. Break</string>\n  </label>\n  <label>\n   <rect>\n    <x>505</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Price</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>200</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Schedule</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>215</ystart>\n   <xend>745</xend>\n   <yend>215</yend>\n   <weight>2</weight>\n  </line>\n  <field>\n   <rect>\n    <x>585</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_costlabel</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>405</x>\n    <y>100</y>\n    <width>155</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Show Future Prices:</string>\n  </label>\n  <field>\n   <rect>\n    <x>405</x>\n    <y>120</y>\n    <width>335</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_showcosts</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>135</x>\n    <y>200</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Source</string>\n  </label>\n  <field>\n   <rect>\n    <x>565</x>\n    <y>100</y>\n    <width>114</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_showfuture</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>120</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>item_descrip2</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>80</y>\n    <width>80</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Item:</string>\n  </label>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>26</height>\n  <label>\n   <rect>\n    <x>240</x>\n    <y>5</y>\n    <width>155</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Customer/Customer Type</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>20</ystart>\n   <xend>745</xend>\n   <yend>20</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>505</x>\n    <y>5</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Price</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>5</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Schedule</string>\n  </label>\n  <label>\n   <rect>\n    <x>425</x>\n    <y>5</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Qty. Break</string>\n  </label>\n  <field>\n   <rect>\n    <x>585</x>\n    <y>5</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_costlabel</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>135</x>\n    <y>5</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Source</string>\n  </label>\n  <field>\n   <rect>\n    <x>665</x>\n    <y>5</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_costlabel</column>\n   </data>\n  </field>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>16</height>\n   <field>\n    <rect>\n     <x>505</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_price</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>135</x>\n     <y>0</y>\n     <width>100</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>type</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>10</x>\n     <y>0</y>\n     <width>120</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>schedulename</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>585</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_cost</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>425</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_qtybreak</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>665</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_margin</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>240</x>\n     <y>0</y>\n     <width>185</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>typename</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>16</height>\n  <field>\n   <rect>\n    <x>90</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>615</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
258	PricingScheduleAssignments	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Pricing Schedule Assignments</title>\n <name>PricingScheduleAssignments</name>\n <description></description>\n <grid>\n  <snap/>\n  <show/>\n  <x>0.05</x>\n  <y>0.05</y>\n </grid>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT ipsass_id,\n       CASE WHEN (ipsass_shipto_id != -1) THEN (SELECT shipto_num FROM shiptoinfo WHERE (shipto_id=ipsass_shipto_id))\n            WHEN (COALESCE(LENGTH(ipsass_shipto_pattern), 0) > 0) THEN ipsass_shipto_pattern\n            ELSE TEXT('ANY')\n       END AS shiptonum,\n       CASE WHEN (ipsass_shipto_id != -1) THEN (SELECT cust_number FROM shiptoinfo, custinfo WHERE ((shipto_cust_id=cust_id) AND (shipto_id=ipsass_shipto_id)))\n            WHEN (ipsass_cust_id=-1) THEN TEXT('Any')\n            ELSE (SELECT cust_number FROM custinfo WHERE (cust_id=ipsass_cust_id))\n       END AS custnumber,\n       CASE WHEN (ipsass_shipto_id != -1) THEN (SELECT cust_name FROM shiptoinfo, custinfo WHERE ((shipto_cust_id=cust_id) AND (shipto_id=ipsass_shipto_id)))\n            WHEN (ipsass_cust_id=-1) THEN ''\n            ELSE (SELECT cust_name FROM custinfo WHERE (cust_id=ipsass_cust_id))\n       END AS custname,\n       CASE WHEN (ipsass_cust_id != -1) THEN TEXT('N/A')\n            WHEN (ipsass_shipto_id != -1) THEN TEXT('N/A')\n            WHEN (COALESCE(LENGTH(ipsass_shipto_pattern),0) > 0) THEN TEXT('N/A')\n            WHEN (ipsass_custtype_id=-1) THEN ipsass_custtype_pattern\n            ELSE (SELECT custtype_code FROM custtype WHERE (custtype_id=ipsass_custtype_id))\n       END AS custtype,\n       ipshead_name\nFROM ipsass, ipshead\nWHERE (ipshead_id=ipsass_ipshead_id)\nORDER BY custname, custtype;\n</sql>\n </querysource>\n <rpthead>\n  <height>78</height>\n  <label>\n   <rect>\n    <x>240</x>\n    <y>55</y>\n    <width>95</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Customer Name</string>\n  </label>\n  <label>\n   <rect>\n    <x>115</x>\n    <y>55</y>\n    <width>95</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Customer #</string>\n  </label>\n  <label>\n   <rect>\n    <x>580</x>\n    <y>55</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Pricing Schedule</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>55</y>\n    <width>95</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Cust. Ship-To</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>70</ystart>\n   <xend>745</xend>\n   <yend>70</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>295</x>\n    <y>10</y>\n    <width>450</width>\n    <height>37</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Pricing Schedule Assignments</string>\n  </label>\n  <label>\n   <rect>\n    <x>465</x>\n    <y>55</y>\n    <width>95</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Cust. Type</string>\n  </label>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>21</height>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>0</y>\n    <width>95</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Cust. Ship-To</string>\n  </label>\n  <label>\n   <rect>\n    <x>115</x>\n    <y>0</y>\n    <width>95</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Customer #</string>\n  </label>\n  <label>\n   <rect>\n    <x>225</x>\n    <y>0</y>\n    <width>95</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Cust. Type</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>15</ystart>\n   <xend>745</xend>\n   <yend>15</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>335</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Pricing Schedule</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>18</height>\n   <field>\n    <rect>\n     <x>465</x>\n     <y>0</y>\n     <width>100</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>custtype</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>5</x>\n     <y>0</y>\n     <width>100</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>shiptonum</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>240</x>\n     <y>0</y>\n     <width>205</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>custname</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>115</x>\n     <y>0</y>\n     <width>100</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>custnumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>580</x>\n     <y>0</y>\n     <width>150</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>ipshead_name</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>18</height>\n  <label>\n   <rect>\n    <x>615</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n  <field>\n   <rect>\n    <x>90</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
44	ProductCategoriesMasterList	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Product Categories Master List</title>\n <name>ProductCategoriesMasterList</name>\n <description></description>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>detail</name>\n  <sql>select prodcat_code, prodcat_descrip\n  from prodcat\norder by prodcat_code;</sql>\n </querysource>\n <rpthead>\n  <height>76</height>\n  <label>\n   <rect>\n    <x>175</x>\n    <y>55</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>55</y>\n    <width>95</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Product Category</string>\n  </label>\n  <label>\n   <rect>\n    <x>295</x>\n    <y>10</y>\n    <width>450</width>\n    <height>38</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Product Categories Master List</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>70</ystart>\n   <xend>745</xend>\n   <yend>70</yend>\n   <weight>2</weight>\n  </line>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>21</height>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>0</y>\n    <width>95</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Product Category</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>15</ystart>\n   <xend>745</xend>\n   <yend>15</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>175</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Description</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>16</height>\n   <field>\n    <rect>\n     <x>10</x>\n     <y>0</y>\n     <width>150</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>prodcat_code</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>175</x>\n     <y>0</y>\n     <width>565</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>prodcat_descrip</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>16</height>\n  <label>\n   <rect>\n    <x>615</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>90</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
298	ProjectTaskList	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>ProjectTaskList</title>\n <name>ProjectTaskList</name>\n <description></description>\n <grid>\n  <snap/>\n  <show/>\n  <x>0.05</x>\n  <y>0.05</y>\n </grid>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT prjtask_number, prjtask_name, prjtask_descrip,\n       CASE WHEN (prjtask_status='P') THEN 'Planning'\n\t  WHEN (prjtask_status='O') THEN 'In-Process'\n\t  ELSE 'Completed' END as status,\n       formatDate(prjtask_start_date) as f_start,\n       formatDate(prjtask_due_date) as f_due,\n       formatDate(prjtask_assigned_date) as f_assigned,\n       formatDate(prjtask_completed_date) as f_completed\n  FROM prjtask\n WHERE (prjtask_prj_id=&lt;?value("prj_id")?>)\n ORDER BY prjtask_number;</sql>\n </querysource>\n <querysource>\n  <name>head</name>\n  <sql>SELECT (prj_number||'-'||prj_name) AS project\n  FROM prj\n WHERE (prj_id=&lt;? value("prj_id") ?>);</sql>\n </querysource>\n <rpthead>\n  <height>102</height>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>80</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>50</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Project:</string>\n  </label>\n  <field>\n   <rect>\n    <x>70</x>\n    <y>50</y>\n    <width>450</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>project</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>355</x>\n    <y>80</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>140</x>\n    <y>80</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Name</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>95</ystart>\n   <xend>745</xend>\n   <yend>95</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>295</x>\n    <y>10</y>\n    <width>450</width>\n    <height>38</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Project Task List</string>\n  </label>\n </rpthead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>43</height>\n   <field>\n    <rect>\n     <x>10</x>\n     <y>0</y>\n     <width>120</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>prjtask_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>70</x>\n     <y>18</y>\n     <width>70</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_start</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>225</x>\n     <y>18</y>\n     <width>70</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_assigned</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>375</x>\n     <y>18</y>\n     <width>70</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_due</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>525</x>\n     <y>18</y>\n     <width>70</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_completed</column>\n    </data>\n   </field>\n   <label>\n    <rect>\n     <x>460</x>\n     <y>18</y>\n     <width>60</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <string>Completed:</string>\n   </label>\n   <label>\n    <rect>\n     <x>5</x>\n     <y>18</y>\n     <width>60</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <string>Start Date:</string>\n   </label>\n   <label>\n    <rect>\n     <x>310</x>\n     <y>18</y>\n     <width>60</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <string>Due Date:</string>\n   </label>\n   <label>\n    <rect>\n     <x>160</x>\n     <y>18</y>\n     <width>60</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <string>Assigned:</string>\n   </label>\n   <field>\n    <rect>\n     <x>140</x>\n     <y>-2</y>\n     <width>200</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>prjtask_name</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>355</x>\n     <y>-2</y>\n     <width>385</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>prjtask_descrip</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>660</x>\n     <y>18</y>\n     <width>90</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>status</column>\n    </data>\n   </field>\n   <label>\n    <rect>\n     <x>615</x>\n     <y>18</y>\n     <width>45</width>\n     <height>20</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <string>Status:</string>\n   </label>\n  </detail>\n </section>\n <pgfoot>\n  <height>18</height>\n  <label>\n   <rect>\n    <x>615</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>95</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
145	PurchaseRequestsByItem	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Purchase Requests By Item</title>\n <name>PurchaseRequestsByItem</name>\n <description></description>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT item_number,\n       item_descrip1,\n       item_descrip2,\n       uom_name,\n       &lt;? if exists("warehous_id") ?>\n         (SELECT warehous_code\n            FROM whsinfo\n           WHERE warehous_id=&lt;? value("warehous_id") ?>)\n       &lt;? else ?>\n         text('All Sites')\n       &lt;? endif ?>\n       AS warehouse\n  FROM item JOIN uom ON (item_inv_uom_id=uom_id)\n WHERE (item_id=&lt;? value("item_id") ?>);</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT pr_status,\n       pr_number || '-' || pr_subnumber AS pr_number,\n       CASE WHEN (pr_order_type='W') THEN ('W/O ' || ( SELECT formatWoNumber(womatl_wo_id)\n                                                       FROM womatl\n                                                       WHERE (womatl_id=pr_order_id) ) )\n            WHEN (pr_order_type='S') THEN ('S/O ' || (SELECT formatSoNumber(pr_order_id)))\n            WHEN (pr_order_type='F') THEN ('Planned Order')\n            WHEN (pr_order_type='M') THEN 'Manual'\n            ELSE 'Other'\n       END as f_type,\n       pr_createdate as f_createdate,\n       formatDate(pr_duedate) as f_duedate,\n       formatQty(pr_qtyreq) as f_qtyreq,\n        pr_releasenote as f_notes\n  FROM pr, itemsite \n WHERE ((pr_itemsite_id=itemsite_id)\n   AND (itemsite_item_id=&lt;? value("item_id") ?>)\n&lt;? if exists("warehous_id") ?>\n   AND (itemsite_warehous_id=&lt;? value("warehous_id") ?>)\n&lt;? endif ?>\n ) \nORDER BY pr_duedate;</sql>\n </querysource>\n <rpthead>\n  <height>221</height>\n  <label>\n   <rect>\n    <x>655</x>\n    <y>200</y>\n    <width>90</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Qty.</string>\n  </label>\n  <field>\n   <rect>\n    <x>135</x>\n    <y>85</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>item_descrip1</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>135</x>\n    <y>105</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>item_descrip2</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>135</x>\n    <y>135</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>warehouse</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>105</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Status</string>\n  </label>\n  <field>\n   <rect>\n    <x>135</x>\n    <y>65</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>item_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>30</x>\n    <y>135</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Site:</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>65</y>\n    <width>120</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Item:</string>\n  </label>\n  <field>\n   <rect>\n    <x>355</x>\n    <y>65</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>uom_name</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>190</x>\n    <y>200</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Parent Order</string>\n  </label>\n  <label>\n   <rect>\n    <x>270</x>\n    <y>5</y>\n    <width>475</width>\n    <height>40</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Purchase Requests By Item</string>\n  </label>\n  <label>\n   <rect>\n    <x>300</x>\n    <y>65</y>\n    <width>50</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>UOM:</string>\n  </label>\n  <label>\n   <rect>\n    <x>560</x>\n    <y>200</y>\n    <width>90</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Due Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>200</y>\n    <width>90</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Purchase Request</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>215</ystart>\n   <xend>745</xend>\n   <yend>215</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>457</x>\n    <y>198</y>\n    <width>80</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Create Date</string>\n  </label>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>5</height>\n </pghead>\n <pghead>\n  <height>25</height>\n  <label>\n   <rect>\n    <x>655</x>\n    <y>5</y>\n    <width>90</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Qty.</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>5</y>\n    <width>90</width>\n    <height>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Purchase Request</string>\n  </label>\n  <label>\n   <rect>\n    <x>190</x>\n    <y>5</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Parent Order</string>\n  </label>\n  <label>\n   <rect>\n    <x>105</x>\n    <y>5</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Status</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>20</ystart>\n   <xend>745</xend>\n   <yend>20</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>560</x>\n    <y>5</y>\n    <width>90</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Due Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>457</x>\n    <y>5</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Create Date</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>39</height>\n   <field>\n    <rect>\n     <x>655</x>\n     <y>0</y>\n     <width>90</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_qtyreq</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>190</x>\n     <y>0</y>\n     <width>209</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_type</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>560</x>\n     <y>0</y>\n     <width>90</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_duedate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>10</x>\n     <y>0</y>\n     <width>90</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>pr_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>105</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>pr_status</column>\n    </data>\n   </field>\n   <label>\n    <rect>\n     <x>11</x>\n     <y>18</y>\n     <width>38</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>6</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <string>Notes</string>\n   </label>\n   <text>\n    <rect>\n     <x>52</x>\n     <y>18</y>\n     <width>683</width>\n     <height>15</height>\n    </rect>\n    <bottompad>14</bottompad>\n    <font>\n     <face>Helvetica</face>\n     <size>6</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_notes</column>\n    </data>\n   </text>\n   <field>\n    <rect>\n     <x>445</x>\n     <y>0</y>\n     <width>110</width>\n     <height>16</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_createdate</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>15</height>\n  <field>\n   <rect>\n    <x>105</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>600</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
