139	ReorderExceptionsByPlannerCode	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Reorder Exceptions by Planner Code</title>\n <name>ReorderExceptionsByPlannerCode</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;plancode_id&quot;) ?>\n         ( SELECT (plancode_code || '-' || plancode_name)\n             FROM plancode\n            WHERE plancode_id=&lt;? value(&quot;plancode_id&quot;) ?>)\n       &lt;? elseif exists(&quot;plancode_pattern&quot;) ?>\n         text(&lt;? value(&quot;plancode_pattern&quot;) ?>)\n       &lt;? else ?>\n         text('All Planner Codes')\n       &lt;? endif ?>\n       AS plannercode,\n       &lt;? if exists(&quot;includePlannedOrders&quot;) ?>\n         formatBoolYN(true)\n       &lt;? else ?>\n         formatBoolYN(false)\n       &lt;? endif ?>\n       AS includeplnord,\n       &lt;? if exists(&quot;warehous_id&quot;) ?>\n         ( SELECT warehous_code\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;</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT warehous_code, item_number, item_descrip1, item_descrip2,\n       formatDate(reorderdate) AS f_reorderdate,\n       formatQty(reorderlevel) AS f_reorderlevel,\n       formatQty((qtyNetable(itemsite_id) - qtyAllocated(itemsite_id, reorderdate) + qtyOrdered(itemsite_id, reorderdate))) AS f_projavail,\n       reorderdate \n  FROM ( SELECT itemsite_id,\n                CASE WHEN (item_type IN ('M', 'B', 'T')) THEN 1\n                     WHEN (item_type IN ('P', 'O')) THEN 2\n                     ELSE 3\n                END AS itemtype,\n                warehous_code, item_number, item_descrip1, item_descrip2,\n                reorderDate(itemsite_id, &lt;? value(&quot;lookAheadDays&quot;) ?>, &lt;? if exists(&quot;includePlannedOrder&quot;) ?>true&lt;? else ?>false&lt;? endif ?>) AS reorderdate,\n                reorderlevel \n           FROM ( SELECT itemsite_id, itemsite_item_id, itemsite_warehous_id,\n                         CASE WHEN(itemsite_useparams) THEN itemsite_reorderlevel ELSE 0.0 END AS reorderlevel\n                    FROM itemsite \n                   WHERE ((true)\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;plancode_id&quot;) ?>\n                     AND (itemsite_plancode_id=&lt;? value(&quot;plancode_id&quot;) ?>)\n&lt;? elseif exists(&quot;plancode_pattern&quot;) ?>\n                     AND (itemsite_plancode_id IN (SELECT plancode_id\n                                                     FROM plancode\n                                                    WHERE (plancode_code ~ &lt;? value(&quot;plancode_pattern&quot;) ?>)))\n&lt;? endif ?>\n                         )\n                ) AS itemsitedate, item, whsinfo\n          WHERE ((itemsite_item_id=item_id)\n            AND (itemsite_warehous_id=warehous_id))\n       ) AS data \n WHERE (reorderdate IS NOT NULL) \nORDER BY reorderdate, item_number;</sql>\n </querysource>\n <rpthead>\n  <height>221</height>\n  <label>\n   <rect>\n    <x>385</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   <hcenter/>\n   <vcenter/>\n   <string>Exception Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>50</x>\n    <y>200</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>Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>490</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   <hcenter/>\n   <vcenter/>\n   <string>Reorder Level</string>\n  </label>\n  <label>\n   <rect>\n    <x>345</x>\n    <y>80</y>\n    <width>175</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>Include Planned Orders:</string>\n  </label>\n  <label>\n   <rect>\n    <x>240</x>\n    <y>10</y>\n    <width>484</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>Reorder Exceptions by Planner Code</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   <right/>\n   <vcenter/>\n   <string>Site:</string>\n  </label>\n  <field>\n   <rect>\n    <x>140</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>Parameter Query</query>\n    <column>lookAheadDays</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>595</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   <hcenter/>\n   <vcenter/>\n   <string>Proj. Avail.</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>50</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 Number</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>Site</string>\n  </label>\n  <field>\n   <rect>\n    <x>525</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>includeplnord</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>100</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>140</x>\n    <y>80</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>plannercode</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>120</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   <right/>\n   <vcenter/>\n   <string>Look Ahead Days:</string>\n  </label>\n  <label>\n   <rect>\n    <x>30</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>Planner Code(s):</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>50</x>\n    <y>5</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 Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>595</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   <hcenter/>\n   <vcenter/>\n   <string>Proj. Avail.</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>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   <hcenter/>\n   <vcenter/>\n   <string>Reorder Level</string>\n  </label>\n  <label>\n   <rect>\n    <x>385</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   <hcenter/>\n   <vcenter/>\n   <string>Exception Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>50</x>\n    <y>20</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>Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>5</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>Site</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>51</height>\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>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>warehous_code</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>50</x>\n     <y>30</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>item_descrip2</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>385</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>f_reorderdate</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    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_reorderlevel</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>595</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    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_projavail</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>50</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>item_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>50</x>\n     <y>15</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>item_descrip1</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>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 </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
427	ReturnAuthorizationWorkbenchDueCredit	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Return Authorization Workbench Due Credit</title>\n <name>ReturnAuthorizationWorkbenchDueCredit</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("cust_id") ?>\n       cust_number AS f_custtype\n  FROM custinfo\n WHERE(cust_id=&lt;? value("cust_id") ?>);\n&lt;? elseif exists("custtype_id") ?>\n       custtype_name AS f_custtype\n  FROM custtype\n WHERE(custtype_id=&lt;? value("custtype_id") ?>);\n&lt;? elseif exists("custgrp_id") ?>\n       custgrp_name AS f_custtype\n  FROM custgrp\n WHERE(custgrp_id=&lt;? value("custgrp_id") ?>);\n&lt;? else ?>\n       text('All Customer Types') AS f_custtype\n&lt;? endif ?></sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT DISTINCT rahead_id,\nCASE\n  WHEN rahead_creditmethod = 'M' THEN\n    1\n  WHEN rahead_creditmethod = 'K' THEN\n    2\n  WHEN rahead_creditmethod = 'C' THEN\n    3\nEND,\nrahead_number, cust_name,\nformatDate(rahead_authdate) AS f_authdate, formatDate(NULL) AS f_eligibledate,\nformatMoney(currtobase(rahead_curr_id,\n                       calcradueamt(rahead_id), current_date)) AS f_amount,\nCASE\n  WHEN rahead_creditmethod = 'M' THEN\n    &lt;? value("creditmemo") ?>\n  WHEN rahead_creditmethod = 'K' THEN\n    &lt;? value("check") ?>\n  WHEN rahead_creditmethod = 'C' THEN\n    &lt;? value("creditcard") ?>\nEND AS creditmethod, rahead_authdate\nFROM rahead, raitem, custtype, custinfo LEFT OUTER JOIN custgrpitem ON (cust_id=custgrpitem_cust_id)\nWHERE ( (rahead_id=raitem_rahead_id)\n AND (rahead_cust_id=cust_id)\n AND (cust_custtype_id=custtype_id)\n AND ((raitem_disposition = 'R' AND rahead_timing = 'R' AND raitem_qtyreceived > raitem_qtycredited)\n OR (raitem_disposition = 'R' AND rahead_timing = 'I' AND raitem_qtyauthorized > raitem_qtycredited)\n OR (raitem_disposition = 'C' AND raitem_qtyauthorized > raitem_qtycredited))\n AND (raitem_status = 'O')\n AND (rahead_creditmethod != 'N')\n AND (calcradueamt(rahead_id) > 0)\n AND (raitem_disposition IN ('C','R'))\n &lt;? if exists("cust_id") ?>\n AND (cust_id=&lt;? value("cust_id") ?>)\n &lt;? elseif exists("custtype_id") ?>\n AND (custtype_id=&lt;? value("custtype_id") ?>)\n &lt;? elseif exists("custtype_pattern") ?>\n AND (custtype_pattern=&lt;? value("custtype_pattern") ?>)\n &lt;? elseif exists("custgrp_id") ?>\n AND (custgrpitem_custgrp_id=&lt;? value("custgrp_id") ?>)\n &lt;? endif ?>\n AND (rahead_creditmethod IN ('$'\n &lt;? if exists("doM") ?>, 'M'&lt;? endif ?>\n &lt;? if exists("doK") ?>, 'K'&lt;? endif ?>\n &lt;? if exists("doC") ?>, 'C'&lt;? endif ?>\n ))\n ) \nORDER BY rahead_authdate,rahead_number;</sql>\n </querysource>\n <rpthead>\n  <height>223</height>\n  <label>\n   <rect>\n    <x>325</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>Amount</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</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>Auth. #</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>15</x>\n    <y>80</y>\n    <width>165</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/Cust Type:</string>\n  </label>\n  <label>\n   <rect>\n    <x>165</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>Authorized</string>\n  </label>\n  <label>\n   <rect>\n    <x>90</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   <left/>\n   <vcenter/>\n   <string>Customer</string>\n  </label>\n  <label>\n   <rect>\n    <x>30</x>\n    <y>10</y>\n    <width>695</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>Return Authorization Workbench Due Credit</string>\n  </label>\n  <field>\n   <rect>\n    <x>185</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>f_custtype</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>245</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>Eligible</string>\n  </label>\n  <label>\n   <rect>\n    <x>410</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>Credited By</string>\n  </label>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>28</height>\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>165</x>\n    <y>5</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>Authorized</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</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>Auth. #</string>\n  </label>\n  <label>\n   <rect>\n    <x>325</x>\n    <y>5</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>Amount</string>\n  </label>\n  <label>\n   <rect>\n    <x>90</x>\n    <y>5</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>Customer</string>\n  </label>\n  <label>\n   <rect>\n    <x>245</x>\n    <y>5</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>Eligible</string>\n  </label>\n  <label>\n   <rect>\n    <x>410</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   <hcenter/>\n   <vcenter/>\n   <string>Credited By</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>245</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    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_eligibledate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>325</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>f_amount</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>410</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>creditmethod</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>5</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>rahead_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>90</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    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>cust_name</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>170</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    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_authdate</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  <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
428	ReturnAuthorizationWorkbenchReview	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Return Authorization Workbench Review</title>\n <name>ReturnAuthorizationWorkbenchReview</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("cust_id") ?>\n       (cust_number || '-' || cust_name) AS f_custtype\n  FROM custinfo\n WHERE(cust_id=&lt;? value("cust_id") ?>)\n&lt;? elseif exists("custtype_id") ?>\n       (custtype_code || '-' || custtype_descrip) AS f_custtype\n  FROM custtype\n WHERE(custtype_id=&lt;? value("custtype_id") ?>)\n&lt;? elseif exists("custgrp_id") ?>\n       (custgrp_name || '-' || custgrp_descrip) AS f_custtype\n  FROM custgrp\n WHERE(custgrp_id=&lt;? value("custgrp_id") ?>)\n&lt;? else ?>\n       text('All Customer Types') AS f_custtype\n&lt;? endif ?>\n;</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT * FROM (\nSELECT rahead_id, rahead_number, COALESCE(cust_name,text('Undefined')) AS custnumber,\nformatDate(rahead_authdate) AS f_authdate, COALESCE(formatDate(rahead_expiredate),text('Never')) AS f_expiredate,\nCASE\n  WHEN raitem_disposition = 'C' THEN\n    text('Credit')\n  WHEN raitem_disposition = 'R' THEN\n    text('Return')\n  WHEN raitem_disposition = 'P' THEN\n    text('Replace')\n  WHEN raitem_disposition = 'V' THEN\n    text('Service')\n  WHEN raitem_disposition = 'S' THEN\n    text('Shipment')\n  END AS disposition,\nCASE\n  WHEN rahead_creditmethod = 'N' THEN\n    text('None')\n  WHEN rahead_creditmethod = 'M' THEN\n    text('Memo')\n  WHEN rahead_creditmethod = 'K' THEN\n    text('Check')\n  WHEN rahead_creditmethod = 'C' THEN\n    text('Card')\nEND AS creditmethod,\nCASE\n  WHEN raitem_status = 'C' THEN\n    text('Closed')\n  WHEN raitem_disposition = 'C' THEN\n    text('Payment')\n  WHEN raitem_disposition = 'R'\n    AND SUM(raitem_qtyauthorized-raitem_qtycredited) > 0\n    AND SUM(raitem_qtyauthorized-raitem_qtyreceived) > 0 THEN\n    text('Receipt') || ',' || text('Payment')\n  WHEN raitem_disposition = 'R'\n    AND SUM(raitem_qtyreceived-raitem_qtycredited) > 0 THEN\n    text('Payment')\n  WHEN raitem_disposition = 'R'\n    AND SUM(raitem_qtyauthorized-raitem_qtyreceived) > 0 THEN\n    text('Receipt')\n  WHEN raitem_disposition IN ('P','V')\n    AND SUM(raitem_qtyauthorized-COALESCE(coitem_qtyshipped,0)) > 0\n    AND SUM(raitem_qtyauthorized-raitem_qtyreceived) > 0 THEN\n    text('Receipt') || ',' || text('Shipment')\n  WHEN raitem_disposition IN ('P','V')\n    AND SUM(raitem_qtyauthorized-COALESCE(coitem_qtyshipped,0)) > 0 THEN\n    text('Shipment')\n  WHEN raitem_disposition IN ('P','V')\n    AND SUM(raitem_qtyauthorized-raitem_qtyreceived) > 0 THEN\n    text('Receipt')\n  WHEN raitem_disposition = 'S' THEN\n    text('Shipment')\n  ELSE ''\nEND AS awaiting\nFROM rahead\n  LEFT OUTER JOIN custinfo ON (rahead_cust_id=cust_id)\n  LEFT OUTER JOIN custtype ON (cust_custtype_id=custtype_id)\n  LEFT OUTER JOIN custgrpitem ON (custgrpitem_cust_id=cust_id), \n raitem\n  LEFT OUTER JOIN coitem ON (raitem_new_coitem_id=coitem_id)\nWHERE ( (rahead_id=raitem_rahead_id)\n\n&lt;? if exists("cust_id") ?>\n  AND (cust_id=&lt;? value("cust_id")?>)\n&lt;? elseif exists("custtype_id") ?>\n  AND (custtype_id=&lt;? value("custtype_id") ?>)\n&lt;? elseif exists("custgrp_id") ?>\n  AND (custgrpitem_custgrp_id=&lt;? value("custgrp_id") ?>)\n&lt;? elseif exists("custtype_pattern") ?>\n  AND (custtype_code ~ &lt;? value("custtype_pattern") ?>)\n&lt;? endif ?>\n\n&lt;? if not exists("showExpired") ?>\n  AND (COALESCE(rahead_expiredate,CURRENT_DATE) >= CURRENT_DATE)\n&lt;? endif ?>\n&lt;? if exists("showClosed") ?>\n  AND (raitem_status='O' OR rahead_authdate BETWEEN &lt;? value("startDate") ?> AND &lt;? value("endDate") ?>)\n&lt;? else ?>\n  AND (raitem_status = 'O')\n&lt;? endif ?>\n ) GROUP BY rahead_id,rahead_number,cust_name,rahead_expiredate,\n rahead_authdate,raitem_status,raitem_disposition,rahead_creditmethod,\n rahead_curr_id\n ORDER BY rahead_authdate,rahead_number\n) as data\n\nWHERE (FALSE)\n&lt;? if exists("showReceipts") ?>\n OR ((disposition IN ('Return','Replace','Service'))\n  AND (awaiting ~ 'Receipt'))\n&lt;? endif ?>\n&lt;? if exists("showShipments") ?>\n OR ((disposition IN ('Replace','Service','Shipment'))\n  AND (awaiting ~ 'Shipment'))\n&lt;? endif ?>\n&lt;? if exists("showPayments") ?>\n OR ((disposition IN ('Credit','Return'))\n  AND (awaiting ~ 'Payment'))\n&lt;? endif ?>\n&lt;? if exists("showClosed") ?>\n OR ((awaiting = 'Closed'))\n&lt;? endif ?>\n</sql>\n </querysource>\n <rpthead>\n  <height>223</height>\n  <label>\n   <rect>\n    <x>325</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>Disposition</string>\n  </label>\n  <label>\n   <rect>\n    <x>90</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   <left/>\n   <vcenter/>\n   <string>Customer</string>\n  </label>\n  <label>\n   <rect>\n    <x>165</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>Authorized</string>\n  </label>\n  <label>\n   <rect>\n    <x>525</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   <left/>\n   <vcenter/>\n   <string>Awaiting</string>\n  </label>\n  <field>\n   <rect>\n    <x>185</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>f_custtype</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>245</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>Expires</string>\n  </label>\n  <label>\n   <rect>\n    <x>30</x>\n    <y>10</y>\n    <width>695</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>Return Authorization Workbench Review</string>\n  </label>\n  <label>\n   <rect>\n    <x>7</x>\n    <y>80</y>\n    <width>173</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/Cust Type/Group:</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</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>Auth. #</string>\n  </label>\n  <label>\n   <rect>\n    <x>410</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>Credited By</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>6</height>\n </pghead>\n <pghead>\n  <height>28</height>\n  <label>\n   <rect>\n    <x>165</x>\n    <y>5</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>Authorized</string>\n  </label>\n  <label>\n   <rect>\n    <x>410</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   <hcenter/>\n   <vcenter/>\n   <string>Credited By</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</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>Auth. #</string>\n  </label>\n  <label>\n   <rect>\n    <x>245</x>\n    <y>5</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>Expires</string>\n  </label>\n  <label>\n   <rect>\n    <x>325</x>\n    <y>5</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>Disposition</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>90</x>\n    <y>5</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>Customer</string>\n  </label>\n  <label>\n   <rect>\n    <x>525</x>\n    <y>5</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>Awaiting</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>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>rahead_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>170</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    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_authdate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>245</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    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_expiredate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>410</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>creditmethod</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>325</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>disposition</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>525</x>\n     <y>0</y>\n     <width>195</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>awaiting</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>90</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    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>custnumber</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  <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
60	SalesOrderStatus	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Sales Order Status</title>\n <name>SalesOrderStatus</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 \n       --the following line was added for version 2.3:\n       (select uom_name from uom where uom_id = coitem_qty_uom_id) AS uom_orderuom,\n       coitem_linenumber,\n       item_number, item_descrip1,\n       item_descrip2,\n       warehous_code,\n       formatQty(coitem_qtyord) AS qtyord,\n       formatQty(coitem_qtyshipped) AS qtyship,\n       formatQty(coitem_qtyreturned) AS qtyret,\n       formatQty(SUM(COALESCE(shipitem_qty, 0))) AS qtyinvcd,\n       formatQty(noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned)) AS f_balance,\n       CASE WHEN (coitem_status='C') THEN\n                ( formatDate(coitem_closedate) || ' (' || coitem_close_username || ')' )\n            ELSE ''\n       END AS f_dateuser,\n       CASE WHEN (coitem_order_id=-1) THEN ''\n            WHEN (coitem_order_type='W') THEN\n                ( SELECT (formatWoNumber(wo_id) || '/' || wo_status)\n                    FROM wo\n                   WHERE (wo_id=coitem_order_id) )\n            ELSE ''\n       END AS f_childord\n  FROM itemsite, item, whsinfo, coitem LEFT OUTER JOIN\n       shipitem ON (shipitem_orderitem_id=coitem_id\n              AND shipitem_invcitem_id IS NOT NULL)  \n WHERE ((coitem_itemsite_id=itemsite_id)\n   AND (coitem_status&lt;>'X')\n   AND (itemsite_item_id=item_id)\n   AND (itemsite_warehous_id=warehous_id)\n   AND (coitem_cohead_id=&lt;? value("sohead_id") ?>)\n)\nGROUP BY uom_orderuom,\n         coitem_id, coitem_linenumber, item_number,\n         item_descrip1, item_descrip2, warehous_code,\n         coitem_qtyord, coitem_qtyshipped, coitem_status,\n         coitem_closedate, coitem_close_username,\n         coitem_qtyreturned, coitem_order_id,\n         coitem_order_type\nORDER BY coitem_linenumber;</sql>\n </querysource>\n <querysource>\n  <name>head</name>\n  <sql>SELECT cohead_number,\n       formatDate(cohead_orderdate) AS orderdate,\n       cohead_custponumber,\n       cust_name, cntct_phone AS cust_phone\n  FROM cohead, custinfo, cntct\n WHERE ((cohead_cust_id=cust_id)\n   AND (cust_cntct_id=cntct_id)\n   AND (cohead_id=&lt;? value("sohead_id") ?>)\n);</sql>\n </querysource>\n <querysource>\n  <name>lastupdated</name>\n  <sql>SELECT formatDate(MAX(lastupdated)) AS f_lastupdated\n  FROM (SELECT cohead_lastupdated AS lastupdated\n          FROM cohead\n         WHERE (cohead_id=:sohead_id)\n         UNION\n        SELECT coitem_lastupdated AS lastupdated\n          FROM coitem\n         WHERE (coitem_cohead_id=&lt;? value("sohead_id") ?>) ) AS data;</sql>\n </querysource>\n <rpthead>\n  <height>224</height>\n  <label>\n   <rect>\n    <x>35</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>Description</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>S/O #:</string>\n  </label>\n  <label>\n   <rect>\n    <x>469</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   <right/>\n   <vcenter/>\n   <string>Qty. Invoiced</string>\n  </label>\n  <label>\n   <rect>\n    <x>350</x>\n    <y>95</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>Customer Phone:</string>\n  </label>\n  <label>\n   <rect>\n    <x>385</x>\n    <y>5</y>\n    <width>355</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>Sales Order Status</string>\n  </label>\n  <label>\n   <rect>\n    <x>204</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>UOM</string>\n  </label>\n  <label>\n   <rect>\n    <x>550</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   <hcenter/>\n   <vcenter/>\n   <string>Balance</string>\n  </label>\n  <label>\n   <rect>\n    <x>350</x>\n    <y>112</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>P/O #:</string>\n  </label>\n  <label>\n   <rect>\n    <x>645</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   <hcenter/>\n   <vcenter/>\n   <string>Child Ord./Status</string>\n  </label>\n  <label>\n   <rect>\n    <x>165</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>Site</string>\n  </label>\n  <label>\n   <rect>\n    <x>390</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   <right/>\n   <vcenter/>\n   <string>Qty. Returned</string>\n  </label>\n  <field>\n   <rect>\n    <x>112</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>orderdate</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>475</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>cust_name</column>\n   </data>\n  </field>\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>10</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>Order Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>350</x>\n    <y>135</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>Last Updated:</string>\n  </label>\n  <field>\n   <rect>\n    <x>475</x>\n    <y>112</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>cohead_custponumber</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>350</x>\n    <y>75</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>Customer Name:</string>\n  </label>\n  <label>\n   <rect>\n    <x>35</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>Item Number</string>\n  </label>\n  <field>\n   <rect>\n    <x>475</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>cust_phone</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>475</x>\n    <y>135</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>lastupdated</query>\n    <column>f_lastupdated</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>112</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>cohead_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>185</y>\n    <width>25</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>229</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   <right/>\n   <vcenter/>\n   <string>Qty. Ordered</string>\n  </label>\n  <label>\n   <rect>\n    <x>550</x>\n    <y>200</y>\n    <width>100</width>\n    <height>12</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>Close Date (User)</string>\n  </label>\n  <label>\n   <rect>\n    <x>310</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   <right/>\n   <vcenter/>\n   <string>Qty. Shipped</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>35</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>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>160</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>Site</string>\n  </label>\n  <label>\n   <rect>\n    <x>490</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>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Balance/Close Date (User)</string>\n  </label>\n  <label>\n   <rect>\n    <x>250</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>Qty. Ordered</string>\n  </label>\n  <label>\n   <rect>\n    <x>35</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>185</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>UOM</string>\n  </label>\n  <label>\n   <rect>\n    <x>408</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>Qty. Returned</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   <hcenter/>\n   <vcenter/>\n   <string>Qty. Shipped</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>0</y>\n    <width>25</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  <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>645</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>Child Ord./Status</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>54</height>\n   <field>\n    <rect>\n     <x>645</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>f_childord</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>550</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    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_dateuser</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>550</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>f_balance</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>5</x>\n     <y>0</y>\n     <width>25</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>coitem_linenumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>469</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>qtyinvcd</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>35</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>item_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>229</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>qtyord</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>170</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>warehous_code</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>390</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>qtyret</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>35</x>\n     <y>30</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>item_descrip2</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>310</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>qtyship</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>35</x>\n     <y>15</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>item_descrip1</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>200</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    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>uom_orderuom</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>20</height>\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  <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  <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  <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 </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
49	SingleLevelBOM	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Single Level Bill of Materials</title>\n <name>SingleLevelBOM</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, uom_name AS item_invuom, item_descrip1, item_descrip2\nFROM item, uom\nWHERE ((item_id=&lt;? value("item_id") ?>)\nAND (item_inv_uom_id=uom_id));\n    </sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT bomitem_seqnumber, item_number,\n       invuom.uom_name AS invuomname, issueuom.uom_name AS issueuomname,\n       item_descrip1, item_descrip2,\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       formatQty(bomitem_qtyfxd) AS issueqtyfxd,\n       formatQty(itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, bomitem_qtyfxd)) AS invqtyfxd,\n       formatQtyPer(bomitem_qtyper) AS issueqtyper,\n       formatQtyPer(itemuomtouom(bomitem_item_id, bomitem_uom_id, NULL, bomitem_qtyper)) AS invqtyper,\n       formatScrap(bomitem_scrap) AS scrap,\n       formatQtyPer((bomitem_qtyfxd + bomitem_qtyper) * (1 + bomitem_scrap)) AS qtyreq,\n       formatDate(bomitem_effective, &lt;? value("always") ?>) AS effective,\n       formatDate(bomitem_expires, &lt;? value("never") ?>) AS expires,\n       bomitem_ecn\n&lt;? if exists("revision_id") ?>\n  FROM bomitem(&lt;? value("item_id") ?>,&lt;? value("revision_id") ?>)\n&lt;? else ?>\n  FROM bomitem(&lt;? value("item_id") ?>)\n&lt;? endif ?>\n, item, uom AS issueuom, uom AS invuom\nWHERE ((bomitem_item_id=item_id)\nAND (item_inv_uom_id=invuom.uom_id)\nAND (bomitem_uom_id=issueuom.uom_id)\n&lt;? if exists("expiredDays") ?>\n AND (bomitem_expires > (CURRENT_DATE - &lt;? value("expiredDays") ?>))\n&lt;? else ?>\n AND (bomitem_expires > CURRENT_DATE)\n&lt;? endif ?>\n\n&lt;? if exists("effectiveDays") ?>\n AND (bomitem_effective &lt;= (CURRENT_DATE + &lt;? value("effectiveDays") ?>))\n&lt;? else ?>\n AND (bomitem_effective &lt;= CURRENT_DATE)\n&lt;? endif ?>\n\n)\nORDER BY bomitem_seqnumber, bomitem_effective;\n</sql>\n </querysource>\n <querysource>\n  <name>bomhead</name>\n  <sql>SELECT bomhead_docnum, bomhead_revision,\n       formatDate(bomhead_revisiondate) AS f_revisiondate\nFROM bomhead\nWHERE ((bomhead_item_id=&lt;? value("item_id") ?>)\n&lt;? if exists("revision_id") ?>\nAND (bomhead_rev_id=&lt;? value("revision_id") ?>)\n&lt;? else ?>\nAND (bomhead_rev_id=getActiveRevId('BOM',&lt;? value("item_id") ?>))\n&lt;? endif ?>\n);</sql>\n </querysource>\n <rpthead>\n  <height>208</height>\n  <label>\n   <rect>\n    <x>600</x>\n    <y>175</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>Effective</string>\n  </label>\n  <label>\n   <rect>\n    <x>395</x>\n    <y>176</y>\n    <width>55</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 UOM</string>\n  </label>\n  <field>\n   <rect>\n    <x>120</x>\n    <y>110</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>35</x>\n    <y>90</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>70</x>\n    <y>190</y>\n    <width>130</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>15</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   <hcenter/>\n   <vcenter/>\n   <string>Seq. #</string>\n  </label>\n  <label>\n   <rect>\n    <x>470</x>\n    <y>186</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   <left/>\n   <vcenter/>\n   <string>ECN #</string>\n  </label>\n  <field>\n   <rect>\n    <x>482</x>\n    <y>130</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>675</x>\n    <y>186</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>525</x>\n    <y>175</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>380</x>\n    <y>90</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>Document #:</string>\n  </label>\n  <label>\n   <rect>\n    <x>380</x>\n    <y>110</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>Revision Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>675</x>\n    <y>175</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>Expires</string>\n  </label>\n  <label>\n   <rect>\n    <x>70</x>\n    <y>175</y>\n    <width>227</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  <field>\n   <rect>\n    <x>120</x>\n    <y>90</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>600</x>\n    <y>186</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>442</x>\n    <y>175</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>380</x>\n    <y>130</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>Revision:</string>\n  </label>\n  <field>\n   <rect>\n    <x>482</x>\n    <y>110</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  <field>\n   <rect>\n    <x>482</x>\n    <y>90</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>320</x>\n    <y>186</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>Inv. Qty. Per</string>\n  </label>\n  <label>\n   <rect>\n    <x>375</x>\n    <y>16</y>\n    <width>350</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>Single Level Bill of Materials</string>\n  </label>\n  <field>\n   <rect>\n    <x>120</x>\n    <y>130</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  <line>\n   <xstart>5</xstart>\n   <ystart>202</ystart>\n   <xend>745</xend>\n   <yend>202</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>320</x>\n    <y>176</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 Qty. Per</string>\n  </label>\n  <label>\n   <rect>\n    <x>395</x>\n    <y>186</y>\n    <width>55</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>Inv. UOM</string>\n  </label>\n  <label>\n   <rect>\n    <x>235</x>\n    <y>176</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 Fxd. Qty.</string>\n  </label>\n  <label>\n   <rect>\n    <x>235</x>\n    <y>186</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>Inv. Fxd. Qty.</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>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>Expires</string>\n  </label>\n  <label>\n   <rect>\n    <x>470</x>\n    <y>13</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   <left/>\n   <vcenter/>\n   <string>ECN #</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</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>600</x>\n    <y>13</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>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>Effective</string>\n  </label>\n  <label>\n   <rect>\n    <x>525</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>400</x>\n    <y>13</y>\n    <width>55</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>Inv. UOM</string>\n  </label>\n  <label>\n   <rect>\n    <x>675</x>\n    <y>13</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>442</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>70</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>Component Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>70</x>\n    <y>15</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 Description</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>320</x>\n    <y>13</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>Inv. Qty. Per</string>\n  </label>\n  <label>\n   <rect>\n    <x>320</x>\n    <y>-2</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 Qty. Per</string>\n  </label>\n  <label>\n   <rect>\n    <x>400</x>\n    <y>-2</y>\n    <width>55</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 UOM</string>\n  </label>\n  <label>\n   <rect>\n    <x>250</x>\n    <y>-2</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 Fxd. Qty.</string>\n  </label>\n  <label>\n   <rect>\n    <x>250</x>\n    <y>13</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>Inv. 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>57</height>\n   <field>\n    <rect>\n     <x>405</x>\n     <y>18</y>\n     <width>37</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>invuomname</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>675</x>\n     <y>18</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>675</x>\n     <y>3</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>expires</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>440</x>\n     <y>3</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>15</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>315</x>\n     <y>33</y>\n     <width>227</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>315</x>\n     <y>18</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>invqtyper</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>70</x>\n     <y>0</y>\n     <width>115</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   <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>600</x>\n     <y>3</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>effective</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>455</x>\n     <y>18</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>bomitem_ecn</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>525</x>\n     <y>3</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   <field>\n    <rect>\n     <x>600</x>\n     <y>18</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>70</x>\n     <y>33</y>\n     <width>227</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>315</x>\n     <y>3</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>issueqtyper</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>405</x>\n     <y>3</y>\n     <width>37</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>issueuomname</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>235</x>\n     <y>3</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>issueqtyfxd</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>235</x>\n     <y>18</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>invqtyfxd</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>21</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
52	SingleLevelWhereUsed	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Single Level Where Used</title>\n <name>SingleLevelWhereUsed</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       &lt;? if exists("effective") ?>\n         formatDate(&lt;? value("effective") ?>)\n       &lt;? else ?>\n         text('Now')\n       &lt;? endif ?>\n       AS effective\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 loadFromDb="true">\n  <name>detail</name>\n  <mqlgroup>whereUsed</mqlgroup>\n  <mqlname>detail</mqlname>\n </querysource>\n <rpthead>\n  <height>241</height>\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>Single Level Where Used</string>\n  </label>\n  <label>\n   <rect>\n    <x>525</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  <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  <line>\n   <xstart>5</xstart>\n   <ystart>235</ystart>\n   <xend>745</xend>\n   <yend>235</yend>\n   <weight>2</weight>\n  </line>\n  <field>\n   <rect>\n    <x>114</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>445</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>7</x>\n    <y>120</y>\n    <width>108</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>Component Item:</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>200</y>\n    <width>65</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>300</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  <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>Expires</string>\n  </label>\n  <label>\n   <rect>\n    <x>75</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  <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>Effective</string>\n  </label>\n  <field>\n   <rect>\n    <x>450</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>effective</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>114</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>75</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>Parent Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>400</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  <field>\n   <rect>\n    <x>114</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>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>340</x>\n    <y>120</y>\n    <width>108</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>Effective:</string>\n  </label>\n  <field>\n   <rect>\n    <x>450</x>\n    <y>138</y>\n    <width>185</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>340</x>\n    <y>138</y>\n    <width>108</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>300</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>41</height>\n  <label>\n   <rect>\n    <x>300</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>75</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>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  <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>Effective</string>\n  </label>\n  <label>\n   <rect>\n    <x>400</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  <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>445</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>525</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>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>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>Expires</string>\n  </label>\n  <label>\n   <rect>\n    <x>75</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>Parent Item Number</string>\n  </label>\n  <label>\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>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Seq. #</string>\n  </label>\n  <label>\n   <rect>\n    <x>300</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>56</height>\n   <field>\n    <rect>\n     <x>444</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>f_scrap</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>75</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>75</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>404</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>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>f_issuemethod</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    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_expires</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>75</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   <line>\n    <xstart>4</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>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    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>bomitem_seqnumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>525</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>f_qtyreq</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>f_createwo</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>315</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>f_qtyper</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    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_effective</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>315</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>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_qtyfxd</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>16</height>\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  <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 </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
175	SlowMovingInventoryByClassCode	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Slow Moving Inventory By Class Code</title>\n <name>SlowMovingInventoryByClassCode</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\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;classcode_id&quot;) ?>\n         (SELECT (classcode_code || '-' || classcode_descrip)\n            FROM classcode\n           WHERE (classcode_id=&lt;? value(&quot;classcode_id&quot;) ?>) )\n       &lt;? elseif exists(&quot;classcode_pattern&quot;) ?>\n         text(&lt;? value(&quot;classcode_pattern&quot;) ?>)\n       &lt;? else ?>\n         text('All Class Codes')\n       &lt;? endif ?>\n       AS classcode,\n       &lt;? if exists(&quot;showValue&quot;) ?>\n           &lt;? if exists(&quot;useActualCosts&quot;) ?>\n             text('Show Inventory Value with Actual Costs')\n           &lt;? else ?>\n             text('Show Inventory Value with Standard Costs')\n           &lt;? endif ?>\n           AS showvalues,\n           text('Unit Cost') AS f_unitcost,\n           text('Value') AS f_value,\n       &lt;? else ?>\n           text('') AS showvalues,\n           text('') AS f_unitcost,\n           text('') AS f_value,\n       &lt;? endif ?>\n       formatDate(&lt;? value(&quot;cutoffDate&quot;) ?>) AS f_cutoff;</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT warehous_code,\n       item_number,\n       item_descrip1,\n       item_descrip2,\n       uom_name,\n       formatQty(itemsite_qtyonhand) AS f_qoh,\n       formatDate(itemsite_datelastused) AS f_datelastused,\n       &lt;? if exists(&quot;showValue&quot;) ?>\n         formatCost(cost)\n       &lt;? else ?>\n         text('')\n       &lt;? endif ?>\n       AS f_unitcost,\n       noNeg(cost * itemsite_qtyonhand) AS value,\n       &lt;? if exists(&quot;showValue&quot;) ?>\n         formatExtPrice(noNeg(cost * itemsite_qtyonhand))\n       &lt;? else ?>\n         text('')\n       &lt;? endif ?>\n       AS f_value\n  FROM ( SELECT itemsite_id,\n                warehous_code,\n                item_number,\n                item_descrip1,\n                item_descrip2, uom_name,\n                itemsite_qtyonhand,\n                itemsite_datelastused,\n                &lt;? if exists(&quot;useActualCosts&quot;) ?>\n                  actcost(itemsite_item_id)\n                &lt;? else ?>\n                  stdcost(itemsite_item_id)\n                &lt;? endif ?>\n                AS cost\n           FROM itemsite, item, whsinfo, uom\n          WHERE ((itemsite_item_id=item_id)\n            AND (item_inv_uom_id=uom_id)\n            AND (itemsite_warehous_id=warehous_id)\n            AND (itemsite_active)\n            AND (itemsite_datelastused &lt; &lt;? value(&quot;cutoffDate&quot;) ?>)\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;classcode_id&quot;) ?>\n            AND (item_classcode_id=&lt;? value(&quot;classcode_id&quot;) ?>)\n&lt;? elseif exists(&quot;classcode_pattern&quot;) ?>\n            AND (item_classcode_id IN (SELECT classcode_id\n                                         FROM classcode\n                                        WHERE classcode_code ~ &lt;? value(&quot;classcode_pattern&quot;) ?>) )\n&lt;? endif ?>\n                )\n       ) AS data\nORDER BY warehous_code,\n&lt;? if exists(&quot;orderByInventoryValue&quot;) ?>\n  value DESC\n&lt;? elseif exists(&quot;orderByDateLastUsed&quot;) ?>\n  itemsite_datelastused\n&lt;? else ?>\n  item_number\n&lt;? endif ?></sql>\n </querysource>\n <rpthead>\n  <height>236</height>\n  <field>\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   <right/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_unitcost</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>130</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>head</query>\n    <column>warehouse</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>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>QOH</string>\n  </label>\n  <label>\n   <rect>\n    <x>229</x>\n    <y>10</y>\n    <width>495</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>Slow Moving Inventory By Class Code</string>\n  </label>\n  <label>\n   <rect>\n    <x>375</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>Last Movement</string>\n  </label>\n  <label>\n   <rect>\n    <x>105</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  <label>\n   <rect>\n    <x>105</x>\n    <y>200</y>\n    <width>150</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>25</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>Site</string>\n  </label>\n  <field>\n   <rect>\n    <x>440</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>showvalues</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>265</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>UOM</string>\n  </label>\n  <label>\n   <rect>\n    <x>45</x>\n    <y>140</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>Site:</string>\n  </label>\n  <field>\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   <right/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_value</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>434</x>\n    <y>120</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>Cutoff Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>120</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>Class Code(s):</string>\n  </label>\n  <field>\n   <rect>\n    <x>130</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>classcode</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>540</x>\n    <y>120</y>\n    <width>195</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_cutoff</column>\n   </data>\n  </field>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>41</height>\n  <label>\n   <rect>\n    <x>490</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>QOH</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>35</ystart>\n   <xend>745</xend>\n   <yend>34</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>265</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>UOM</string>\n  </label>\n  <label>\n   <rect>\n    <x>25</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>Site</string>\n  </label>\n  <label>\n   <rect>\n    <x>105</x>\n    <y>5</y>\n    <width>150</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>660</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   <right/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_value</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>375</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>Last Movement</string>\n  </label>\n  <field>\n   <rect>\n    <x>575</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   <right/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_unitcost</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>105</x>\n    <y>20</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 </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>51</height>\n   <field>\n    <rect>\n     <x>380</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_datelastused</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>105</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>item_number</column>\n    </data>\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>f_value</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>105</x>\n     <y>15</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>item_descrip1</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>25</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>warehous_code</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>f_qoh</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>105</x>\n     <y>30</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>item_descrip2</column>\n    </data>\n   </field>\n   <field>\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>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>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>f_unitcost</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>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 </pgfoot>\n <rptfoot>\n  <height>16</height>\n </rptfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
19	SubstituteAvailabilityByRootItem	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Substitue Availability By Root Item</title>\n <name>SubstituteAvailabilityByRootItem</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;warehous_id&quot;) ?>\n         ( SELECT warehous_code\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  FROM item\n WHERE (item_id=&lt;? value(&quot;item_id&quot;) ?>);</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT warehous_code,\n       item_number,\n       item_descrip1,\n       item_descrip2,\n       formatQty(qtyAvailable(sub.itemsite_id)) AS f_qtyonhand,\n       formatQty(CASE WHEN(sub.itemsite_useparams) THEN sub.itemsite_reorderlevel ELSE 0.0 END) AS f_reorderlevel,\n       sub.itemsite_leadtime as leadtime,\n&lt;? if exists(&quot;byDays&quot;) ?>\n       formatQty(qtyAllocated(sub.itemsite_id, &lt;? value(&quot;byDays&quot;) ?>)) AS f_allocated,\n       formatQty(qtyOrdered(sub.itemsite_id, &lt;? value(&quot;byDays&quot;) ?>)) AS f_ordered,\n       formatQty(qtyAvailable(sub.itemsite_id) + qtyOrdered(sub.itemsite_id, &lt;? value(&quot;byDays&quot;) ?>) - qtyAllocated(sub.itemsite_id, &lt;? value(&quot;byDays&quot;) ?>)) as f_avail\n&lt;? elseif exists(&quot;byDate&quot;) ?>\n       formatQty(qtyAllocated(sub.itemsite_id, (&lt;? value(&quot;byDate&quot;) ?> - CURRENT_DATE))) AS f_allocated,\n       formatQty(qtyOrdered(sub.itemsite_id, (&lt;? value(&quot;byDate&quot;) ?> - CURRENT_DATE))) AS f_ordered,\n       formatQty(qtyAvailable(sub.itemsite_id) + qtyOrdered(sub.itemsite_id, (&lt;? value(&quot;byDate&quot;) ?> - CURRENT_DATE)) - qtyAllocated(sub.itemsite_id, (&lt;? value(&quot;byDate&quot;) ?> - CURRENT_DATE))) as f_avail\n&lt;? else ?>\n       formatQty(qtyAllocated(sub.itemsite_id, sub.itemsite_leadtime)) AS f_allocated,\n       formatQty(qtyOrdered(sub.itemsite_id, sub.itemsite_leadtime)) AS f_ordered,\n       formatQty(qtyAvailable(sub.itemsite_id) + qtyOrdered(sub.itemsite_id, sub.itemsite_leadtime) - qtyAllocated(sub.itemsite_id, sub.itemsite_leadtime)) as f_avail\n&lt;? endif ?>\n  FROM item, itemsite AS sub, itemsite AS root, whsinfo, itemsub\n WHERE ((sub.itemsite_item_id=item_id)\n   AND (root.itemsite_item_id=itemsub_parent_item_id)\n   AND (sub.itemsite_item_id=itemsub_sub_item_id)\n   AND (root.itemsite_warehous_id=sub.itemsite_warehous_id)\n   AND (sub.itemsite_warehous_id=warehous_id)\n   AND (root.itemsite_item_id=&lt;? value(&quot;item_id&quot;) ?>)\n&lt;? if exists(&quot;warehous_id&quot;) ?>\n   AND (root.itemsite_warehous_id=&lt;? value(&quot;warehous_id&quot;) ?>)\n&lt;? endif ?>\n)\nORDER BY itemsub_rank;</sql>\n </querysource>\n <rpthead>\n  <height>221</height>\n  <field>\n   <rect>\n    <x>140</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>head</query>\n    <column>warehouse</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>65</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 Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>200</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>LT</string>\n  </label>\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>Substitute Availability By Root Item</string>\n  </label>\n  <field>\n   <rect>\n    <x>140</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>item_descrip1</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>540</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>Reorder Level</string>\n  </label>\n  <field>\n   <rect>\n    <x>140</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>item_descrip2</column>\n   </data>\n  </field>\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>434</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   <hcenter/>\n   <vcenter/>\n   <string>Allocated</string>\n  </label>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>80</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>item_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>645</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   <hcenter/>\n   <vcenter/>\n   <string>Available</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</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>Site</string>\n  </label>\n  <label>\n   <rect>\n    <x>65</x>\n    <y>200</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>Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>330</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   <hcenter/>\n   <vcenter/>\n   <string>QOH</string>\n  </label>\n  <label>\n   <rect>\n    <x>540</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   <hcenter/>\n   <vcenter/>\n   <string>On Order</string>\n  </label>\n  <label>\n   <rect>\n    <x>30</x>\n    <y>140</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>Site:</string>\n  </label>\n  <label>\n   <rect>\n    <x>30</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>Item Number:</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>65</x>\n    <y>20</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>Description</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>434</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   <hcenter/>\n   <vcenter/>\n   <string>Allocated</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>5</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>Site</string>\n  </label>\n  <label>\n   <rect>\n    <x>65</x>\n    <y>5</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 Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>540</x>\n    <y>20</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>Reorder Level</string>\n  </label>\n  <label>\n   <rect>\n    <x>330</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   <hcenter/>\n   <vcenter/>\n   <string>QOH</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>20</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>LT</string>\n  </label>\n  <label>\n   <rect>\n    <x>645</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   <hcenter/>\n   <vcenter/>\n   <string>Available</string>\n  </label>\n  <label>\n   <rect>\n    <x>540</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   <hcenter/>\n   <vcenter/>\n   <string>On Order</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>65</x>\n     <y>30</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>item_descrip2</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>65</x>\n     <y>15</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>item_descrip1</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>10</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>warehous_code</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>330</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    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_qtyonhand</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>10</x>\n     <y>15</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>leadtime</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>645</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    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_avail</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>540</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    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_ordered</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>540</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    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_reorderlevel</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>434</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    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_allocated</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>65</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>item_number</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  </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
420	TaxHistorySummary	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Tax History Summary</title>\n <name>TaxHistorySummary</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("showSales") ?>\n         'Yes'\n       &lt;? else ?>\n         'No'\n       &lt;? endif ?>\n       AS showSales,\n       &lt;? if exists("showPurchases") ?>\n         'Yes'\n       &lt;? else ?>\n         'No'\n       &lt;? endif ?>\n       AS showPurchases,\n       &lt;? value("groupProper") ?> AS group,\n       &lt;? value("groupProper") ?> || ':' AS selectionLit,\n       &lt;? value("selection") ?> AS selection,\n       &lt;? if exists("distDate") ?>\n         text('Distribution Date')\n       &lt;? else ?>\n         text('Document Date')\n       &lt;? endif ?>\n       AS basis,\n       formatDate(&lt;? value("startDate") ?>) AS startdate,\n       formatDate(&lt;? value("endDate") ?>) AS enddate;</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>-----------BEGIN SUMMARY----------\nSELECT &lt;? literal("groupBy") ?> AS group, \n  &lt;? literal("groupBy") ?>_descrip AS description, \n  formatMoney(SUM(salesbase)) AS f_salesbase,\n  formatMoney(SUM(freightbase)) AS f_freightbase, \n  CASE WHEN (SUM(freighttax) > 0) THEN true ELSE false END AS freighttax, \n  SUM(salestaxbase) AS salestaxbase,\n  formatMoney(SUM(salestaxbase)) AS f_salestaxbase,\n  formatMoney(SUM(purchasebase)) AS f_purchasebase,\n  SUM(purchasetaxbase) * -1 AS purchasetaxbase, \n  formatMoney(SUM(purchasetaxbase) * -1) AS f_purchasetaxbase, \n  SUM(salestaxbase) + SUM(purchasetaxbase) AS nettaxbase,\n  formatMoney(SUM(salestaxbase) + SUM(purchasetaxbase)) AS f_nettaxbase\nFROM (\n------------END SUMMARY--------------\n&lt;? if exists("showSales") ?>\n------------BEGIN SALES--------------\n-- All sales tax history including memos \nSELECT \n  taxhist_distdate, \n  tax_code AS tax, tax_descrip,\n  COALESCE(taxtype_name,&lt;? value("none") ?>) AS taxtype, taxtype_descrip,\n  COALESCE(taxclass_code,&lt;? value("none") ?>) AS taxclass, taxclass_descrip,\n  COALESCE(taxauth_code,&lt;? value("none") ?>) AS taxauth, taxauth_name AS taxauth_descrip,\n  COALESCE(taxzone_code,&lt;? value("none") ?>) AS taxzone, taxzone_descrip, curr_abbr, \n  CASE\n    WHEN (cohist_doctype != 'C') THEN\n      cohist_invcnumber\n    ELSE\n      cohist_ordernumber\n  END AS docnumber, \n  &lt;? value("sales") ?> AS source,\n  CASE\n    WHEN (cohist_doctype='I') THEN\n      &lt;? value("invoice") ?>\n    WHEN (cohist_doctype='C') THEN\n      &lt;? value("creditmemo") ?> \n    WHEN (cohist_doctype='D') THEN\n      &lt;? value("debitmemo") ?>\n    ELSE\n      &lt;? value("other") ?>\n  END AS doctype,\n  item_number, COALESCE(item_descrip1,cohist_misc_descrip) AS description,\n  CASE\n    WHEN (cohist_doctype != 'C') THEN\n      cohist_ordernumber \n  END AS ordernumber, cohist_invcdate AS docdate,\n  cohist_billtoname AS name, \n  cohist_qtyshipped AS qty, \n  cohist_unitprice AS unitprice, (cohist_qtyshipped * cohist_unitprice) AS amount,\n  CASE\n    WHEN (cohist_misc_type IS NULL OR cohist_misc_type IN ('M','F')) THEN\n      currToBase(cohist_curr_id, cohist_qtyshipped * cohist_unitprice, cohist_invcdate) \n    ELSE 0\n  END AS salesbase,\n  CASE\n    WHEN (cohist_misc_type = 'F') THEN\n      currToBase(cohist_curr_id, cohist_qtyshipped * cohist_unitprice, cohist_invcdate) \n    ELSE 0\n  END AS freightbase,\n  CASE\n    WHEN (cohist_misc_type = 'F') THEN\n      taxhist_tax / taxhist_curr_rate\n    ELSE 0\n  END AS freighttax,\n  0 AS purchasebase,\n  taxhist_tax AS taxlocal,\n  taxhist_tax / taxhist_curr_rate AS taxbase,\n  taxhist_tax / taxhist_curr_rate AS salestaxbase,\n  0 AS purchasetaxbase\nFROM cohisttax\n JOIN cohist ON (cohist_id=taxhist_parent_id)\n JOIN taxtype ON (taxtype_id=taxhist_taxtype_id)\n JOIN tax ON (tax_id=taxhist_tax_id)\n JOIN curr_symbol ON (curr_id=taxhist_curr_id)\n LEFT OUTER JOIN taxclass ON (tax_taxclass_id=taxclass_id)\n LEFT OUTER JOIN taxauth ON (tax_taxauth_id=taxauth_id)\n LEFT OUTER JOIN taxzone ON (cohist_taxzone_id=taxzone_id)\n LEFT OUTER JOIN itemsite ON (cohist_itemsite_id=itemsite_id)\n LEFT OUTER JOIN item ON (itemsite_item_id=item_id)\n&lt;? if exists("distDate") ?>\nWHERE ((taxhist_distdate BETWEEN &lt;? value("startDate") ?>\n                             AND &lt;? value("endDate") ?>)\n&lt;? else ?>\nWHERE ((taxhist_docdate BETWEEN &lt;? value("startDate") ?>\n                             AND &lt;? value("endDate") ?>)\n&lt;? endif ?>\n&lt;? if exists("tax_id") ?>\n AND (taxhist_tax_id=&lt;? value("tax_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("taxtype_id") ?>\n AND (taxhist_taxtype_id=&lt;? value("taxtype_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("taxclass_id") ?>\n AND (taxclass_id=&lt;? value("taxclass_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("taxauth_id") ?>\n AND (taxauth_id=&lt;? value("taxauth_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("taxzone_id") ?>\n AND (taxzone_id=&lt;? value("taxzone_id") ?>)\n&lt;? endif ?>\n)\n&lt;? endif ?>\n--------------END SALES--------------------\n&lt;? if exists("showPurchases") ?>\n&lt;? if exists("showSales") ?>\n-- Union because sales and purchase shown together\nUNION ALL\n&lt;? endif ?>\n&lt;? endif ?>\n------------BEGIN PURCHASE----------------\n&lt;? if exists("showPurchases") ?>\n-- A/P Memo history\nSELECT \n  taxhist_distdate, \n  tax_code AS tax, tax_descrip,\n  COALESCE(taxtype_name,&lt;? value("none") ?>) AS taxtype, taxtype_descrip,\n  COALESCE(taxclass_code,&lt;? value("none") ?>) AS taxclass, taxclass_descrip,\n  COALESCE(taxauth_code,&lt;? value("none") ?>) AS taxauth, taxauth_name AS taxauth_descrip,\n  &lt;? value("none") ?> AS taxzone,'' AS taxzone_descrip, curr_abbr, \n  apopen_docnumber AS docnumber, \n  &lt;? value("purchase") ?> AS source,\n  CASE\n    WHEN (apopen_doctype='C') THEN\n      &lt;? value("creditmemo") ?> \n    WHEN (apopen_doctype='D') THEN\n      &lt;? value("debitmemo") ?>\n    ELSE\n      &lt;? value("other") ?>\n  END AS doctype,\n  '' AS item_number, apopen_notes AS description,\n  apopen_ponumber AS ordernumber, apopen_docdate AS docdate,\n  vend_name AS name, \n  1 AS qty, \n  apopen_amount AS unitprice, apopen_amount AS amount,\n  0 AS salesbase,\n  0 AS freightbase,\n  0 AS freighttax,\n  apopen_amount / apopen_curr_rate AS purchasebase,\n  taxhist_tax AS taxlocal,\n  taxhist_tax / taxhist_curr_rate AS taxbase,\n  0 AS salestaxbase,\n  taxhist_tax / taxhist_curr_rate AS purchasetaxbase\nFROM apopentax\n JOIN apopen ON (apopen_id=taxhist_parent_id)\n JOIN vendinfo ON (apopen_vend_id=vend_id)\n JOIN taxtype ON (taxtype_id=taxhist_taxtype_id)\n JOIN tax ON (tax_id=taxhist_tax_id)\n JOIN curr_symbol ON (curr_id=taxhist_curr_id)\n LEFT OUTER JOIN taxclass ON (tax_taxclass_id=taxclass_id)\n LEFT OUTER JOIN taxauth ON (tax_taxauth_id=taxauth_id)\n&lt;? if exists("distDate") ?>\nWHERE ((taxhist_distdate BETWEEN &lt;? value("startDate") ?>\n                             AND &lt;? value("endDate") ?>)\n&lt;? else ?>\nWHERE ((taxhist_docdate BETWEEN &lt;? value("startDate") ?>\n                             AND &lt;? value("endDate") ?>)\n&lt;? endif ?>\n&lt;? if exists("tax_id") ?>\n AND (taxhist_tax_id=&lt;? value("tax_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("taxtype_id") ?>\n AND (taxhist_taxtype_id=&lt;? value("taxtype_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("taxclass_id") ?>\n AND (taxclass_id=&lt;? value("taxclass_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("taxauth_id") ?>\n AND (taxauth_id=&lt;? value("taxauth_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("taxzone_id") ?>\n AND (false)\n&lt;? endif ?>\n AND (taxhist_distdate IS NOT NULL)\n)\nUNION ALL\n--Voucher Header History\nSELECT \n  taxhist_distdate, \n  tax_code AS tax, tax_descrip,\n  COALESCE(taxtype_name,&lt;? value("none") ?>) AS taxtype, taxtype_descrip,\n  COALESCE(taxclass_code,&lt;? value("none") ?>) AS taxclass, taxclass_descrip,\n  COALESCE(taxauth_code,&lt;? value("none") ?>) AS taxauth, taxauth_name AS taxauth_descrip,\n  COALESCE(taxzone_code,&lt;? value("none") ?>) AS taxzone, taxzone_descrip, curr_abbr, \n  vohead_number AS docnumber, \n  &lt;? value("purchase") ?> AS source,\n  &lt;? value("voucher") ?>  AS doctype,\n  '', vohead_notes AS description,\n  pohead_number AS ordernumber, vohead_docdate AS docdate,\n  vend_name AS name, \n  1 AS qty, \n  0 AS unitprice, 0 AS amount,\n  0 AS salesbase,\n  0 AS freightbase,\n  0 AS freighttax,\n  0 AS purchasebase,\n  taxhist_tax AS taxlocal,\n  taxhist_tax / taxhist_curr_rate AS taxbase,\n  0 AS salestaxbase,\n  taxhist_tax / taxhist_curr_rate AS purchasetaxbase\nFROM voheadtax\n JOIN vohead ON (vohead_id=taxhist_parent_id)\n LEFT OUTER JOIN pohead ON (vohead_pohead_id=pohead_id)\n JOIN vendinfo ON (vohead_vend_id=vend_id)\n JOIN taxtype ON (taxtype_id=taxhist_taxtype_id)\n JOIN tax ON (tax_id=taxhist_tax_id)\n JOIN curr_symbol ON (curr_id=taxhist_curr_id)\n LEFT OUTER JOIN taxclass ON (tax_taxclass_id=taxclass_id)\n LEFT OUTER JOIN taxauth ON (tax_taxauth_id=taxauth_id)\n LEFT OUTER JOIN taxzone ON (vohead_taxzone_id=taxzone_id)\n&lt;? if exists("distDate") ?>\nWHERE ((taxhist_distdate BETWEEN &lt;? value("startDate") ?>\n                             AND &lt;? value("endDate") ?>)\n&lt;? else ?>\nWHERE ((taxhist_docdate BETWEEN &lt;? value("startDate") ?>\n                             AND &lt;? value("endDate") ?>)\n&lt;? endif ?>\n&lt;? if exists("tax_id") ?>\n AND (taxhist_tax_id=&lt;? value("tax_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("taxtype_id") ?>\n AND (taxhist_taxtype_id=&lt;? value("taxtype_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("taxclass_id") ?>\n AND (_taxclass_id=&lt;? value("taxclass_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("taxauth_id") ?>\n AND (taxauth_id=&lt;? value("taxauth_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("taxzone_id") ?>\n AND (taxzone_id=&lt;? value("taxzone_id") ?>)\n&lt;? endif ?>\n AND (taxhist_distdate IS NOT NULL)\n)\nUNION ALL\n--Voucher Line Item\nSELECT \n  taxhist_distdate, \n  tax_code AS tax, tax_descrip,\n  COALESCE(taxtype_name,&lt;? value("none") ?>) AS taxtype, taxtype_descrip,\n  COALESCE(taxclass_code,&lt;? value("none") ?>) AS taxclass, taxclass_descrip,\n  COALESCE(taxauth_code,&lt;? value("none") ?>) AS taxauth, taxauth_name AS taxauth_descrip,\n  COALESCE(taxzone_code,&lt;? value("none") ?>) AS taxzone, taxzone_descrip, curr_abbr, \n  vohead_number AS docnumber, \n  &lt;? value("purchase") ?> AS source,\n  &lt;? value("voucher") ?>  AS doctype,\n  COALESCE(item_number,expcat_code), COALESCE(item_descrip1,expcat_descrip) AS description,\n  pohead_number AS ordernumber, vohead_docdate AS docdate,\n  vend_name AS name, \n  voitem_qty AS qty, \n  COALESCE(SUM(vodist_amount),0)/voitem_qty AS unitprice, COALESCE(SUM(vodist_amount),0) AS amount,\n  0 AS salesbase,\n  0 AS freightbase,\n  0 AS freighttax,\n  currToBase(vohead_curr_id, COALESCE(SUM(vodist_amount),0), vohead_distdate)  AS purchasebase,\n  taxhist_tax AS taxlocal,\n  taxhist_tax / taxhist_curr_rate AS taxbase,\n  0 AS salestaxbase,\n  taxhist_tax / taxhist_curr_rate AS purchasetaxbase\nFROM voitemtax\n JOIN voitem ON (voitem_id=taxhist_parent_id)\n JOIN vohead ON (vohead_id=voitem_vohead_id)\n JOIN pohead ON (vohead_pohead_id=pohead_id)\n JOIN poitem ON (voitem_poitem_id=poitem_id)\n JOIN vodist ON ((vodist_poitem_id=poitem_id)\n            AND  (vodist_vohead_id=vohead_id))\n JOIN vendinfo ON (vohead_vend_id=vend_id)\n JOIN taxtype ON (taxtype_id=taxhist_taxtype_id)\n JOIN tax ON (tax_id=taxhist_tax_id)\n JOIN curr_symbol ON (curr_id=taxhist_curr_id)\n LEFT OUTER JOIN taxclass ON (tax_taxclass_id=taxclass_id)\n LEFT OUTER JOIN taxauth ON (tax_taxauth_id=taxauth_id)\n LEFT OUTER JOIN taxzone ON (vohead_taxzone_id=taxzone_id)\n LEFT OUTER JOIN itemsite ON (poitem_itemsite_id=itemsite_id)\n LEFT OUTER JOIN item ON (itemsite_item_id=item_id)\n LEFT OUTER JOIN expcat ON (expcat_id=poitem_expcat_id)\n&lt;? if exists("distDate") ?>\nWHERE ((taxhist_distdate BETWEEN &lt;? value("startDate") ?>\n                             AND &lt;? value("endDate") ?>)\n&lt;? else ?>\nWHERE ((taxhist_docdate BETWEEN &lt;? value("startDate") ?>\n                             AND &lt;? value("endDate") ?>)\n&lt;? endif ?>\n&lt;? if exists("tax_id") ?>\n AND (taxhist_tax_id=&lt;? value("tax_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("taxtype_id") ?>\n AND (taxhist_taxtype_id=&lt;? value("taxtype_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("taxclass_id") ?>\n AND (taxclass_id=&lt;? value("taxclass_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("taxauth_id") ?>\n AND (taxauth_id=&lt;? value("taxauth_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("taxzone_id") ?>\n AND (taxzone_id=&lt;? value("taxzone_id") ?>)\n&lt;? endif ?>\n AND (taxhist_distdate IS NOT NULL)\n)\nGROUP BY taxhist_id,taxhist_distdate,tax_code,tax_descrip,\n  taxtype_name,taxtype_descrip,taxclass_code,taxclass_descrip,\n  taxauth_code,taxauth_descrip,taxzone,taxzone_descrip,curr_abbr,\n  vohead_number,pohead_number,item_number,item_descrip1,\n  vohead_curr_id,vohead_distdate,vohead_docdate,vend_name,\n  expcat_code,expcat_descrip,taxhist_tax,taxhist_curr_rate,\n  voitem_qty\n&lt;? endif ?>\n-------------END PURCHASE--------------\nORDER BY docdate DESC, docnumber DESC\n\n) AS data\nGROUP BY &lt;? literal("groupBy") ?>, &lt;? literal("groupBy") ?>_descrip\nORDER BY &lt;? literal("groupBy") ?>\n\n</sql>\n </querysource>\n <rpthead>\n  <height>221</height>\n  <label>\n   <rect>\n    <x>275</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>Tax History Summary</string>\n  </label>\n  <label>\n   <rect>\n    <x>200</x>\n    <y>199</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>Freight</string>\n  </label>\n  <label>\n   <rect>\n    <x>450</x>\n    <y>199</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>Purchases</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>141</x>\n    <y>138</y>\n    <width>230</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>105</x>\n    <y>199</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>Sales</string>\n  </label>\n  <label>\n   <rect>\n    <x>350</x>\n    <y>199</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>Sales Tax</string>\n  </label>\n  <field>\n   <rect>\n    <x>460.577</x>\n    <y>137.571</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>enddate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>300</x>\n    <y>199</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>Taxed</string>\n  </label>\n  <label>\n   <rect>\n    <x>550</x>\n    <y>199</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>Purchase Tax</string>\n  </label>\n  <field>\n   <rect>\n    <x>460.577</x>\n    <y>116.571</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>startdate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>350.577</x>\n    <y>137.571</y>\n    <width>103</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>350.577</x>\n    <y>116.571</y>\n    <width>103</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>350.577</x>\n    <y>95.9618</y>\n    <width>103</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>Basis:</string>\n  </label>\n  <field>\n   <rect>\n    <x>461</x>\n    <y>96</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>basis</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>28.5</x>\n    <y>97</y>\n    <width>103</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>Purchases:</string>\n  </label>\n  <field>\n   <rect>\n    <x>141</x>\n    <y>117</y>\n    <width>230</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>group</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>65.6</x>\n    <y>138</y>\n    <width>65.9</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>head</query>\n    <column>selectionLit</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>4</x>\n    <y>199</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   <data>\n    <query>detail</query>\n    <column>group</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>652</x>\n    <y>199</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>Net Tax</string>\n  </label>\n  <label>\n   <rect>\n    <x>277</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   <hcenter/>\n   <vcenter/>\n   <string>Freight</string>\n  </label>\n  <field>\n   <rect>\n    <x>141</x>\n    <y>97</y>\n    <width>230</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>showPurchases</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>28.5</x>\n    <y>76</y>\n    <width>103</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>Sales:</string>\n  </label>\n  <field>\n   <rect>\n    <x>141</x>\n    <y>76</y>\n    <width>230</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>showSales</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>28.5</x>\n    <y>117</y>\n    <width>103</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>Type:</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>200</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   <hcenter/>\n   <vcenter/>\n   <string>Freight</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>300</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>Taxed</string>\n  </label>\n  <label>\n   <rect>\n    <x>350</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   <hcenter/>\n   <vcenter/>\n   <string>Sales Tax</string>\n  </label>\n  <label>\n   <rect>\n    <x>550</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   <hcenter/>\n   <vcenter/>\n   <string>Purchase Tax</string>\n  </label>\n  <label>\n   <rect>\n    <x>450</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>Purchase</string>\n  </label>\n  <label>\n   <rect>\n    <x>100</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   <hcenter/>\n   <vcenter/>\n   <string>Sales</string>\n  </label>\n  <field>\n   <rect>\n    <x>0</x>\n    <y>2</y>\n    <width>100</width>\n    <height>20</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>group</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>649</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   <hcenter/>\n   <vcenter/>\n   <string>Net Tax</string>\n  </label>\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>200</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    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_freightbase</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>100</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    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_salesbase</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>550</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    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_purchasetaxbase</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>450</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    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_purchasebase</column>\n    </data>\n   </field>\n   <field>\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>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>group</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>350</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    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_salestaxbase</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>300</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>freighttax</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>650</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    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_nettaxbase</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>16</height>\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>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 <rptfoot>\n  <height>20</height>\n  <field>\n   <rect>\n    <x>650</x>\n    <y>3</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>nettaxbase</column>\n   </data>\n   <tracktotal builtin="true" >money</tracktotal>\n  </field>\n  <field>\n   <rect>\n    <x>350</x>\n    <y>3</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>salestaxbase</column>\n   </data>\n   <tracktotal builtin="true" >qty</tracktotal>\n  </field>\n  <field>\n   <rect>\n    <x>551</x>\n    <y>3</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>purchasetaxbase</column>\n   </data>\n   <tracktotal builtin="true" >money</tracktotal>\n  </field>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>3</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   <string>Total:</string>\n  </label>\n </rptfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
159	UninvoicedReceipts	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Uninvoiced Receipts</title>\n <name>UninvoicedReceipts</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("warehous_id") ?>&#xd;\n         ( SELECT warehous_code&#xd;\n             FROM whsinfo&#xd;\n            WHERE (warehous_id=&lt;? value("warehous_id") ?>) )&#xd;\n       &lt;? else ?>&#xd;\n         text('All Sites')&#xd;\n       &lt;? endif ?>&#xd;\n       AS warehouse,&#xd;\n       &lt;? if exists("agentUsername") ?>&#xd;\n       TEXT(&lt;? value("agentUsername" ?>)&#xd;\n       &lt;? else ?>&#xd;\n       TEXT('All Agents')&#xd;\n       &lt;? endif ?>&#xd;\n       AS agentUsername;&#xd;\n</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT recv_id,\n       formatDate(recv_date) as f_date,\n       recv_trans_usr_name as f_user,\n       recv_order_number AS f_ponumber, poitem_linenumber,\n       vend_name, \n       COALESCE(item_number, ('Misc. - ' || recv_vend_item_number)) AS item_number,\n       formatQty(recv_qty) as f_qty,\n       'Receipt' AS f_type,\n       recv_value AS value,\n       formatMoney(recv_value) AS f_value\n  FROM recv\n    LEFT OUTER JOIN itemsite ON (recv_itemsite_id=itemsite_id)\n    LEFT OUTER JOIN item ON (itemsite_item_id=item_id),\n    poitem, vendinfo\n WHERE ((recv_orderitem_id=poitem_id)\n   AND  (recv_order_type='PO')\n   AND  (recv_vend_id=vend_id)\n   AND  (recv_posted)\n   AND  (recv_vohead_id IS NULL)\n   AND  (NOT recv_invoiced)\n&lt;? if exists("warehous_id") ?>\n   AND  (itemsite_warehous_id=&lt;? value("warehous_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("agentUsername") ?>\n   AND  (recv_agent_username=&lt;? value("agentUsername") ?>)\n&lt;? endif ?>\n)\nUNION\nSELECT poreject_id,\n       formatDate(poreject_date) as f_date,\n       poreject_trans_username as f_user,\n       poreject_ponumber AS f_ponumber, poitem_linenumber,\n       vend_name, \n       COALESCE(item_number, ('Misc. - ' || poreject_vend_item_number)) AS item_number,\n       formatQty(poreject_qty) as f_qty,\n       'Return' AS f_type,\n       poreject_value *-1 AS value,\n       formatMoney(poreject_value*-1) AS f_value\n  FROM poreject\n    LEFT OUTER JOIN itemsite ON (poreject_itemsite_id=itemsite_id)\n    LEFT OUTER JOIN item ON (itemsite_item_id=item_id),\n    poitem, vendinfo\n WHERE ((poreject_poitem_id=poitem_id)\n--   AND  (poreject_itemsite_id=itemsite_id)\n--   AND  (itemsite_item_id=item_id)\n   AND  (poreject_vend_id=vend_id)\n   AND  (poreject_posted)\n   AND  (NOT poreject_invoiced)\n&lt;? if exists("warehous_id") ?>\n   AND  (itemsite_warehous_id=&lt;? value("warehous_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("agentUsername") ?>\n   AND  (poreject_agent_username=&lt;? value("agentUsername") ?>)\n&lt;? endif ?>\n)\nORDER BY f_ponumber, poitem_linenumber;</sql>\n </querysource>\n <rpthead>\n  <height>221</height>\n  <label>\n   <rect>\n    <x>175</x>\n    <y>200</y>\n    <width>65</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>145</x>\n    <y>90</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>400</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>Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>85</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>By</string>\n  </label>\n  <label>\n   <rect>\n    <x>590</x>\n    <y>200</y>\n    <width>60</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>Type</string>\n  </label>\n  <label>\n   <rect>\n    <x>50</x>\n    <y>110</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>Purch. Agent:</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>Value</string>\n  </label>\n  <label>\n   <rect>\n    <x>520</x>\n    <y>200</y>\n    <width>60</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>Uninvoiced</string>\n  </label>\n  <label>\n   <rect>\n    <x>290</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  <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>10</x>\n    <y>200</y>\n    <width>70</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>215</x>\n    <y>10</y>\n    <width>509</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>Uninvoiced Receipts and Returns</string>\n  </label>\n  <label>\n   <rect>\n    <x>245</x>\n    <y>200</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>60</x>\n    <y>90</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>Site:</string>\n  </label>\n  <field>\n   <rect>\n    <x>145</x>\n    <y>110</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 </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>29</height>\n  <label>\n   <rect>\n    <x>585</x>\n    <y>5</y>\n    <width>60</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>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>245</x>\n    <y>5</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>85</x>\n    <y>5</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>By</string>\n  </label>\n  <label>\n   <rect>\n    <x>280</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>Vendor</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>5</y>\n    <width>70</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>520</x>\n    <y>5</y>\n    <width>60</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>Uninvoiced</string>\n  </label>\n  <label>\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   <string>Value</string>\n  </label>\n  <label>\n   <rect>\n    <x>170</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>P/O #</string>\n  </label>\n  <label>\n   <rect>\n    <x>405</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>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>18</height>\n   <field>\n    <rect>\n     <x>85</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_user</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>520</x>\n     <y>0</y>\n     <width>60</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>170</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>f_ponumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>285</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>400</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>item_number</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>f_date</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>245</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>poitem_linenumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>590</x>\n     <y>0</y>\n     <width>60</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_type</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>665</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>f_value</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  <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>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 </pgfoot>\n <rptfoot>\n  <height>104</height>\n  <label>\n   <rect>\n    <x>615</x>\n    <y>0</y>\n    <width>37</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>Total:</string>\n  </label>\n  <field>\n   <rect>\n    <x>665</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>value</column>\n   </data>\n   <tracktotal builtin="true" >qty</tracktotal>\n  </field>\n </rptfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
194	WOHistoryByClassCode	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Work Order History By Class Code</title>\n <name>WOHistoryByClassCode</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>workOrderHistory</mqlgroup>\n  <mqlname>detail</mqlname>\n </querysource>\n <querysource>\n  <name>head</name>\n  <sql>SELECT &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       &lt;? if exists("classcode_id") ?>\n         ( SELECT (classcode_code||'-'||classcode_descrip)\n             FROM classcode\n            WHERE (classcode_id=&lt;? value("classcode_id") ?>) )\n       &lt;? elseif exists("classcode_pattern") ?>\n         text(&lt;? value("classcode_pattern") ?>)\n       &lt;? else ?>\n         text('All Class Codes')\n       &lt;? endif ?>\n       AS classcode,\n       &lt;? if exists("showOnlyTopLevel") ?>\n         text('Only Show Top level Work Orders')\n       &lt;? else ?>\n         text('')\n       &lt;? endif ?>\n       AS lbl_toplevel,\n       &lt;? if exists("showCosts") ?>\n         text('Cost')\n       &lt;? else ?>\n         text('')\n       &lt;? endif ?>\n       AS lbl_cost\n;</sql>\n </querysource>\n <rpthead>\n  <height>172</height>\n  <label>\n   <rect>\n    <x>430</x>\n    <y>150</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>Start Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>150</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>W/O #</string>\n  </label>\n  <label>\n   <rect>\n    <x>509</x>\n    <y>150</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>30</x>\n    <y>105</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  <line>\n   <xstart>5</xstart>\n   <ystart>165</ystart>\n   <xend>740</xend>\n   <yend>165</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>30</x>\n    <y>85</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>Class Code(s):</string>\n  </label>\n  <label>\n   <rect>\n    <x>125</x>\n    <y>150</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</string>\n  </label>\n  <label>\n   <rect>\n    <x>350</x>\n    <y>150</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>270</x>\n    <y>150</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>240</x>\n    <y>10</y>\n    <width>484</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>Work Order History By Class Code</string>\n  </label>\n  <label>\n   <rect>\n    <x>45</x>\n    <y>150</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>Status</string>\n  </label>\n  <field>\n   <rect>\n    <x>135</x>\n    <y>85</y>\n    <width>170</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>classcode</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>229</x>\n    <y>150</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  <field>\n   <rect>\n    <x>365</x>\n    <y>85</y>\n    <width>355</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>lbl_toplevel</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>135</x>\n    <y>105</y>\n    <width>170</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>85</x>\n    <y>150</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>665</x>\n    <y>151</y>\n    <width>70</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   <data>\n    <query>head</query>\n    <column>lbl_cost</column>\n   </data>\n  </field>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>7</height>\n </pghead>\n <pghead>\n  <height>32</height>\n  <label>\n   <rect>\n    <x>125</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>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item</string>\n  </label>\n  <label>\n   <rect>\n    <x>509</x>\n    <y>10</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>10</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>Status</string>\n  </label>\n  <label>\n   <rect>\n    <x>85</x>\n    <y>10</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>350</x>\n    <y>10</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>270</x>\n    <y>10</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>25</ystart>\n   <xend>740</xend>\n   <yend>25</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>430</x>\n    <y>10</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>Start Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>229</x>\n    <y>10</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>10</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>W/O #</string>\n  </label>\n  <field>\n   <rect>\n    <x>660</x>\n    <y>8</y>\n    <width>70</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   <data>\n    <query>head</query>\n    <column>lbl_cost</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>52</height>\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    <left/>\n    <vcenter/>\n    <data>\n     <query>Detail</query>\n     <column>wonumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>85</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>509</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_wo_duedate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>45</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>wo_status</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>125</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>item_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>229</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>uom_name</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>125</x>\n     <y>30</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>item_descrip2</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>670</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    <right/>\n    <vcenter/>\n    <data>\n     <query>Detail</query>\n     <column>f_wo_postedvalue</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>270</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_wo_qtyord</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>125</x>\n     <y>15</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>item_descrip1</column>\n    </data>\n   </field>\n   <field>\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>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>Detail</query>\n     <column>f_wo_qtyrcv</column>\n    </data>\n   </field>\n   <line>\n    <xstart>5</xstart>\n    <ystart>45</ystart>\n    <xend>740</xend>\n    <yend>45</yend>\n    <weight>0</weight>\n   </line>\n   <field>\n    <rect>\n     <x>430</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_wo_startdate</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>17</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>95</x>\n    <y>0</y>\n    <width>113</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 </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
357	UnpostedPoReceipts	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Unposted Purchase Order Receipts</title>\n <name>UnpostedPoReceipts</name>\n <description></description>\n <parameter default="" active="true" listtype="static" type="bool" name="MultiWhs" >\n  <description></description>\n </parameter>\n <parameter default="" active="true" listtype="static" type="string" name="na" >\n  <description></description>\n </parameter>\n <parameter default="" active="true" listtype="static" type="string" name="nonInventory" >\n  <description></description>\n </parameter>\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 recv_id, recv_orderitem_id, recv_order_number, recv_order_type,\n       orderhead_from,\n       orderitem_linenumber,\n       formatDate(recv_duedate) AS recv_duedate,\n       warehous_code,\n       COALESCE(item_number, &lt;? value("nonInventory") ?>) AS item_number,\n       COALESCE(uom_name, &lt;? value("na") ?>) AS uom_name,\n       recv_vend_item_number,\n       recv_vend_uom,\n       formatQty(orderitem_qty_ordered)  AS qty_ordered,\n       formatQty(orderitem_qty_received) AS qty_received,\n       formatQty(recv_qty)     AS recv_qty,\n       formatDate(recv_date)   AS recv_date,\n       formatDate(COALESCE(recv_gldistdate, recv_date)) AS recv_gldistdate\nFROM orderhead JOIN\n     orderitem ON ((orderitem_orderhead_id=orderhead_id)\n\t       AND (orderitem_orderhead_type=orderhead_type)) JOIN \n     recv  ON ((recv_orderitem_id=orderitem_id)\n\t   AND (recv_order_type=orderitem_orderhead_type)) LEFT OUTER JOIN\n     (itemsite JOIN item ON (itemsite_item_id=item_id)\n\t       JOIN uom ON (item_inv_uom_id=uom_id)\n               JOIN site() ON (itemsite_warehous_id=warehous_id)\n       )\n      ON (recv_itemsite_id=itemsite_id) LEFT OUTER JOIN\n     vendinfo ON (orderhead_type='PO' AND orderhead_from_id=vend_id)\nWHERE (NOT recv_posted)\nORDER BY orderhead_from, recv_order_number, orderitem_linenumber;\n</sql>\n </querysource>\n <rpthead>\n  <height>76</height>\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>Unposted Purchase Order Receipts</string>\n  </label>\n </rpthead>\n <section>\n  <name>detail</name>\n  <group>\n   <name>ponumber</name>\n   <column>recv_order_number</column>\n   <head>\n    <height>51</height>\n    <label>\n     <rect>\n      <x>130</x>\n      <y>31</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>600</x>\n      <y>31</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>Qty To Receive</string>\n    </label>\n    <label>\n     <rect>\n      <x>285</x>\n      <y>31</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 Item Number</string>\n    </label>\n    <field>\n     <rect>\n      <x>100</x>\n      <y>0</y>\n      <width>27</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>recv_order_type</column>\n     </data>\n    </field>\n    <label>\n     <rect>\n      <x>240</x>\n      <y>31</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     <left/>\n     <vcenter/>\n     <string>UOM</string>\n    </label>\n    <field>\n     <rect>\n      <x>100</x>\n      <y>15</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     <data>\n      <query>detail</query>\n      <column>orderhead_from</column>\n     </data>\n    </field>\n    <label>\n     <rect>\n      <x>440</x>\n      <y>31</y>\n      <width>70</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>Qty Ordered</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     <left/>\n     <vcenter/>\n     <string>Order #:</string>\n    </label>\n    <label>\n     <rect>\n      <x>40</x>\n      <y>31</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>Due Date</string>\n    </label>\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>recv_order_number</column>\n     </data>\n    </field>\n    <label>\n     <rect>\n      <x>0</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     <left/>\n     <vcenter/>\n     <string>Vendor:</string>\n    </label>\n    <label>\n     <rect>\n      <x>520</x>\n      <y>31</y>\n      <width>70</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>Qty Received</string>\n    </label>\n    <label>\n     <rect>\n      <x>0</x>\n      <y>31</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     <right/>\n     <vcenter/>\n     <string>Line #</string>\n    </label>\n    <label>\n     <rect>\n      <x>685</x>\n      <y>31</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>Receipt Date</string>\n    </label>\n    <label>\n     <rect>\n      <x>395</x>\n      <y>31</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     <left/>\n     <vcenter/>\n     <string>UOM</string>\n    </label>\n   </head>\n  </group>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>21</height>\n   <field>\n    <rect>\n     <x>685</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>recv_date</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>130</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    <data>\n     <query>detail</query>\n     <column>item_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>395</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    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>recv_vend_uom</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>0</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    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>orderitem_linenumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>285</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    <data>\n     <query>detail</query>\n     <column>recv_vend_item_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>520</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>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>qty_received</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>40</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>recv_duedate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>240</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    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>uom_name</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>recv_qty</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>440</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>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>qty_ordered</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
358	UnpostedReturnsForPO	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Unposted Returns For Purchase Order</title>\n <name>UnpostedReturnsForPO</name>\n <description></description>\n <size>Letter</size>\n <portrait/>\n <topmargin>100</topmargin>\n <bottommargin>100</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>address</name>\n  <sql>select formatAddr(&lt;? value("addr_id") ?>) AS f_addr;</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT poitem_linenumber,\n       COALESCE(item_number, 'Non-Inventory') AS item_number,\n       COALESCE(uom_name, 'N/A') AS uom_name,\n       poitem_vend_item_number, poitem_vend_uom,\n       formatQty(poitem_qty_ordered)  AS f_poitem_qty_ordered,\n       formatQty(poitem_qty_received) AS f_poitem_qty_received,\n       formatQty(poitem_qty_returned) AS f_poitem_qty_returned,\n       formatQty(SUM(COALESCE(poreject_qty, 0))) AS f_poreject_qty,\n       rjctcode_code\nFROM poreject LEFT OUTER JOIN rjctcode ON (poreject_rjctcode_id=rjctcode_id),\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)\nWHERE ((poreject_poitem_id=poitem_id)\n  AND  (NOT poreject_posted)\n  AND  (poitem_pohead_id=&lt;? value("pohead_id") ?>))\nGROUP BY\n        poitem_linenumber,\n        item_number,\n        uom_name,\n        poitem_vend_item_number,\n        poitem_vend_uom,\n        poitem_qty_ordered,\n        poitem_qty_received,\n        poitem_qty_returned,\n        rjctcode_code\nORDER BY poitem_linenumber;</sql>\n </querysource>\n <querysource>\n  <name>pohead</name>\n  <sql>SELECT *\nFROM pohead, vendinfo\nWHERE ((pohead_vend_id=vend_id)\n  AND  (pohead_id=&lt;? value("pohead_id") ?>));</sql>\n </querysource>\n <querysource>\n  <name>logo</name>\n  <sql>SELECT image_data \nFROM image \nWHERE ((image_name='logo'));</sql>\n </querysource>\n <rpthead>\n  <height>127</height>\n  <label>\n   <rect>\n    <x>290</x>\n    <y>10</y>\n    <width>450</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 Order Returns</string>\n  </label>\n  <image>\n   <rect>\n    <x>5</x>\n    <y>5</y>\n    <width>155</width>\n    <height>95</height>\n   </rect>\n   <mode>stretch</mode>\n   <data>\n    <query>logo</query>\n    <column>image_data</column>\n   </data>\n  </image>\n  <line>\n   <xstart>0</xstart>\n   <ystart>113</ystart>\n   <xend>740</xend>\n   <yend>113</yend>\n   <weight>2</weight>\n  </line>\n </rpthead>\n <section>\n  <name>Address</name>\n  <detail>\n   <key>\n    <query>address</query>\n   </key>\n   <height>23</height>\n   <label>\n    <rect>\n     <x>0</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    <right/>\n    <vcenter/>\n    <string>To:</string>\n   </label>\n   <text>\n    <rect>\n     <x>60</x>\n     <y>0</y>\n     <width>500</width>\n     <height>18</height>\n    </rect>\n    <bottompad>11</bottompad>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <top/>\n    <data>\n     <query>address</query>\n     <column>f_addr</column>\n    </data>\n   </text>\n  </detail>\n </section>\n <section>\n  <name>POHead</name>\n  <detail>\n   <key>\n    <query>pohead</query>\n   </key>\n   <height>107</height>\n   <label>\n    <rect>\n     <x>1</x>\n     <y>80</y>\n     <width>35</width>\n     <height>11</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>Line #</string>\n   </label>\n   <label>\n    <rect>\n     <x>200</x>\n     <y>80</y>\n     <width>100</width>\n     <height>11</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 Item Number</string>\n   </label>\n   <label>\n    <rect>\n     <x>150</x>\n     <y>80</y>\n     <width>40</width>\n     <height>11</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>100</x>\n     <y>41</y>\n     <width>100</width>\n     <height>11</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>pohead</query>\n     <column>vend_number</column>\n    </data>\n   </field>\n   <label>\n    <rect>\n     <x>310</x>\n     <y>80</y>\n     <width>40</width>\n     <height>11</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>40</x>\n     <y>80</y>\n     <width>100</width>\n     <height>11</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>340</x>\n     <y>80</y>\n     <width>100</width>\n     <height>11</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>Qty Received</string>\n   </label>\n   <field>\n    <rect>\n     <x>100</x>\n     <y>30</y>\n     <width>100</width>\n     <height>11</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>pohead</query>\n     <column>pohead_number</column>\n    </data>\n   </field>\n   <line>\n    <xstart>0</xstart>\n    <ystart>95</ystart>\n    <xend>740</xend>\n    <yend>95</yend>\n    <weight>0</weight>\n   </line>\n   <label>\n    <rect>\n     <x>0</x>\n     <y>30</y>\n     <width>100</width>\n     <height>11</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 Order #:</string>\n   </label>\n   <label>\n    <rect>\n     <x>0</x>\n     <y>41</y>\n     <width>100</width>\n     <height>11</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>565</x>\n     <y>80</y>\n     <width>85</width>\n     <height>11</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>Qty To Return</string>\n   </label>\n   <label>\n    <rect>\n     <x>450</x>\n     <y>80</y>\n     <width>100</width>\n     <height>11</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>Previously Returned</string>\n   </label>\n  </detail>\n </section>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>42</height>\n   <field>\n    <rect>\n     <x>355</x>\n     <y>0</y>\n     <width>85</width>\n     <height>11</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_poitem_qty_received</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>200</x>\n     <y>0</y>\n     <width>100</width>\n     <height>11</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>poitem_vend_item_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>570</x>\n     <y>0</y>\n     <width>85</width>\n     <height>11</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_poreject_qty</column>\n    </data>\n   </field>\n   <text>\n    <rect>\n     <x>45</x>\n     <y>15</y>\n     <width>645</width>\n     <height>11</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    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>rjctcode_code</column>\n    </data>\n   </text>\n   <field>\n    <rect>\n     <x>310</x>\n     <y>0</y>\n     <width>40</width>\n     <height>11</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_vend_uom</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>1</x>\n     <y>0</y>\n     <width>35</width>\n     <height>11</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>poitem_linenumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>459</x>\n     <y>0</y>\n     <width>90</width>\n     <height>11</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_poitem_qty_returned</column>\n    </data>\n   </field>\n   <label>\n    <rect>\n     <x>1</x>\n     <y>15</y>\n     <width>60</width>\n     <height>11</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>Reason</string>\n   </label>\n   <field>\n    <rect>\n     <x>150</x>\n     <y>0</y>\n     <width>40</width>\n     <height>11</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>40</x>\n     <y>0</y>\n     <width>100</width>\n     <height>11</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  </detail>\n </section>\n <pgfoot>\n  <height>23</height>\n  <label>\n   <rect>\n    <x>615</x>\n    <y>0</y>\n    <width>85</width>\n    <height>11</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>11</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>11</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>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>700</x>\n    <y>0</y>\n    <width>40</width>\n    <height>11</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>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
236	VendorAPHistory	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Vendor AP History</title>\n <name>VendorAPHistory</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 vend_number,\n       vend_name,\n       formatDate(&lt;? value("startDate") ?>, 'Earliest') AS startdate,\n       formatDate(&lt;? value("endDate") ?>, 'Latest') AS enddate\n  FROM vendinfo\n WHERE (vend_id=&lt;? value("vend_id") ?>);</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT 1 AS type, apopen_id, -1 AS applyid,\n       apopen_docdate AS sortdate, apopen_docnumber AS sortnumber,\n       apopen_docnumber AS docnumber,\n       formatBoolYN(apopen_open) AS f_open,\n       CASE WHEN (apopen_doctype='V') THEN text('Voucher')\n            WHEN (apopen_doctype='C') THEN text('C/M')\n            WHEN (apopen_doctype='D') THEN text('D/M')\n            ELSE text('Other')\n       END AS documenttype,\n       apopen_invcnumber AS invoicenumber,\n       apopen_ponumber AS ponumber,\n       formatDate(apopen_docdate) AS f_docdate,\n       formatDate(apopen_duedate) AS f_duedate,\n       formatMoney(apopen_amount) AS f_amount,\n       formatMoney((apopen_amount - apopen_paid)) AS f_balance\nFROM apopen\nWHERE ( (apopen_vend_id=&lt;? value("vend_id") ?>)\n AND (apopen_docdate BETWEEN &lt;? value("startDate") ?> AND &lt;? value("endDate") ?>) )\n\nUNION\nSELECT 2 AS type, apopen_id, apapply_source_apopen_id AS applyid,\n       apopen_docdate AS sortdate, apopen_docnumber AS sortnumber,\n       apapply_source_docnumber AS docnumber,\n       '' AS f_open,\n       CASE WHEN (apapply_source_doctype='C') THEN text('C/M')\n            WHEN (apapply_source_doctype='K') THEN text('Check')\n            ELSE text('Other')\n       END AS documenttype,\n       '' AS invoicenumber,\n       '' AS ponumber,\n       formatDate(apapply_postdate) AS f_docdate,\n       '' AS f_duedate,\n       formatMoney(apapply_amount) AS f_amount,\n       '' AS f_balance\nFROM apapply, apopen\nWHERE ( (apapply_target_apopen_id=apopen_id)\n AND (apapply_vend_id=&lt;? value("vend_id") ?>)\n AND (apopen_vend_id=&lt;? value("vend_id") ?>)\n AND (apopen_docdate BETWEEN &lt;? value("startDate") ?> AND &lt;? value("endDate") ?>) )\n\nUNION\nSELECT 3 AS type, apopen_id, apapply_target_apopen_id AS applyid,\n       apopen_docdate AS sortdate, apopen_docnumber AS sortnumber,\n       apapply_target_docnumber AS docnumber,\n       '' AS f_open,\n       CASE WHEN (apapply_target_doctype='V') THEN text('Voucher')\n            WHEN (apapply_target_doctype='D') THEN text('D/M')\n            ELSE text('Other')\n       END AS documenttype,\n       apopen_invcnumber AS invoicenumber,\n       '' AS ponumber,\n       formatDate(apapply_postdate) AS f_docdate,\n       '' AS f_duedate,\n       formatMoney(apapply_amount) AS f_amount,\n       '' AS f_balance\nFROM apapply, apopen\nWHERE ( (apapply_source_doctype IN ('C', 'K'))\n AND (apapply_source_doctype=apopen_doctype)\n AND (apapply_source_docnumber=apopen_docnumber)\n AND (apapply_vend_id=&lt;? value("vend_id") ?>)\n AND (apopen_vend_id=&lt;? value("vend_id") ?>)\n AND (apopen_docdate BETWEEN &lt;? value("startDate") ?> AND &lt;? value("endDate") ?>) )\n\nORDER BY sortdate, apopen_id, type;</sql>\n </querysource>\n <rpthead>\n  <height>162</height>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>140</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>Open</string>\n  </label>\n  <field>\n   <rect>\n    <x>550</x>\n    <y>85</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  <field>\n   <rect>\n    <x>95</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>vend_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>400</x>\n    <y>140</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>Doc. Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>650</x>\n    <y>140</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>Balance</string>\n  </label>\n  <label>\n   <rect>\n    <x>570</x>\n    <y>140</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>Amount</string>\n  </label>\n  <label>\n   <rect>\n    <x>444</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>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Start Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>55</x>\n    <y>140</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>Doc. Type</string>\n  </label>\n  <label>\n   <rect>\n    <x>230</x>\n    <y>140</y>\n    <width>70</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>Invoice #</string>\n  </label>\n  <label>\n   <rect>\n    <x>444</x>\n    <y>85</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  <line>\n   <xstart>5</xstart>\n   <ystart>155</ystart>\n   <xend>745</xend>\n   <yend>155</yend>\n   <weight>2</weight>\n  </line>\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>Vendor History</string>\n  </label>\n  <label>\n   <rect>\n    <x>30</x>\n    <y>65</y>\n    <width>60</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>Vendor:</string>\n  </label>\n  <field>\n   <rect>\n    <x>95</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>vend_name</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>145</x>\n    <y>140</y>\n    <width>70</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>Doc. #</string>\n  </label>\n  <field>\n   <rect>\n    <x>550</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>startdate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>485</x>\n    <y>140</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>315</x>\n    <y>140</y>\n    <width>70</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 </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>14</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>370</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>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Doc. Date</string>\n  </label>\n  <label>\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>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Amount</string>\n  </label>\n  <label>\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>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Balance</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</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>Open</string>\n  </label>\n  <label>\n   <rect>\n    <x>465</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>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Due Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>215</x>\n    <y>0</y>\n    <width>112</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>Doc. #</string>\n  </label>\n  <label>\n   <rect>\n    <x>60</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>Doc. Type</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>17</height>\n   <field>\n    <rect>\n     <x>400</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_docdate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>570</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_amount</column>\n    </data>\n   </field>\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    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_balance</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>315</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>ponumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>60</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>documenttype</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>485</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>5</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_open</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>145</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>docnumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>230</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>invoicenumber</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>17</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  <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>104</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 </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
413	VendorInformation	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Vendor Information</title>\n <name>VendorInformation</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 vend_name,      vend_vendtype_id, vend_terms_id,\n       vend_shipvia,   vend_active,      vend_cntct1_id,\n       vend_cntct2_id, crmacct_id, vend_number,\n       MIN(pohead_orderdate) AS minpodate, \n       MAX(pohead_orderdate) AS maxpodate, \n       formatMoney(SUM(currToBase(pohead_curr_id,\n       (poitem_qty_ordered - poitem_qty_received) * poitem_unitprice,\n                              CURRENT_DATE))) AS backlog ,\n       c1.cntct_first_name || ' ' || c1.cntct_last_name AS contact1_name,\n       c1.cntct_phone AS contact1_phone, c1.cntct_phone2 AS contact1_phone, \n       formataddr(a1.addr_id) AS contact1_address,\n       c1.cntct_fax as contact1_fax, c1.cntct_email AS contct1_email,\n       c2.cntct_first_name || ' ' || c2.cntct_last_name AS contact2_name,\n       c2.cntct_phone AS contact2_phone, c2.cntct_phone2 AS contact2_phone, \n       c2.cntct_fax as contact2_fax, c2.cntct_email AS contct2_email,\n       formataddr(a2.addr_id) AS contact2_address,\n       vend_comments\n  FROM vendinfo\n    LEFT OUTER JOIN cntct c1 ON (vend_cntct1_id = c1.cntct_id)\n    LEFT OUTER JOIN addr  a1 ON (c1.cntct_addr_id = a1.addr_id)\n    LEFT OUTER JOIN cntct c2 ON (vend_cntct2_id = c2.cntct_id)\n    LEFT OUTER JOIN addr  a2 ON (c2.cntct_addr_id = a2.addr_id)\n    LEFT OUTER JOIN pohead ON (pohead_vend_id=vend_id)\n    LEFT OUTER JOIN poitem ON (poitem_pohead_id=pohead_id\n                               AND poitem_status='O')\n    JOIN crmacct ON (crmacct_vend_id=vend_id)\n    WHERE (vend_id=&lt;? value("vend_id") ?>) \n    GROUP BY vend_name, vend_vendtype_id, vend_terms_id,\n       vend_shipvia,   vend_active,vend_cntct1_id,\n       vend_cntct2_id, crmacct_id,\n       c1.cntct_first_name, c1.cntct_last_name,\n       c1.cntct_phone, c1.cntct_phone2, \n       a1.addr_id,c1.cntct_fax, c1.cntct_email,\n       c2.cntct_first_name,c2.cntct_last_name ,\n       c2.cntct_phone, c2.cntct_phone2, \n       c2.cntct_fax, c2.cntct_email,a2.addr_id,\n       vend_comments, vend_number;</sql>\n </querysource>\n <querysource>\n  <name>lypurch</name>\n  <sql>SELECT formatMoney(SUM(currToBase(vohead_curr_id,\n                                        vohead_amount,\n                                        vohead_gldistdate))) AS purchases \n                           FROM vohead \n                           WHERE (vohead_posted\n                             AND (vohead_gldistdate \n                                  BETWEEN (DATE_TRUNC('year', CURRENT_DATE) - INTERVAL '1 year')\n                                      AND (DATE_TRUNC('year', CURRENT_DATE) - INTERVAL '1 day'))\n                             AND (vohead_vend_id=&lt;? value("vend_id") ?>));</sql>\n </querysource>\n <querysource>\n  <name>ytdpurch</name>\n  <sql>SELECT formatMoney(SUM(currToBase(vohead_curr_id,\n                                        vohead_amount,\n                                        vohead_gldistdate))) AS purchases \n                           FROM vohead \n                           WHERE (vohead_posted\n                             AND (vohead_gldistdate \n                                  BETWEEN (DATE_TRUNC('year', CURRENT_DATE))\n                                      AND (CURRENT_DATE - INTERVAL '1 day'))\n                             AND (vohead_vend_id=&lt;? value("vend_id") ?>));</sql>\n </querysource>\n <querysource>\n  <name>backlog</name>\n  <sql>SELECT formatMoney( COALESCE( SUM( (noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) * coitem_qty_invuomratio) * (coitem_price / coitem_price_invuomratio) ), 0 ) ) AS backlog FROM cohead, coitem, itemsite, item WHERE ( (coitem_cohead_id=cohead_id) AND (coitem_itemsite_id=itemsite_id) AND (itemsite_item_id=item_id) AND (coitem_status='O') AND (cohead_cust_id=&lt;? value("cust_id") ?>) );</sql>\n </querysource>\n <querysource>\n  <name>OpenBalance</name>\n  <sql>SELECT formatMoney(COALESCE(SUM((apopen_amount-apopen_paid) / apopen_curr_rate * \n                      CASE WHEN (apopen_doctype IN ('D','V')) THEN 1 \n                      ELSE -1 END), 0.0)) AS balance \n                    FROM apopen \n                    WHERE ((apopen_open)\n                       AND (apopen_vend_id=&lt;? value("vend_id") ?>));\n</sql>\n </querysource>\n <querysource>\n  <name>podate</name>\n  <sql>SELECT formatDate(MIN(pohead_orderdate)) AS firstpodate, formatDate(MAX(pohead_orderdate)) AS lastpodate\nFROM pohead\nWHERE (pohead_vend_id=&lt;? value("vend_id") ?>)</sql>\n </querysource>\n <rpthead>\n  <height>392</height>\n  <label>\n   <rect>\n    <x>385</x>\n    <y>260</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>FAX:</string>\n  </label>\n  <text>\n   <rect>\n    <x>105</x>\n    <y>368</y>\n    <width>575</width>\n    <height>15</height>\n   </rect>\n   <bottompad>0</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>head</query>\n    <column>vend_comments</column>\n   </data>\n  </text>\n  <field>\n   <rect>\n    <x>134</x>\n    <y>305</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>podate</query>\n    <column>firstpodate</column>\n   </data>\n  </field>\n  <line>\n   <xstart>370</xstart>\n   <ystart>160</ystart>\n   <xend>370</xend>\n   <yend>295</yend>\n   <weight>0</weight>\n  </line>\n  <line>\n   <xstart>5</xstart>\n   <ystart>155</ystart>\n   <xend>360</xend>\n   <yend>155</yend>\n   <weight>0</weight>\n  </line>\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>Vendor Information</string>\n  </label>\n  <field>\n   <rect>\n    <x>99.8</x>\n    <y>229</y>\n    <width>260</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>contact1_name</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>260</y>\n    <width>260</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>contact1_fax</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>270</x>\n    <y>305</y>\n    <width>120</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>Last Year Purchases:</string>\n  </label>\n  <field>\n   <rect>\n    <x>474</x>\n    <y>229</y>\n    <width>260</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>contact2_name</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>15</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>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Name:</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>325</y>\n    <width>115</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>Last Purchase Date:</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>295</ystart>\n   <xend>740</xend>\n   <yend>295</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>260</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>FAX:</string>\n  </label>\n  <label>\n   <rect>\n    <x>385</x>\n    <y>229</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>Contact Name:</string>\n  </label>\n  <field>\n   <rect>\n    <x>400</x>\n    <y>305</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   <right/>\n   <vcenter/>\n   <data>\n    <query>lypurch</query>\n    <column>purchases</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>475</x>\n    <y>275</y>\n    <width>260</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>contact2_email</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>275</y>\n    <width>260</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>contact1_email</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>475</x>\n    <y>260</y>\n    <width>260</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>contact2_fax</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>245</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>Phone:</string>\n  </label>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>75</y>\n    <width>295</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>290</x>\n    <y>325</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>YTD Purchases:</string>\n  </label>\n  <field>\n   <rect>\n    <x>400</x>\n    <y>325</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   <right/>\n   <vcenter/>\n   <data>\n    <query>ytdpurch</query>\n    <column>purchases</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>1.60714</x>\n    <y>345.214</y>\n    <width>118.393</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>Backlog:</string>\n  </label>\n  <label>\n   <rect>\n    <x>385</x>\n    <y>275</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>Email:</string>\n  </label>\n  <field>\n   <rect>\n    <x>475</x>\n    <y>245</y>\n    <width>260</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>contact2_phone</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>385</x>\n    <y>140</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   <left/>\n   <vcenter/>\n   <string>Contact 2</string>\n  </label>\n  <line>\n   <xstart>380</xstart>\n   <ystart>155</ystart>\n   <xend>735</xend>\n   <yend>155</yend>\n   <weight>0</weight>\n  </line>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>229</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>Contact Name:</string>\n  </label>\n  <label>\n   <rect>\n    <x>385</x>\n    <y>245</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>Phone:</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>140</y>\n    <width>170</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>Contact 1</string>\n  </label>\n  <field>\n   <rect>\n    <x>130</x>\n    <y>344.893</y>\n    <width>103</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>head</query>\n    <column>backlog</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>245</y>\n    <width>260</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>contact1_phone</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>130</x>\n    <y>325</y>\n    <width>105</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>podate</query>\n    <column>lastpodate</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>410</x>\n    <y>345</y>\n    <width>134.643</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>OpenBalance</query>\n    <column>balance</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>365</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   <right/>\n   <vcenter/>\n   <string>Notes:</string>\n  </label>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>95</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>Number:</string>\n  </label>\n  <field>\n   <rect>\n    <x>100</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>vend_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>275</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>Email:</string>\n  </label>\n  <label>\n   <rect>\n    <x>286</x>\n    <y>345</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   <right/>\n   <vcenter/>\n   <string>Open Balance:</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>305</y>\n    <width>115</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>First Purchase Date:</string>\n  </label>\n  <text>\n   <rect>\n    <x>21</x>\n    <y>163</y>\n    <width>341</width>\n    <height>12</height>\n   </rect>\n   <bottompad>0</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>head</query>\n    <column>contact1_address</column>\n   </data>\n  </text>\n  <text>\n   <rect>\n    <x>399</x>\n    <y>164</y>\n    <width>333</width>\n    <height>12</height>\n   </rect>\n   <bottompad>0</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>head</query>\n    <column>contact2_address</column>\n   </data>\n  </text>\n </rpthead>\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  <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 </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
260	ViewAPCheckRunEditList	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>View Payment Run Edit List</title>\n <name>ViewAPCheckRunEditList</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 checkhead_void THEN 0\n                   ELSE checkhead_amount END AS amt_check,\n              CASE WHEN checkhead_void THEN 0\n                   ELSE currToBase(checkhead_curr_id,checkhead_amount,\n                                   checkhead_checkdate)\n              END AS base_amt_check,\n       checkhead_id AS primaryid,\n       -1 AS secondaryid,\n       formatBoolYN(checkhead_void) AS f_void,\n       formatBoolYN(checkhead_printed) AS f_printed,\n       TEXT(checkhead_number) AS number,\n       (checkrecip_number || '-' || checkrecip_name) AS description,\n       formatDate(checkhead_checkdate) AS f_checkdate,\n       formatMoney(checkhead_amount) AS f_amount,\n       formatMoney(currtobase(checkhead_curr_id,checkhead_amount,checkhead_checkdate)) AS f_baseamount,\n       currconcat(checkhead_curr_id) AS currAbbr,\n       checkhead_number,\n       1 AS orderby\n  FROM checkhead LEFT OUTER JOIN\n       checkrecip ON ((checkrecip_id=checkhead_recip_id)\n\t\t AND  (checkrecip_type=checkhead_recip_type))\n WHERE ((checkhead_bankaccnt_id=&lt;? value("bankaccnt_id") ?>)\n   AND  (NOT checkhead_posted)\n   AND  (NOT checkhead_replaced)\n   AND  (NOT checkhead_deleted)\n&lt;? if exists(&quot;vend_id&quot;) ?>\n   AND (checkrecip_type='V')\n   AND (checkrecip_id=&lt;? value(&quot;vend_id&quot;) ?>)\n&lt;? elseif exists(&quot;vendtype_id&quot;) ?>\n   AND (checkrecip_type='V')\n   AND (checkrecip_id IN (SELECT vend_id\n                          FROM vendinfo\n                          WHERE (vend_vendtype_id=&lt;? value(&quot;vendtype_id&quot;) ?>)))\n&lt;? elseif exists(&quot;vendtype_pattern&quot;) ?>\n   AND (checkrecip_type='V')\n   AND (checkrecip_id IN (SELECT vend_id\n                          FROM vendinfo, vendtype\n                          WHERE ((vend_vendtype_id=vendtype_id)\n                             AND (vendtype_code ~ &lt;? value(&quot;vendtype_pattern&quot;) ?>))))\n&lt;? endif ?>\n   )\n\nUNION SELECT 0 AS amt_check,\n             0 AS base_amt_check,\n             checkitem_checkhead_id AS primaryid,\n             checkitem_id AS secondaryid,\n             '' AS f_void,\n             '' AS f_printed,\n             CASE WHEN (checkitem_ranumber IS NOT NULL) THEN checkitem_ranumber::TEXT\n\t          ELSE checkitem_vouchernumber\n\t     END AS number,\n             CASE WHEN (checkitem_cmnumber IS NOT NULL) THEN checkitem_cmnumber::TEXT\n\t          ELSE checkitem_invcnumber\n\t     END AS description,\n             '' AS f_checkdate,\n             formatMoney(checkitem_amount) AS f_amount,\n             formatMoney(currtobase(checkitem_curr_id,checkitem_amount,checkhead_checkdate)) AS f_baseamount,\n             currconcat(checkitem_curr_id) AS currAbbr,\n             checkhead_number,\n             2 AS orderby\n        FROM checkitem, checkhead\n       WHERE ( (checkitem_checkhead_id=checkhead_id)\n         AND (checkhead_bankaccnt_id=&lt;? value("bankaccnt_id") ?>)\n         AND (NOT checkhead_posted)\n         AND (NOT checkhead_replaced)\n         AND (NOT checkhead_deleted)\n&lt;? if exists(&quot;vend_id&quot;) ?>\n         AND (checkhead_recip_type='V')\n         AND (checkhead_recip_id=&lt;? value(&quot;vend_id&quot;) ?>)\n&lt;? elseif exists(&quot;vendtype_id&quot;) ?>\n         AND (checkhead_recip_type='V')\n         AND (checkhead_recip_id IN (SELECT vend_id\n                                FROM vendinfo\n                                WHERE (vend_vendtype_id=&lt;? value(&quot;vendtype_id&quot;) ?>)))\n&lt;? elseif exists(&quot;vendtype_pattern&quot;) ?>\n         AND (checkhead_recip_type='V')\n         AND (checkhead_recip_id IN (SELECT vend_id\n                                FROM vendinfo, vendtype\n                                WHERE ((vend_vendtype_id=vendtype_id)\n                                   AND (vendtype_code ~ &lt;? value(&quot;vendtype_pattern&quot;) ?>))))\n&lt;? endif ?>\n              )\nORDER BY checkhead_number, primaryid, orderby;</sql>\n </querysource>\n <querysource>\n  <name>head</name>\n  <sql>SELECT (bankaccnt_name || '-' || bankaccnt_descrip) AS bankaccnt\n  FROM bankaccnt\n WHERE (bankaccnt_id=&lt;? value("bankaccnt_id") ?>);</sql>\n </querysource>\n <rpthead>\n  <height>127</height>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>100</y>\n    <width>55</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>Void</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>112</ystart>\n   <xend>745</xend>\n   <yend>112</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>65</x>\n    <y>100</y>\n    <width>55</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>265</x>\n    <y>85</y>\n    <width>125</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>Recipient</string>\n  </label>\n  <label>\n   <rect>\n    <x>455</x>\n    <y>100</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>Payment Date</string>\n  </label>\n  <field>\n   <rect>\n    <x>145</x>\n    <y>55</y>\n    <width>350</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>bankaccnt</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>130</x>\n    <y>83</y>\n    <width>125</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>Payment #</string>\n  </label>\n  <label>\n   <rect>\n    <x>265</x>\n    <y>100</y>\n    <width>125</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>Invoice/Credit Memo #</string>\n  </label>\n  <label>\n   <rect>\n    <x>20</x>\n    <y>55</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>Bank Account:</string>\n  </label>\n  <label>\n   <rect>\n    <x>130</x>\n    <y>100</y>\n    <width>125</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>Voucher/Return Auth. #</string>\n  </label>\n  <label>\n   <rect>\n    <x>280</x>\n    <y>5</y>\n    <width>465</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>A/P Payment Run Edit List</string>\n  </label>\n  <label>\n   <rect>\n    <x>645</x>\n    <y>100</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>Amount</string>\n  </label>\n  <label>\n   <rect>\n    <x>590</x>\n    <y>100</y>\n    <width>45</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>Currency</string>\n  </label>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>11</height>\n </pghead>\n <pghead>\n  <height>28</height>\n  <label>\n   <rect>\n    <x>590</x>\n    <y>5</y>\n    <width>57</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>Currency</string>\n  </label>\n  <label>\n   <rect>\n    <x>130</x>\n    <y>5</y>\n    <width>125</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>Payment/Voucher #</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>265</x>\n    <y>5</y>\n    <width>125</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>Recipient/Invoice #</string>\n  </label>\n  <label>\n   <rect>\n    <x>645</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   <right/>\n   <vcenter/>\n   <string>Amount</string>\n  </label>\n  <label>\n   <rect>\n    <x>460</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   <hcenter/>\n   <vcenter/>\n   <string>Payment Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>65</x>\n    <y>5</y>\n    <width>55</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>5</x>\n    <y>5</y>\n    <width>55</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>Void</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <group>\n   <name>detail</name>\n   <column>orderid</column>\n  </group>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>21</height>\n   <field>\n    <rect>\n     <x>130</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>585</x>\n     <y>0</y>\n     <width>53</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>currAbbr</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>5</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    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_void</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>65</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    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_printed</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>465</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    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_checkdate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>245</x>\n     <y>0</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    <data>\n     <query>detail</query>\n     <column>description</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>645</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    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_amount</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>21</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>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 </pgfoot>\n <rptfoot>\n  <height>61</height>\n  <field>\n   <rect>\n    <x>645</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>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>detail</query>\n    <column>amt_check</column>\n   </data>\n   <tracktotal builtin="true" >qty</tracktotal>\n  </field>\n  <field>\n   <rect>\n    <x>645</x>\n    <y>20</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>base_amt_check</column>\n   </data>\n   <tracktotal builtin="true" >qty</tracktotal>\n  </field>\n  <label>\n   <rect>\n    <x>494</x>\n    <y>20</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   <right/>\n   <vcenter/>\n   <string>Report Total (Base):</string>\n  </label>\n  <line>\n   <xstart>567</xstart>\n   <ystart>2</ystart>\n   <xend>745</xend>\n   <yend>2</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>494</x>\n    <y>5</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   <right/>\n   <vcenter/>\n   <string>Report Total:</string>\n  </label>\n </rptfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
287	VoucherRegister	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Voucher Register</title>\n <name>VoucherRegister</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 formatDate(&lt;? value(&quot;startDate&quot;) ?>, 'Earliest') AS startdate,\n       formatDate(&lt;? value(&quot;endDate&quot;) ?>, 'Latest') AS enddate,\n       &lt;? if exists(&quot;accnt_id&quot;) ?>\n         ( SELECT (accnt_number || '-' || accnt_descrip)\n             FROM accnt\n            WHERE (accnt_id=&lt;? value(&quot;accnt_id&quot;) ?>) )\n       &lt;? else ?>\n         text('All Accounts')\n       &lt;? endif ?>\n       AS accnt,\n       &lt;? if exists(&quot;showUsernames&quot;) ?>\n         text('Username')\n       &lt;? else ?>\n         text('')\n       &lt;? endif ?>\n       AS f_username</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT gltrans_id,\n       formatDate(gltrans_date) AS transdate,\n       vend_number, vend_name,\n       gltrans_doctype,\n       gltrans_docnumber,\n       firstLine(gltrans_notes) AS transnotes,\n       (formatGLAccount(accnt_id) || ' - ' || accnt_descrip) AS account,\n       CASE WHEN (gltrans_amount &lt; 0) THEN formatMoney(ABS(gltrans_amount))\n            ELSE ''\n       END AS f_debit,\n       CASE WHEN (gltrans_amount > 0) THEN formatMoney(gltrans_amount)\n            ELSE ''\n       END AS f_credit,\n       &lt;? if exists(&quot;showUsernames&quot;) ?>\n         gltrans_username\n       &lt;? else ?>\n         text('')\n       &lt;? endif ?>\n       AS f_username\n  FROM accnt, gltrans LEFT OUTER JOIN vohead JOIN vendinfo ON (vohead_vend_id=vend_id) ON (gltrans_doctype='VO' and gltrans_docnumber=vohead_number)\n WHERE ((gltrans_accnt_id=accnt_id)\n   AND (gltrans_date BETWEEN &lt;? value(&quot;startDate&quot;) ?> AND &lt;? value(&quot;endDate&quot;) ?>)\n&lt;? if exists(&quot;accnt_id&quot;) ?>\n   AND (gltrans_accnt_id=&lt;? value(&quot;accnt_id&quot;) ?>)\n&lt;? endif ?>\n   AND (gltrans_source='A/P')\n       )\nORDER BY gltrans_created DESC, gltrans_sequence, gltrans_amount;</sql>\n </querysource>\n <rpthead>\n  <height>221</height>\n  <field>\n   <rect>\n    <x>545</x>\n    <y>70</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>startdate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>245</x>\n    <y>170</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>Reference</string>\n  </label>\n  <label>\n   <rect>\n    <x>245</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>Account</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>160</x>\n    <y>170</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>Doc. Type</string>\n  </label>\n  <field>\n   <rect>\n    <x>670</x>\n    <y>170</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_username</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>Vend. Name</string>\n  </label>\n  <label>\n   <rect>\n    <x>260</x>\n    <y>10</y>\n    <width>465</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>Voucher Register</string>\n  </label>\n  <label>\n   <rect>\n    <x>595</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>Credit</string>\n  </label>\n  <label>\n   <rect>\n    <x>510</x>\n    <y>200</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   <hcenter/>\n   <vcenter/>\n   <string>Debit</string>\n  </label>\n  <label>\n   <rect>\n    <x>409</x>\n    <y>70</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   <right/>\n   <vcenter/>\n   <string>Start Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>409</x>\n    <y>90</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   <right/>\n   <vcenter/>\n   <string>End Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>70</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   <right/>\n   <vcenter/>\n   <string>Account:</string>\n  </label>\n  <label>\n   <rect>\n    <x>160</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>Doc. #</string>\n  </label>\n  <label>\n   <rect>\n    <x>15</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>Vend. #</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>170</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  <field>\n   <rect>\n    <x>545</x>\n    <y>90</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>enddate</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>70</y>\n    <width>290</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>accnt</column>\n   </data>\n  </field>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>56</height>\n  <label>\n   <rect>\n    <x>160</x>\n    <y>20</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>Doc. #</string>\n  </label>\n  <label>\n   <rect>\n    <x>160</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>Doc. Type</string>\n  </label>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>35</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>Vend. #</string>\n  </label>\n  <label>\n   <rect>\n    <x>245</x>\n    <y>20</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>Account</string>\n  </label>\n  <label>\n   <rect>\n    <x>245</x>\n    <y>5</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>Reference</string>\n  </label>\n  <label>\n   <rect>\n    <x>105</x>\n    <y>35</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>Vend. Name</string>\n  </label>\n  <label>\n   <rect>\n    <x>510</x>\n    <y>35</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   <hcenter/>\n   <vcenter/>\n   <string>Debit</string>\n  </label>\n  <label>\n   <rect>\n    <x>595</x>\n    <y>35</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>Credit</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</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>Date</string>\n  </label>\n  <field>\n   <rect>\n    <x>670</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   <right/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_username</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>2</weight>\n  </line>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>46</height>\n   <field>\n    <rect>\n     <x>245</x>\n     <y>0</y>\n     <width>260</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>transnotes</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>15</x>\n     <y>30</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>vend_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>245</x>\n     <y>15</y>\n     <width>260</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>account</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>160</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>gltrans_doctype</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>10</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>transdate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>510</x>\n     <y>30</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_debit</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>105</x>\n     <y>30</y>\n     <width>265</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>595</x>\n     <y>30</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_credit</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>620</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    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_username</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>160</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    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>gltrans_docnumber</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  <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
90	WOMaterialAvailabilityByWorkOrder	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>W/O Material Availability By Work Order</title>\n <name>WOMaterialAvailabilityByWorkOrder</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 formatWONumber(wo_id) AS wonumber,\n       warehous_code as warehouse,\n       item_number, item_descrip1, item_descrip2, uom_name,\n       wo_status AS status,        \n       &lt;? if exists("onlyShowShortages") ?>\n         text('Only Show Shortages')\n       &lt;? elseif exists("onlyShowInsufficientInventory") ?>\n         text('Only Show Insufficient Inventory')\n       &lt;? else ?>\n         text('All Materials')\n       &lt;? endif ?>\n       AS itemfiltertext,\n       &lt;? if exists("IndentedParentChild") ?>\n         text('Indented Works Orders')\n       &lt;? elseif exists("summarizedParentChild") ?>\n         text('Summarized Parent/Child Orders')\n       &lt;? else ?>\n         text('Parent Order Only')\n       &lt;? endif ?>\n       AS wofiltertext\n  FROM wo, itemsite, item, uom, whsinfo\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") ?>) );</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT *, (REPEAT(' ',(woinvav_level-1)*3) || woinvav_item_wo_number) AS itemwonumber FROM woinvavail(&lt;? value("wo_id") ?>,\n&lt;? if exists("IndentedParentChild") ?>\ntrue, \n &lt;? else ?>\nfalse, \n&lt;? endif ?>\n&lt;? if exists("summarizedParentChild") ?>\ntrue, \n &lt;? else ?>\nfalse, \n&lt;? endif ?>\n&lt;? if exists("onlyShowShortages") ?>\ntrue, \n &lt;? else ?>\nfalse, \n&lt;? endif ?>\n&lt;? if exists("onlyShowInsufficientInventory") ?>\ntrue) \n &lt;? else ?>\nfalse) \n&lt;? endif ?></sql>\n </querysource>\n <rpthead>\n  <height>236</height>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>55</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>Work Order #:</string>\n  </label>\n  <field>\n   <rect>\n    <x>325</x>\n    <y>100</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>10</x>\n    <y>100</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 Number:</string>\n  </label>\n  <label>\n   <rect>\n    <x>265</x>\n    <y>100</y>\n    <width>55</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  <field>\n   <rect>\n    <x>100</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>warehouse</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>190</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>UOM</string>\n  </label>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>100</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>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>WO/Item Number</string>\n  </label>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>55</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>wonumber</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>430</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>Total Alloc.</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</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>Site:</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>165</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>Status:</string>\n  </label>\n  <label>\n   <rect>\n    <x>190</x>\n    <y>5</y>\n    <width>558</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>W/O Material Availability By Work Order</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  <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_descrip1</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>165</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>status</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>275</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>QOH</string>\n  </label>\n  <label>\n   <rect>\n    <x>670</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>Total Avail.</string>\n  </label>\n  <label>\n   <rect>\n    <x>590</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>W/O Avail.</string>\n  </label>\n  <label>\n   <rect>\n    <x>350</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>W/O Alloc.</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>item_descrip2</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>509</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>Orders</string>\n  </label>\n  <label>\n   <rect>\n    <x>190</x>\n    <y>215</y>\n    <width>125</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>250</x>\n    <y>55</y>\n    <width>70</width>\n    <height>18</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 Filter:</string>\n  </label>\n  <field>\n   <rect>\n    <x>325</x>\n    <y>55</y>\n    <width>365</width>\n    <height>18</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>itemfiltertext</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>325</x>\n    <y>75</y>\n    <width>365</width>\n    <height>18</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>wofiltertext</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>250</x>\n    <y>75</y>\n    <width>70</width>\n    <height>18</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>WO Filter:</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>350</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>W/O Alloc.</string>\n  </label>\n  <label>\n   <rect>\n    <x>430</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>Total Alloc.</string>\n  </label>\n  <label>\n   <rect>\n    <x>670</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>Total Avail.</string>\n  </label>\n  <label>\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>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>WO/Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>205</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>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>590</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>W/O Avail.</string>\n  </label>\n  <label>\n   <rect>\n    <x>509</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>Orders</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>275</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>Adj. QOH</string>\n  </label>\n  <label>\n   <rect>\n    <x>190</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>UOM</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>32</height>\n   <field>\n    <rect>\n     <x>350</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>woinvav_balance</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>270</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>woinvav_qoh</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>670</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    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>woinvav_totalavail</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>430</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>woinvav_allocated</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>509</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>woinvav_ordered</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>10</x>\n     <y>0</y>\n     <width>170</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>itemwonumber</column>\n    </data>\n   </field>\n   <line>\n    <xstart>0</xstart>\n    <ystart>29</ystart>\n    <xend>750</xend>\n    <yend>29</yend>\n    <weight>0</weight>\n   </line>\n   <field>\n    <rect>\n     <x>190</x>\n     <y>15</y>\n     <width>555</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>woinvav_descrip</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>590</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>woinvav_woavail</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>190</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    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>woinvav_uomname</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>16</height>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>0</y>\n    <width>76</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>76</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>695</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>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 </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
88	WOMaterialRequirementsByComponentItem	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>W/O Material Requirements By Component Item</title>\n <name>WOMaterialRequirementsByComponentItem</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,\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\n WHERE (item_id=&lt;? value("item_id") ?>);\n</sql>\n </querysource>\n <querysource loadFromDb="true" >\n  <name>detail</name>\n  <mqlgroup>workOrderMaterial</mqlgroup>\n  <mqlname>detail</mqlname>\n </querysource>\n <querysource>\n  <name>total</name>\n  <sql>SELECT formatQty(SUM(womatl_qtyreq)) AS required,\n       formatQty(SUM(womatl_qtyiss)) AS issued,\n       formatQty(SUM(noNeg(womatl_qtyreq - womatl_qtyiss))) AS balance\n    FROM wo, womatl, itemsite AS parentsite, itemsite AS componentsite, item, uom\nWHERE ((womatl_wo_id=wo_id)\n       AND (womatl_uom_id=uom_id)\n       AND (wo_status &lt;> 'C')\n       AND (wo_itemsite_id=parentsite.itemsite_id)\n       AND (womatl_itemsite_id=componentsite.itemsite_id)\n       AND (parentsite.itemsite_item_id=item_id)\n       AND (componentsite.itemsite_item_id=&lt;? value("item_id") ?>)\n&lt;? if exists("warehous_id") ?>\n       AND (componentsite.itemsite_warehous_id=&lt;? value("warehous_id") ?>)\n&lt;? endif ?>\n )\n;</sql>\n </querysource>\n <rpthead>\n  <height>236</height>\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>95</x>\n    <y>215</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>515</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>Issued</string>\n  </label>\n  <label>\n   <rect>\n    <x>440</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>Required</string>\n  </label>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>145</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>670</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>Due Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>285</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  <label>\n   <rect>\n    <x>360</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>200</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>Issue Method</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>Item:</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>10</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>W/O #</string>\n  </label>\n  <label>\n   <rect>\n    <x>95</x>\n    <y>198</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 Item #</string>\n  </label>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>145</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>Site:</string>\n  </label>\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  <label>\n   <rect>\n    <x>155</x>\n    <y>5</y>\n    <width>593</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>W/O Material Requirements By Component Item</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>590</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>Balance</string>\n  </label>\n  <label>\n   <rect>\n    <x>285</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>515</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>Issued</string>\n  </label>\n  <label>\n   <rect>\n    <x>360</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>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>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Parent Item #</string>\n  </label>\n  <label>\n   <rect>\n    <x>95</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>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>440</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>Required</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</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>W/O #</string>\n  </label>\n  <label>\n   <rect>\n    <x>670</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>Due Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>285</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  <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>590</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>Balance</string>\n  </label>\n  <label>\n   <rect>\n    <x>200</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>Issue Method</string>\n  </label>\n  <label>\n   <rect>\n    <x>285</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>51</height>\n   <field>\n    <rect>\n     <x>10</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>wonumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>95</x>\n     <y>32</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>item_descrip1</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>590</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>f_balance</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>detail</query>\n     <column>item_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>515</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>f_qtyiss</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>670</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    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_duedate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>200</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    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>issuemethod</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>360</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>f_scrap</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>400</x>\n     <y>32</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>item_descrip2</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>440</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>f_qtyreq</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>280</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>f_qtyper</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>280</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>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_qtyfxd</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>16</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  <label>\n   <rect>\n    <x>620</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   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</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   <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 </pgfoot>\n <rptfoot>\n  <height>16</height>\n  <field>\n   <rect>\n    <x>595</x>\n    <y>1</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   <right/>\n   <vcenter/>\n   <data>\n    <query>total</query>\n    <column>balance</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>315</x>\n    <y>1</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   <string>Totals:</string>\n  </label>\n  <field>\n   <rect>\n    <x>520</x>\n    <y>1</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   <right/>\n   <vcenter/>\n   <data>\n    <query>total</query>\n    <column>issued</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>445</x>\n    <y>1</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   <right/>\n   <vcenter/>\n   <data>\n    <query>total</query>\n    <column>required</column>\n   </data>\n  </field>\n </rptfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
237	AccountingPeriodsMasterList	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Accounting Periods Master List</title>\n <name>AccountingPeriodsMasterList</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 period_id,\n       formatDate(period_start) AS f_start,\n       formatDate(period_end) AS f_end,\n       formatBoolYN(period_closed) AS f_closed,\n       formatBoolYN(period_freeze) AS f_frozen\n  FROM period\nORDER BY period_start;</sql>\n </querysource>\n <rpthead>\n  <height>77</height>\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>Start</string>\n  </label>\n  <label>\n   <rect>\n    <x>114</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>End</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>420</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>Closed</string>\n  </label>\n  <label>\n   <rect>\n    <x>515</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>Frozen</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>Accounting Periods Master List</string>\n  </label>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>7</height>\n </pghead>\n <pghead>\n  <height>22</height>\n  <label>\n   <rect>\n    <x>114</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>End</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>515</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>Frozen</string>\n  </label>\n  <label>\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>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Start</string>\n  </label>\n  <label>\n   <rect>\n    <x>420</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>Closed</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>17</height>\n   <field>\n    <rect>\n     <x>420</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_closed</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>114</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>f_end</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>515</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_frozen</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>f_start</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>17</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
283	APAging	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>AP 30 60 90 Aging</title>\n <name>APAging</name>\n <description>Enhanced AP Aging - Uses 30-60-90 columns - User provides Relative Date - all amounts in base currency based on Document Date.</description>\n <parameter default="" active="true" listtype="static" type="string" name="relDate" >\n  <description>Date Relative to Today</description>\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>detail</name>\n  <sql>SELECT \n\tapaging_docdate,\n\tapaging_duedate,\n\tapaging_ponumber,\n\tapaging_docnumber,\n        apaging_invcnumber,\n\tapaging_doctype,\n\tapaging_vend_id,\n\tapaging_vend_number,\n\tapaging_vend_name,\n\tapaging_vend_vendtype_id,\n\tapaging_vendtype_code,\n\tapaging_terms_descrip,\n\tformatMoney(apaging_apopen_amount) AS apaging_apopen_amount,\n\tapaging_cur_val,   formatMoney(apaging_cur_val)    AS apaging_cur_amt,\n\tapaging_thirty_val,formatMoney(apaging_thirty_val) AS apaging_thirty_amt,\n\tapaging_sixty_val, formatMoney(apaging_sixty_val)  AS apaging_sixty_amt,\n\tapaging_ninety_val,formatMoney(apaging_ninety_val) AS apaging_ninety_amt,\n\tapaging_plus_val,  formatMoney(apaging_plus_val)   AS apaging_plus_amt,\n\tapaging_total_val, formatMoney(apaging_total_val)  AS apaging_total_amt,\n\tapaging_disc_val,  formatMoney(apaging_disc_val)   AS apaging_disc_amt,\n\tapaging_discdate,\n\tapaging_discdays,\n\tapaging_discprcnt\nFROM apaging(&lt;? value("relDate") ?>, &lt;? value("useDocDate") ?>)\n&lt;? if exists("vend_id") ?>\n   WHERE (apaging_vend_id=&lt;? value("vend_id") ?>)\n&lt;? elseif exists("vendtype_id") ?>\n   WHERE (apaging_vend_vendtype_id=&lt;? value("vendtype_id") ?>)\n&lt;? elseif exists("vendtype_pattern") ?>\n   WHERE (apaging_vendtype_code ~ &lt;? value("vendtype_pattern") ?>)\n&lt;? endif ?>;</sql>\n </querysource>\n <rpthead>\n  <height>77</height>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>365</width>\n    <height>31</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <top/>\n   <string>Accounts Payable Aging Report</string>\n  </label>\n  <field>\n   <rect>\n    <x>45</x>\n    <y>40</y>\n    <width>110</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   <top/>\n   <data>\n    <query>Parameter Query</query>\n    <column>relDate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>40</y>\n    <width>40</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   <top/>\n   <string>As of:</string>\n  </label>\n </rpthead>\n <section>\n  <name>detail</name>\n  <group>\n   <name>Vendor</name>\n   <column>apaging_vend_number</column>\n   <pagebreak when="after foot" />\n   <head>\n    <height>113</height>\n    <label>\n     <rect>\n      <x>0</x>\n      <y>70</y>\n      <width>15</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     <top/>\n     <string>y</string>\n    </label>\n    <label>\n     <rect>\n      <x>20</x>\n      <y>90</y>\n      <width>85</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     <top/>\n     <string>Vendor Inv #</string>\n    </label>\n    <label>\n     <rect>\n      <x>0</x>\n      <y>60</y>\n      <width>15</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     <top/>\n     <string>T</string>\n    </label>\n    <label>\n     <rect>\n      <x>0</x>\n      <y>10</y>\n      <width>103</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     <top/>\n     <string>Vendor Name:</string>\n    </label>\n    <label>\n     <rect>\n      <x>867</x>\n      <y>80</y>\n      <width>40</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     <top/>\n     <string>Discount</string>\n    </label>\n    <label>\n     <rect>\n      <x>620</x>\n      <y>90</y>\n      <width>75</width>\n      <height>12</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>31+60 Days</string>\n    </label>\n    <label>\n     <rect>\n      <x>0</x>\n      <y>25</y>\n      <width>103</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     <top/>\n     <string>Vendor Number:</string>\n    </label>\n    <label>\n     <rect>\n      <x>942</x>\n      <y>90</y>\n      <width>45</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     <top/>\n     <string>Discount</string>\n    </label>\n    <label>\n     <rect>\n      <x>867</x>\n      <y>90</y>\n      <width>40</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     <top/>\n     <string>Date</string>\n    </label>\n    <field>\n     <rect>\n      <x>125</x>\n      <y>25</y>\n      <width>220</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     <top/>\n     <data>\n      <query>detail</query>\n      <column>apaging_vend_number</column>\n     </data>\n    </field>\n    <label>\n     <rect>\n      <x>360</x>\n      <y>80</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     <top/>\n     <string>Original</string>\n    </label>\n    <label>\n     <rect>\n      <x>360</x>\n      <y>90</y>\n      <width>80</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     <top/>\n     <string>Invoice Amount</string>\n    </label>\n    <label>\n     <rect>\n      <x>775</x>\n      <y>90</y>\n      <width>75</width>\n      <height>12</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>90+ Days</string>\n    </label>\n    <label>\n     <rect>\n      <x>0</x>\n      <y>90</y>\n      <width>15</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     <top/>\n     <string>e</string>\n    </label>\n    <label>\n     <rect>\n      <x>0</x>\n      <y>80</y>\n      <width>15</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     <top/>\n     <string>p</string>\n    </label>\n    <label>\n     <rect>\n      <x>530</x>\n      <y>90</y>\n      <width>75</width>\n      <height>12</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>0+30 Days</string>\n    </label>\n    <line>\n     <xstart>0</xstart>\n     <ystart>105</ystart>\n     <xend>1000</xend>\n     <yend>105</yend>\n     <weight>0</weight>\n    </line>\n    <field>\n     <rect>\n      <x>125</x>\n      <y>40</y>\n      <width>220</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     <top/>\n     <data>\n      <query>detail</query>\n      <column>apaging_terms_descrip</column>\n     </data>\n    </field>\n    <line>\n     <xstart>0</xstart>\n     <ystart>5</ystart>\n     <xend>1000</xend>\n     <yend>5</yend>\n     <weight>0</weight>\n    </line>\n    <label>\n     <rect>\n      <x>270</x>\n      <y>90</y>\n      <width>60</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     <top/>\n     <string>Due Date</string>\n    </label>\n    <label>\n     <rect>\n      <x>110</x>\n      <y>90</y>\n      <width>85</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     <top/>\n     <string>Voucher #</string>\n    </label>\n    <label>\n     <rect>\n      <x>705</x>\n      <y>90</y>\n      <width>75</width>\n      <height>12</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>61+90 Days</string>\n    </label>\n    <label>\n     <rect>\n      <x>200</x>\n      <y>90</y>\n      <width>60</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     <top/>\n     <string>Invoice Date</string>\n    </label>\n    <field>\n     <rect>\n      <x>125</x>\n      <y>10</y>\n      <width>220</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     <top/>\n     <data>\n      <query>detail</query>\n      <column>apaging_vend_name</column>\n     </data>\n    </field>\n    <label>\n     <rect>\n      <x>450</x>\n      <y>90</y>\n      <width>75</width>\n      <height>12</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>Current</string>\n    </label>\n    <label>\n     <rect>\n      <x>0</x>\n      <y>40</y>\n      <width>103</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     <top/>\n     <string>Terms:</string>\n    </label>\n   </head>\n   <foot>\n    <height>96</height>\n    <label>\n     <rect>\n      <x>450</x>\n      <y>65</y>\n      <width>475</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     <top/>\n     <string>All amounts are in base currency as of the document date.</string>\n    </label>\n    <field>\n     <rect>\n      <x>0</x>\n      <y>50</y>\n      <width>220</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     <top/>\n     <data>\n      <query>detail</query>\n      <column>vend_name</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>530</x>\n      <y>5</y>\n      <width>75</width>\n      <height>12</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <top/>\n     <data>\n      <query>detail</query>\n      <column>apaging_thirty_val</column>\n     </data>\n     <tracktotal subtotal="true" builtin="true" >qty</tracktotal>\n    </field>\n    <label>\n     <rect>\n      <x>450</x>\n      <y>55</y>\n      <width>55</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     <top/>\n     <string>Note:</string>\n    </label>\n    <line>\n     <xstart>237</xstart>\n     <ystart>32</ystart>\n     <xend>237</xend>\n     <yend>32</yend>\n     <weight>0</weight>\n    </line>\n    <field>\n     <rect>\n      <x>450</x>\n      <y>5</y>\n      <width>75</width>\n      <height>12</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <top/>\n     <data>\n      <query>detail</query>\n      <column>apaging_cur_val</column>\n     </data>\n     <tracktotal subtotal="true" builtin="true" >qty</tracktotal>\n    </field>\n    <field>\n     <rect>\n      <x>220</x>\n      <y>50</y>\n      <width>75</width>\n      <height>12</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <top/>\n     <data>\n      <query>detail</query>\n      <column>apaging_total_val</column>\n     </data>\n     <tracktotal subtotal="true" builtin="true" >qty</tracktotal>\n    </field>\n    <field>\n     <rect>\n      <x>938</x>\n      <y>5</y>\n      <width>55</width>\n      <height>12</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <top/>\n     <data>\n      <query>detail</query>\n      <column>apaging_disc_val</column>\n     </data>\n     <tracktotal subtotal="true" builtin="true" >qty</tracktotal>\n    </field>\n    <label>\n     <rect>\n      <x>0</x>\n      <y>35</y>\n      <width>135</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     <top/>\n     <string>Total For Vendor</string>\n    </label>\n    <field>\n     <rect>\n      <x>620</x>\n      <y>5</y>\n      <width>70</width>\n      <height>12</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <top/>\n     <data>\n      <query>detail</query>\n      <column>apaging_sixty_val</column>\n     </data>\n     <tracktotal subtotal="true" builtin="true" >qty</tracktotal>\n    </field>\n    <field>\n     <rect>\n      <x>705</x>\n      <y>5</y>\n      <width>70</width>\n      <height>12</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <top/>\n     <data>\n      <query>detail</query>\n      <column>apaging_ninety_val</column>\n     </data>\n     <tracktotal subtotal="true" builtin="true" >qty</tracktotal>\n    </field>\n    <line>\n     <xstart>0</xstart>\n     <ystart>0</ystart>\n     <xend>1000</xend>\n     <yend>0</yend>\n     <weight>0</weight>\n    </line>\n    <field>\n     <rect>\n      <x>780</x>\n      <y>5</y>\n      <width>75</width>\n      <height>12</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <top/>\n     <data>\n      <query>detail</query>\n      <column>apaging_plus_val</column>\n     </data>\n     <tracktotal subtotal="true" builtin="true" >qty</tracktotal>\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>860</x>\n     <y>0</y>\n     <width>70</width>\n     <height>12</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <top/>\n    <data>\n     <query>detail</query>\n     <column>apaging_discdate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>939</x>\n     <y>0</y>\n     <width>55</width>\n     <height>12</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <top/>\n    <data>\n     <query>detail</query>\n     <column>apaging_disc_amt</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>270</x>\n     <y>0</y>\n     <width>85</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    <top/>\n    <data>\n     <query>detail</query>\n     <column>apaging_duedate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>20</x>\n     <y>0</y>\n     <width>80</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    <top/>\n    <data>\n     <query>detail</query>\n     <column>apaging_invcnumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>0</x>\n     <y>0</y>\n     <width>15</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    <top/>\n    <data>\n     <query>detail</query>\n     <column>apaging_doctype</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>530</x>\n     <y>0</y>\n     <width>75</width>\n     <height>12</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <top/>\n    <data>\n     <query>detail</query>\n     <column>apaging_thirty_amt</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>110</x>\n     <y>0</y>\n     <width>80</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    <top/>\n    <data>\n     <query>detail</query>\n     <column>apaging_docnumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>450</x>\n     <y>0</y>\n     <width>75</width>\n     <height>12</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <top/>\n    <data>\n     <query>detail</query>\n     <column>apaging_cur_amt</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>795</x>\n     <y>0</y>\n     <width>55</width>\n     <height>12</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <top/>\n    <data>\n     <query>detail</query>\n     <column>apaging_plus_amt</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>355</x>\n     <y>0</y>\n     <width>80</width>\n     <height>12</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <top/>\n    <data>\n     <query>detail</query>\n     <column>apaging_apopen_amount</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>620</x>\n     <y>0</y>\n     <width>70</width>\n     <height>12</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <top/>\n    <data>\n     <query>detail</query>\n     <column>apaging_sixty_amt</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>705</x>\n     <y>0</y>\n     <width>70</width>\n     <height>12</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <top/>\n    <data>\n     <query>detail</query>\n     <column>apaging_ninety_amt</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>200</x>\n     <y>0</y>\n     <width>85</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    <top/>\n    <data>\n     <query>detail</query>\n     <column>apaging_docdate</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <lastpage/>\n  <height>102</height>\n  <field>\n   <rect>\n    <x>220</x>\n    <y>35</y>\n    <width>75</width>\n    <height>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <top/>\n   <data>\n    <query>detail</query>\n    <column>apaging_total_val</column>\n   </data>\n   <tracktotal builtin="true" >qty</tracktotal>\n  </field>\n  <field>\n   <rect>\n    <x>620</x>\n    <y>5</y>\n    <width>70</width>\n    <height>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <top/>\n   <data>\n    <query>detail</query>\n    <column>apaging_sixty_val</column>\n   </data>\n   <tracktotal builtin="true" >qty</tracktotal>\n  </field>\n  <field>\n   <rect>\n    <x>530</x>\n    <y>5</y>\n    <width>75</width>\n    <height>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <top/>\n   <data>\n    <query>detail</query>\n    <column>apaging_thirty_val</column>\n   </data>\n   <tracktotal builtin="true" >qty</tracktotal>\n  </field>\n  <label>\n   <rect>\n    <x>450</x>\n    <y>45</y>\n    <width>475</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   <top/>\n   <string>All amounts are in base currency as of the document date.</string>\n  </label>\n  <field>\n   <rect>\n    <x>450</x>\n    <y>5</y>\n    <width>75</width>\n    <height>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <top/>\n   <data>\n    <query>detail</query>\n    <column>apaging_cur_val</column>\n   </data>\n   <tracktotal builtin="true" >qty</tracktotal>\n  </field>\n  <label>\n   <rect>\n    <x>450</x>\n    <y>35</y>\n    <width>55</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   <top/>\n   <string>Note:</string>\n  </label>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>35</y>\n    <width>170</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   <top/>\n   <string>Total For All Vendors</string>\n  </label>\n  <field>\n   <rect>\n    <x>710</x>\n    <y>5</y>\n    <width>70</width>\n    <height>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <top/>\n   <data>\n    <query>detail</query>\n    <column>apaging_ninety_val</column>\n   </data>\n   <tracktotal builtin="true" >qty</tracktotal>\n  </field>\n  <field>\n   <rect>\n    <x>780</x>\n    <y>5</y>\n    <width>75</width>\n    <height>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <top/>\n   <data>\n    <query>detail</query>\n    <column>apaging_plus_val</column>\n   </data>\n   <tracktotal builtin="true" >qty</tracktotal>\n  </field>\n  <label>\n   <rect>\n    <x>335</x>\n    <y>5</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   <top/>\n   <string>Report Totals:</string>\n  </label>\n  <field>\n   <rect>\n    <x>942</x>\n    <y>5</y>\n    <width>55</width>\n    <height>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <top/>\n   <data>\n    <query>detail</query>\n    <column>apaging_disc_val</column>\n   </data>\n   <tracktotal builtin="true" >qty</tracktotal>\n  </field>\n  <label>\n   <rect>\n    <x>457</x>\n    <y>80</y>\n    <width>35</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   <top/>\n   <string>Page: </string>\n  </label>\n  <field>\n   <rect>\n    <x>515</x>\n    <y>80</y>\n    <width>42</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   <top/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <line>\n   <xstart>1</xstart>\n   <ystart>2</ystart>\n   <xend>1000</xend>\n   <yend>2</yend>\n   <weight>2</weight>\n  </line>\n </pgfoot>\n <pgfoot>\n  <height>47</height>\n  <field>\n   <rect>\n    <x>515</x>\n    <y>25</y>\n    <width>42</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   <top/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>457</x>\n    <y>25</y>\n    <width>35</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   <top/>\n   <string>Page: </string>\n  </label>\n </pgfoot>\n</report>\n	Enhanced AP Aging - Uses 30-60-90 columns - User provides Relative Date - all amounts in base currency based on Document Date.	0	2015-10-01 17:14:33.361434
482	APAgingSummary	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>AP 30 60 90 Aging Summary</title>\n <name>APAgingSummary</name>\n <description>Enhanced AP Aging - Uses 30-60-90 columns - User provides Relative Date - all amounts in base currency based on Document Date.\n\nVendor Summary</description>\n <parameter default="" active="true" listtype="static" type="string" name="relDate">\n  <description>Date Relative to Today</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 <landscape/>\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 \n\tapaging_vend_id,\n\tapaging_vend_number,\n\tapaging_vend_name,\n\tapaging_vend_vendtype_id,\n\tapaging_vendtype_code,\n\tapaging_terms_descrip,\n\tformatMoney(SUM(apaging_apopen_amount)) AS apaging_apopen_amount,\n\tSUM(apaging_cur_val) AS apaging_cur_val,   formatMoney(SUM(apaging_cur_val))    AS apaging_cur_amt,\n\tSUM(apaging_thirty_val) AS apaging_thirty_val, formatMoney(SUM(apaging_thirty_val)) AS apaging_thirty_amt,\n\tSUM(apaging_sixty_val) AS apaging_sixty_val, formatMoney(SUM(apaging_sixty_val))  AS apaging_sixty_amt,\n\tSUM(apaging_ninety_val) AS apaging_ninety_val, formatMoney(SUM(apaging_ninety_val)) AS apaging_ninety_amt,\n\tSUM(apaging_plus_val) AS apaging_plus_val,  formatMoney(SUM(apaging_plus_val))   AS apaging_plus_amt,\n\tSUM(apaging_total_val) AS apaging_total_val, formatMoney(SUM(apaging_total_val))  AS apaging_total_amt,\n\tSUM(apaging_disc_val) AS apaging_disc_val,  formatMoney(SUM(apaging_disc_val))   AS apaging_disc_amt\nFROM apaging(&lt;? value("relDate") ?>, &lt;? value("useDocDate") ?>)\n&lt;? if exists("vend_id") ?>\n   WHERE (apaging_vend_id=&lt;? value("vend_id") ?>)\n&lt;? elseif exists("vendtype_id") ?>\n   WHERE (apaging_vend_vendtype_id=&lt;? value("vendtype_id") ?>)\n&lt;? elseif exists("vendtype_pattern") ?>\n   WHERE (apaging_vendtype_code ~ &lt;? value("vendtype_pattern") ?>)\n&lt;? endif ?>\nGROUP BY \tapaging_vend_id,\n\tapaging_vend_number,\n\tapaging_vend_name,\n\tapaging_vend_vendtype_id,\n\tapaging_vendtype_code,\n\tapaging_terms_descrip;</sql>\n </querysource>\n <rpthead>\n  <height>77</height>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>450</width>\n    <height>31</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <top/>\n   <string>Accounts Payable Aging Summary Report</string>\n  </label>\n  <field>\n   <rect>\n    <x>45</x>\n    <y>35</y>\n    <width>110</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   <top/>\n   <data>\n    <query>Parameter Query</query>\n    <column>relDate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>35</y>\n    <width>40</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   <top/>\n   <string>As of:</string>\n  </label>\n  <label>\n   <rect>\n    <x>530</x>\n    <y>55</y>\n    <width>75</width>\n    <height>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>0+30 Days</string>\n  </label>\n  <label>\n   <rect>\n    <x>775</x>\n    <y>55</y>\n    <width>75</width>\n    <height>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>90+ Days</string>\n  </label>\n  <label>\n   <rect>\n    <x>450</x>\n    <y>55</y>\n    <width>75</width>\n    <height>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>Current</string>\n  </label>\n  <label>\n   <rect>\n    <x>700</x>\n    <y>55</y>\n    <width>75</width>\n    <height>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>61+90 Days</string>\n  </label>\n  <label>\n   <rect>\n    <x>615</x>\n    <y>55</y>\n    <width>75</width>\n    <height>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>31+60 Days</string>\n  </label>\n  <label>\n   <rect>\n    <x>935</x>\n    <y>55</y>\n    <width>55</width>\n    <height>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>Discount</string>\n  </label>\n  <label>\n   <rect>\n    <x>370</x>\n    <y>55</y>\n    <width>75</width>\n    <height>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <top/>\n   <string>Total Amt.</string>\n  </label>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>55</y>\n    <width>75</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   <top/>\n   <string>Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>90</x>\n    <y>55</y>\n    <width>75</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   <top/>\n   <string>Vendor</string>\n  </label>\n  <line>\n   <xstart>1</xstart>\n   <ystart>72</ystart>\n   <xend>1000</xend>\n   <yend>72</yend>\n   <weight>2</weight>\n  </line>\n </rpthead>\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>935</x>\n     <y>3</y>\n     <width>55</width>\n     <height>12</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <top/>\n    <data>\n     <query>detail</query>\n     <column>apaging_disc_amt</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>0</x>\n     <y>5</y>\n     <width>80</width>\n     <height>11</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>detail</query>\n     <column>apaging_vend_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>530</x>\n     <y>5</y>\n     <width>75</width>\n     <height>12</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <top/>\n    <data>\n     <query>detail</query>\n     <column>apaging_thirty_amt</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>90</x>\n     <y>5</y>\n     <width>265</width>\n     <height>11</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>detail</query>\n     <column>apaging_vend_name</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>450</x>\n     <y>5</y>\n     <width>75</width>\n     <height>12</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <top/>\n    <data>\n     <query>detail</query>\n     <column>apaging_cur_amt</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>795</x>\n     <y>5</y>\n     <width>55</width>\n     <height>12</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <top/>\n    <data>\n     <query>detail</query>\n     <column>apaging_plus_amt</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>620</x>\n     <y>5</y>\n     <width>70</width>\n     <height>12</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <top/>\n    <data>\n     <query>detail</query>\n     <column>apaging_sixty_amt</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>705</x>\n     <y>5</y>\n     <width>70</width>\n     <height>12</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <top/>\n    <data>\n     <query>detail</query>\n     <column>apaging_ninety_amt</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>365</x>\n     <y>5</y>\n     <width>80</width>\n     <height>11</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <top/>\n    <data>\n     <query>detail</query>\n     <column>apaging_total_amt</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <lastpage/>\n  <height>102</height>\n  <field>\n   <rect>\n    <x>340</x>\n    <y>10</y>\n    <width>105</width>\n    <height>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <top/>\n   <data>\n    <query>detail</query>\n    <column>apaging_total_val</column>\n   </data>\n   <format builtin="true">qty</format>\n   <tracktotal/>\n  </field>\n  <field>\n   <rect>\n    <x>620</x>\n    <y>10</y>\n    <width>70</width>\n    <height>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <top/>\n   <data>\n    <query>detail</query>\n    <column>apaging_sixty_val</column>\n   </data>\n   <format builtin="true">qty</format>\n   <tracktotal/>\n  </field>\n  <field>\n   <rect>\n    <x>530</x>\n    <y>10</y>\n    <width>75</width>\n    <height>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <top/>\n   <data>\n    <query>detail</query>\n    <column>apaging_thirty_val</column>\n   </data>\n   <format builtin="true">qty</format>\n   <tracktotal/>\n  </field>\n  <label>\n   <rect>\n    <x>450</x>\n    <y>45</y>\n    <width>475</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   <top/>\n   <string>All amounts are in base currency as of the document date.</string>\n  </label>\n  <field>\n   <rect>\n    <x>450</x>\n    <y>10</y>\n    <width>75</width>\n    <height>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <top/>\n   <data>\n    <query>detail</query>\n    <column>apaging_cur_val</column>\n   </data>\n   <format builtin="true">qty</format>\n   <tracktotal/>\n  </field>\n  <label>\n   <rect>\n    <x>450</x>\n    <y>35</y>\n    <width>55</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   <top/>\n   <string>Note:</string>\n  </label>\n  <label>\n   <rect>\n    <x>130</x>\n    <y>10</y>\n    <width>170</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   <top/>\n   <string>Total For All Vendors</string>\n  </label>\n  <field>\n   <rect>\n    <x>710</x>\n    <y>10</y>\n    <width>70</width>\n    <height>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <top/>\n   <data>\n    <query>detail</query>\n    <column>apaging_ninety_val</column>\n   </data>\n   <format builtin="true">qty</format>\n   <tracktotal/>\n  </field>\n  <field>\n   <rect>\n    <x>780</x>\n    <y>10</y>\n    <width>75</width>\n    <height>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <top/>\n   <data>\n    <query>detail</query>\n    <column>apaging_plus_val</column>\n   </data>\n   <format builtin="true">qty</format>\n   <tracktotal/>\n  </field>\n  <field>\n   <rect>\n    <x>940</x>\n    <y>10</y>\n    <width>55</width>\n    <height>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <top/>\n   <data>\n    <query>detail</query>\n    <column>apaging_disc_val</column>\n   </data>\n   <format builtin="true">qty</format>\n   <tracktotal/>\n  </field>\n  <label>\n   <rect>\n    <x>455</x>\n    <y>80</y>\n    <width>35</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   <top/>\n   <string>Page: </string>\n  </label>\n  <field>\n   <rect>\n    <x>515</x>\n    <y>80</y>\n    <width>42</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   <top/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <line>\n   <xstart>2</xstart>\n   <ystart>4</ystart>\n   <xend>1001</xend>\n   <yend>4</yend>\n   <weight>2</weight>\n  </line>\n </pgfoot>\n <pgfoot>\n  <height>47</height>\n  <field>\n   <rect>\n    <x>515</x>\n    <y>23</y>\n    <width>42</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   <top/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>455</x>\n    <y>23</y>\n    <width>35</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   <top/>\n   <string>Page: </string>\n  </label>\n </pgfoot>\n</report>\n		1	2015-10-01 17:14:33.361434
412	APApplications	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>A/P Applications</title>\n <name>APApplications</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 formatDate(&lt;? value("startDate") ?>, 'Earliest') AS startdate,\n       formatDate(&lt;? value("endDate")   ?>, 'Latest')   AS enddate,\n       &lt;? if exists("showChecks") ?>\n         &lt;? if exists("showCreditMemos") ?>\n           'Show Checks and Credit Memos'\n         &lt;? else ?>\n           'Show Checks'\n         &lt;? endif ?>\n       &lt;? elseif exists("showCreditMemos") ?>\n          'Show Credit Memos'\n       &lt;? else ?>\n         ''\n       &lt;? endif ?> AS f_show,\n       &lt;? if exists("vend_id") ?>\n         'Vendor:' AS f_label, vend_number AS f_value\n       &lt;? elseif exists("vendtype_id") ?>\n         'Vendor Type:' AS f_label, vendtype_code AS f_value\n       &lt;? elseif exists("vendtype_pattern") ?>\n         'Vendor Type matches:' AS f_label,\n       &lt;? value("vendtype_pattern") ?> AS f_value\n       &lt;? else ?>\n         'Vendors:' AS f_label, 'All' AS f_value\n       &lt;? endif ?>\n&lt;? if exists("vend_id") ?>\n  FROM vendinfo\n  WHERE vend_id=&lt;? value("vend_id") ?>\n&lt;? elseif exists("vendtype_id") ?>\n  FROM vendtype\n  WHERE vendtype_id=&lt;? value("vendtype_id")\n&lt;? endif ?>\n;</sql>\n </querysource>\n <querysource loadFromDb="true">\n  <name>detail</name>\n  <mqlgroup>apApplications</mqlgroup>\n  <mqlname>detail</mqlname>\n </querysource>\n <rpthead>\n  <height>146</height>\n  <line>\n   <xstart>5</xstart>\n   <ystart>140</ystart>\n   <xend>745</xend>\n   <yend>140</yend>\n   <weight>2</weight>\n  </line>\n  <field>\n   <rect>\n    <x>565</x>\n    <y>63</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>100</x>\n    <y>125</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 Name</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>A/P Applications</string>\n  </label>\n  <field>\n   <rect>\n    <x>565</x>\n    <y>83</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>462</x>\n    <y>63</y>\n    <width>100</width>\n    <height>18</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>291</x>\n    <y>125</y>\n    <width>159</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>Source Document</string>\n  </label>\n  <label>\n   <rect>\n    <x>700</x>\n    <y>125</y>\n    <width>45</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>Currency</string>\n  </label>\n  <field>\n   <rect>\n    <x>10</x>\n    <y>63</y>\n    <width>139</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>head</query>\n    <column>f_label</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>159</x>\n    <y>83</y>\n    <width>350</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_show</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>630</x>\n    <y>125</y>\n    <width>55</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>Amount</string>\n  </label>\n  <label>\n   <rect>\n    <x>465</x>\n    <y>125</y>\n    <width>141</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>Apply To Document</string>\n  </label>\n  <label>\n   <rect>\n    <x>200</x>\n    <y>125</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>125</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>157</x>\n    <y>63</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>f_value</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>462</x>\n    <y>83</y>\n    <width>100</width>\n    <height>18</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 </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>26</height>\n  <label>\n   <rect>\n    <x>5</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>Vendor #</string>\n  </label>\n  <label>\n   <rect>\n    <x>100</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>Vendor Name</string>\n  </label>\n  <label>\n   <rect>\n    <x>462</x>\n    <y>5</y>\n    <width>150</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>Apply To Document</string>\n  </label>\n  <label>\n   <rect>\n    <x>635</x>\n    <y>5</y>\n    <width>55</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>Amount</string>\n  </label>\n  <label>\n   <rect>\n    <x>291</x>\n    <y>5</y>\n    <width>164</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>Source Document</string>\n  </label>\n  <label>\n   <rect>\n    <x>200</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>Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>705</x>\n    <y>5</y>\n    <width>45</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>Currency</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 </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>5</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>vend_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>620</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    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_amount</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>200</x>\n     <y>0</y>\n     <width>81</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_postdate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>500</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    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>apapply_target_docnumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>700</x>\n     <y>0</y>\n     <width>45</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>currAbbr</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>340</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    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>apapply_source_docnumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>90</x>\n     <y>0</y>\n     <width>115</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>291</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    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>apapply_source_doctype_qtdisplayrole</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>460</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    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>apapply_target_doctype_qtdisplayrole</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>16</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  <field>\n   <rect>\n    <x>104</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  <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 <rptfoot>\n  <height>16</height>\n  <field>\n   <rect>\n    <x>585</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   <right/>\n   <vcenter/>\n   <data>\n    <query>detail</query>\n    <column>base_applied</column>\n   </data>\n   <format builtin="true">money</format>\n   <tracktotal/>\n  </field>\n  <label>\n   <rect>\n    <x>430</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>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Total Applications (base):</string>\n  </label>\n </rptfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
205	APAssignmentsMasterList	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>A/P Account Assignments Master List</title>\n <name>APAssignmentsMasterList</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 (apaccnt_vendtype_id=-1) THEN apaccnt_vendtype\n            ELSE (SELECT vendtype_code FROM vendtype WHERE (vendtype_id=apaccnt_vendtype_id))\n       END AS vendtypecode,\n       formatGLAccount(apaccnt_ap_accnt_id) AS apaccnt,\n       formatGLAccount(apaccnt_prepaid_accnt_id) AS prepaidaccnt,\n       formatGLAccount(apaccnt_discount_accnt_id) AS discountaccnt\nFROM apaccnt\nORDER BY vendtypecode;</sql>\n </querysource>\n <rpthead>\n  <height>77</height>\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>250</x>\n    <y>10</y>\n    <width>495</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>A/P Account Assignments 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>Vendor Type</string>\n  </label>\n  <label>\n   <rect>\n    <x>120</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>A/P Account</string>\n  </label>\n  <label>\n   <rect>\n    <x>530</x>\n    <y>56</y>\n    <width>145</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>Discount Account</string>\n  </label>\n  <label>\n   <rect>\n    <x>320</x>\n    <y>56</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   <left/>\n   <vcenter/>\n   <string>Prepaid Account</string>\n  </label>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>7</height>\n </pghead>\n <pghead>\n  <height>22</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>120</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>A/P Account</string>\n  </label>\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>Vendor Type</string>\n  </label>\n  <label>\n   <rect>\n    <x>320</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>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Prepaid Account</string>\n  </label>\n  <label>\n   <rect>\n    <x>530</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>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Discount Account</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>17</height>\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>vendtypecode</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>120</x>\n     <y>0</y>\n     <width>175</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>apaccnt</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>320</x>\n     <y>-1</y>\n     <width>190</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>prepaidaccnt</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>530</x>\n     <y>-1</y>\n     <width>195</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>discountaccnt</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>17</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>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  <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
188	APCheck	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Sample Check Format - 3 Part - MC - Remit</title>\n <name>APCheck</name>\n <description>Sample Check Format - 3 Part - MC - Uses primary Vendor or address with names: REMIT, Remit, or remit if one exists.</description>\n <size>Letter</size>\n <portrait/>\n <topmargin>0</topmargin>\n <bottommargin>0</bottommargin>\n <rightmargin>0</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>Head</name>\n  <sql>SELECT\ncheckhead_id, checkhead_number, checkhead_for AS memo,\nformatDate(checkhead_checkdate) AS f_checkdate,\nformatMoney(checkhead_amount) AS f_amount,\nINITCAP(spellAmount(checkhead_amount, curr_id)) AS f_words,\nCASE WHEN(checkhead_void) THEN TEXT('V O I D')\n     ELSE TEXT('')\nEND AS f_void,\nCASE WHEN checkhead_recip_type = 'C' THEN (SELECT cust_number\n                                           FROM custinfo\n                                           WHERE (cust_id=checkhead_recip_id))\n     WHEN checkhead_recip_type = 'T' THEN (SELECT taxauth_code\n                                           FROM taxauth\n                                           WHERE (taxauth_id=checkhead_recip_id))\n     WHEN checkhead_recip_type = 'V' THEN (SELECT vend_number\n                                           FROM vendinfo\n                                           WHERE (vend_id=checkhead_recip_id))\n     ELSE 'Unknown Recipient Type'\nEND AS recip_number,\nformatAddr(CASE WHEN checkhead_recip_type = 'C' THEN\n                                         (SELECT cntct_addr_id\n                                          FROM cntct, custinfo\n                                          WHERE ((cust_cntct_id=cntct_id)\n                                            AND  (cust_id=checkhead_recip_id)))\n                WHEN checkhead_recip_type = 'T' THEN \n                                         (SELECT taxauth_addr_id\n                                          FROM taxauth\n                                          WHERE (taxauth_id=checkhead_recip_id))\n                WHEN checkhead_recip_type = 'V' THEN\n                        COALESCE((SELECT vendaddr_addr_id\n                                  FROM vendaddrinfo\n                                  WHERE ((UPPER(vendaddr_code)='REMIT')\n                                    AND  (vendaddr_vend_id=checkhead_recip_id))),\n                                 (SELECT vend_addr_id\n                                  FROM vendinfo\n                                  WHERE (vend_id=checkhead_recip_id)))\n           END) AS check_address,\nCASE WHEN checkhead_recip_type = 'C' THEN (SELECT cust_name\n                                           FROM custinfo\n                                           WHERE cust_id=checkhead_recip_id)\n     WHEN checkhead_recip_type = 'T' THEN (SELECT taxauth_name\n                                           FROM taxauth\n                                           WHERE taxauth_id=checkhead_recip_id)\n     WHEN checkhead_recip_type = 'V' THEN\n                         COALESCE((SELECT vendaddr_name\n                                   FROM vendaddrinfo\n                                   WHERE ((UPPER(vendaddr_code)='REMIT')\n                                     AND  (vendaddr_vend_id=checkhead_recip_id))),\n                                  (SELECT vend_name\n                                   FROM vendinfo\n                                   WHERE (vend_id=checkhead_recip_id)))\nEND AS recip_name, \ncurr_symbol, curr_abbr, curr_name\nFROM checkhead, curr_symbol\nWHERE ((checkhead_curr_id = curr_id)\n   AND (checkhead_id=&lt;? value("checkhead_id") ?>) );\n</sql>\n </querysource>\n <querysource>\n  <name>TopDetail2</name>\n  <sql>SELECT  --VOUCHER-------------\n  1 AS ord,\n  1 AS sequence_value,\n  checkitem_invcnumber,\n  checkitem_ponumber,\n  formatMoney(checkitem_amount) AS f_amount,\n  'Invoice#: ' || vohead_invcnumber AS doc_number,\n  formatDate(vohead_docdate) AS f_docdate,\n  vohead_reference AS doc_reference,\n  'Voucher: ' || checkitem_vouchernumber AS vouchernumber,\n  formatMoney(apopen_amount) AS amount,\n  formatMoney(checkitem_discount) AS disc_cred\nFROM checkitem, vohead, apopen\nWHERE ((checkitem_checkhead_id= &lt;? value("checkhead_id") ?>)\n  AND  (checkitem_vouchernumber = vohead_number)\n  AND  (apopen_docnumber = checkitem_vouchernumber)\n  AND  (apopen_doctype = 'V'))\n\nUNION\n\nSELECT --DEBIT MEMO -------------------------\n  2 AS ord,\n  1 AS sequence_value,\n  checkitem_invcnumber,\n  checkitem_ponumber,\n  formatMoney(checkitem_amount) AS f_amount,\n  'Debit Memo PO#: ' || checkitem_ponumber AS doc_number,\n  ''  AS f_docdate,\n  'Debit Memo: ' || checkitem_vouchernumber AS doc_reference,\n  checkitem_vouchernumber AS vouchernumber,\n  formatMoney(apopen_amount) AS amount,\n  formatMoney(checkitem_discount) AS disc_cred\nFROM checkitem, apopen\nWHERE ((checkitem_checkhead_id= &lt;? value("checkhead_id") ?>)\n  AND  (checkitem_vouchernumber = apopen_docnumber)\n  AND  (apopen_doctype = 'D'))\n\nUNION\n\nSELECT --CREDITs--------------------------\n  3 AS ord,\n  1 AS sequence_value,\n  checkitem_invcnumber,\n  checkitem_ponumber,\n  formatMoney(checkitem_amount) AS f_amount,\n  'Invoice#: ' || vohead_invcnumber AS doc_number,\n  formatDate(vohead_docdate) AS f_docdate,\n  'Credit Applied: ' || apapply_source_doctype || ' ' ||\n                        apapply_source_docnumber AS doc_reference,\n  'Voucher ' || checkitem_vouchernumber AS vouchernumber,\n  '' AS amount,\n  formatMoney((apapply_amount)) AS disc_cred\nFROM checkitem, vohead, apapply\nWHERE ((checkitem_checkhead_id=&lt;? value("checkhead_id") ?>)\n  AND  (checkitem_vouchernumber = vohead_number)\n  AND  (apapply_target_docnumber = checkitem_vouchernumber ))\n\nUNION \n\nSELECT --NON-VENDOR-----------------------\n  4 AS ord,\n  1 AS sequence_value,\n  checkitem_invcnumber,\n  checkitem_ponumber,\n  formatMoney(checkitem_amount) AS f_amount,\n  checkitem_invcnumber AS doc_number,\n  formatDate(checkitem_docdate) AS f_docdate,\n  '' AS doc_reference,\n  '' AS vouchernumber,\n  '' AS amount,\n  '' AS disc_cred\nFROM checkhead LEFT OUTER JOIN\n     checkitem ON (checkitem_checkhead_id=checkhead_id)\nWHERE ((checkhead_id=&lt;? value("checkhead_id") ?>) \n  AND  (checkhead_recip_type != 'V'))\n\nUNION \n\nSELECT --BLANK LINES FOR SPACING------------------\n 5 AS ord,\n sequence_value,\n '' AS checkkitem_invcnumber,\n '' AS checkitem_ponumber,\n '' AS f_amount,\n '' AS vohead_invcnumber,\n '' AS f_docdate,\n '' AS doc_reference,\n '' AS vouchernumber,\n '' AS amount,\n '' AS disc_cred\nFROM sequence\n\nORDER BY ord \nLIMIT 16;</sql>\n </querysource>\n <pghead>\n  <height>6</height>\n </pghead>\n <section>\n  <name>Top Detail Header</name>\n  <detail>\n   <key>\n    <query>Head</query>\n   </key>\n   <height>51</height>\n   <field>\n    <rect>\n     <x>305</x>\n     <y>30</y>\n     <width>147</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    <top/>\n    <data>\n     <query>Context Query</query>\n     <column>report_date</column>\n    </data>\n   </field>\n   <label>\n    <rect>\n     <x>175</x>\n     <y>30</y>\n     <width>75</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    <top/>\n    <string>Reference:</string>\n   </label>\n   <field>\n    <rect>\n     <x>305</x>\n     <y>15</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    <bottom/>\n    <data>\n     <query>Head</query>\n     <column>recip_name</column>\n    </data>\n   </field>\n   <label>\n    <rect>\n     <x>640</x>\n     <y>15</y>\n     <width>61</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <top/>\n    <string>Check #</string>\n   </label>\n   <line>\n    <xstart>5</xstart>\n    <ystart>45</ystart>\n    <xend>805</xend>\n    <yend>45</yend>\n    <weight>0</weight>\n   </line>\n   <line>\n    <xstart>51</xstart>\n    <ystart>7</ystart>\n    <xend>51</xend>\n    <yend>7</yend>\n    <weight>0</weight>\n   </line>\n   <field>\n    <rect>\n     <x>705</x>\n     <y>15</y>\n     <width>90</width>\n     <height>15</height>\n    </rect>\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>checkhead_number</column>\n    </data>\n   </field>\n   <label>\n    <rect>\n     <x>600</x>\n     <y>30</y>\n     <width>85</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    <top/>\n    <string>Discount / Credit:</string>\n   </label>\n   <label>\n    <rect>\n     <x>5</x>\n     <y>30</y>\n     <width>111</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    <top/>\n    <string>Invoice / Document:</string>\n   </label>\n   <field>\n    <rect>\n     <x>494</x>\n     <y>15</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    <bottom/>\n    <data>\n     <query>Head</query>\n     <column>recip_number</column>\n    </data>\n   </field>\n   <label>\n    <rect>\n     <x>530</x>\n     <y>30</y>\n     <width>45</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    <top/>\n    <string>Amount:</string>\n   </label>\n  </detail>\n </section>\n <section>\n  <name>Top Detail</name>\n  <detail>\n   <key>\n    <query>TopDetail2</query>\n   </key>\n   <height>16</height>\n   <field>\n    <rect>\n     <x>5</x>\n     <y>0</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    <data>\n     <query>TopDetail2</query>\n     <column>doc_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>610</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    <data>\n     <query>TopDetail2</query>\n     <column>disc_cred</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>310</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    <data>\n     <query>TopDetail2</query>\n     <column>docdate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>175</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>normal</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>TopDetail2</query>\n     <column>doc_reference</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>468</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    <data>\n     <query>TopDetail2</query>\n     <column>amount</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <section>\n  <name>Top Detail Amount</name>\n  <detail>\n   <key>\n    <query>Head</query>\n   </key>\n   <height>36</height>\n   <label>\n    <rect>\n     <x>20</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    <left/>\n    <top/>\n    <string>Memo:</string>\n   </label>\n   <field>\n    <rect>\n     <x>468</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    <top/>\n    <data>\n     <query>Head</query>\n     <column>f_amount</column>\n    </data>\n   </field>\n   <label>\n    <rect>\n     <x>340</x>\n     <y>0</y>\n     <width>75</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    <top/>\n    <string>Check Total:</string>\n   </label>\n   <field>\n    <rect>\n     <x>70</x>\n     <y>15</y>\n     <width>690</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    <top/>\n    <data>\n     <query>Head</query>\n     <column>memo</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>395</x>\n     <y>0</y>\n     <width>55</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    <top/>\n    <data>\n     <query>Head</query>\n     <column>curr_symbol</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <section>\n  <name>Apchkitem</name>\n  <detail>\n   <key>\n    <query>Head</query>\n   </key>\n   <height>301</height>\n   <field>\n    <rect>\n     <x>25</x>\n     <y>120</y>\n     <width>225</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    <top/>\n    <data>\n     <query>Head</query>\n     <column>recip_name</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>420</x>\n     <y>100</y>\n     <width>121</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    <top/>\n    <data>\n     <query>Head</query>\n     <column>f_checkdate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>615</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>normal</weight>\n    </font>\n    <right/>\n    <top/>\n    <data>\n     <query>Head</query>\n     <column>f_amount</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>30</x>\n     <y>55</y>\n     <width>560</width>\n     <height>24</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>f_words</column>\n    </data>\n   </field>\n   <text>\n    <rect>\n     <x>25</x>\n     <y>135</y>\n     <width>270</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>check_address</column>\n    </data>\n   </text>\n   <field>\n    <rect>\n     <x>70</x>\n     <y>280</y>\n     <width>690</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    <top/>\n    <data>\n     <query>Head</query>\n     <column>memo</column>\n    </data>\n   </field>\n   <label>\n    <rect>\n     <x>20</x>\n     <y>280</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    <top/>\n    <string>Memo:</string>\n   </label>\n   <field>\n    <rect>\n     <x>560</x>\n     <y>100</y>\n     <width>55</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    <top/>\n    <data>\n     <query>Head</query>\n     <column>curr_symbol</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <section>\n  <name>Bottom Detail Header</name>\n  <detail>\n   <key>\n    <query>Head</query>\n   </key>\n   <height>41</height>\n   <label>\n    <rect>\n     <x>600</x>\n     <y>20</y>\n     <width>85</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    <top/>\n    <string>Discount / Credit:</string>\n   </label>\n   <label>\n    <rect>\n     <x>175</x>\n     <y>20</y>\n     <width>75</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    <top/>\n    <string>Reference:</string>\n   </label>\n   <label>\n    <rect>\n     <x>5</x>\n     <y>20</y>\n     <width>110</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    <top/>\n    <string>Invoice / Document:</string>\n   </label>\n   <field>\n    <rect>\n     <x>520</x>\n     <y>0</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    <bottom/>\n    <data>\n     <query>Head</query>\n     <column>recip_number</column>\n    </data>\n   </field>\n   <label>\n    <rect>\n     <x>530</x>\n     <y>20</y>\n     <width>45</width>\n     <height>14</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>Amount:</string>\n   </label>\n   <field>\n    <rect>\n     <x>320</x>\n     <y>15</y>\n     <width>147</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    <top/>\n    <data>\n     <query>Context Query</query>\n     <column>report_date</column>\n    </data>\n   </field>\n   <label>\n    <rect>\n     <x>645</x>\n     <y>0</y>\n     <width>61</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <top/>\n    <string>Check #</string>\n   </label>\n   <field>\n    <rect>\n     <x>710</x>\n     <y>0</y>\n     <width>90</width>\n     <height>15</height>\n    </rect>\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>checkhead_number</column>\n    </data>\n   </field>\n   <line>\n    <xstart>0</xstart>\n    <ystart>35</ystart>\n    <xend>800</xend>\n    <yend>35</yend>\n    <weight>0</weight>\n   </line>\n   <field>\n    <rect>\n     <x>320</x>\n     <y>0</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    <bottom/>\n    <data>\n     <query>Head</query>\n     <column>recip_name</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <section>\n  <name>Bottom Detail</name>\n  <detail>\n   <key>\n    <query>TopDetail2</query>\n   </key>\n   <height>16</height>\n   <field>\n    <rect>\n     <x>175</x>\n     <y>0</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    <data>\n     <query>TopDetail2</query>\n     <column>doc_reference</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>5</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>normal</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>TopDetail2</query>\n     <column>doc_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>468</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    <data>\n     <query>TopDetail2</query>\n     <column>amount</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>610</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    <data>\n     <query>TopDetail2</query>\n     <column>disc_cred</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>340</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    <data>\n     <query>TopDetail2</query>\n     <column>docdate</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <section>\n  <name>Bottom Detail Amount</name>\n  <detail>\n   <key>\n    <query>Head</query>\n   </key>\n   <height>37</height>\n   <field>\n    <rect>\n     <x>70</x>\n     <y>15</y>\n     <width>690</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    <top/>\n    <data>\n     <query>Head</query>\n     <column>memo</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>408</x>\n     <y>0</y>\n     <width>55</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    <top/>\n    <data>\n     <query>Head</query>\n     <column>curr_symbol</column>\n    </data>\n   </field>\n   <label>\n    <rect>\n     <x>355</x>\n     <y>0</y>\n     <width>65</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    <top/>\n    <string>Check Total:</string>\n   </label>\n   <label>\n    <rect>\n     <x>20</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    <left/>\n    <top/>\n    <string>Memo:</string>\n   </label>\n   <field>\n    <rect>\n     <x>468</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    <top/>\n    <data>\n     <query>Head</query>\n     <column>f_amount</column>\n    </data>\n   </field>\n  </detail>\n </section>\n</report>\n	Sample Check Format - 3 Part - MC - Uses primary Vendor or address with names: REMIT, Remit, or remit if one exists.	0	2015-10-01 17:14:33.361434
254	APOpenItemsByVendor	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Open Payables</title>\n <name>APOpenItemsByVendor</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 vend_name FROM vendinfo WHERE vend_id=&lt;? value("vend_id") ?>)\n&lt;? elseif exists("vendtype_id") ?>\n       (SELECT 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       currConcat(baseCurrId()) AS baseCurr,\n       formatDate(&lt;? value("startDate") ?>, 'Earliest') AS startdate,\n       formatDate(&lt;? value("endDate") ?>, 'Latest') AS enddate,\n       formatDate(&lt;? value("asofDate") ?>) AS asofDate;</sql>\n </querysource>\n <querysource loadFromDb="true" >\n  <name>detail</name>\n  <mqlgroup>apOpenItems</mqlgroup>\n  <mqlname>detail</mqlname>\n </querysource>\n <rpthead>\n  <height>166</height>\n  <line>\n   <xstart>5</xstart>\n   <ystart>160</ystart>\n   <xend>745</xend>\n   <yend>160</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>250</x>\n    <y>143</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>P/O #</string>\n  </label>\n  <label>\n   <rect>\n    <x>445</x>\n    <y>108</y>\n    <width>100</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   <string>As of Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>530</x>\n    <y>143</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>Paid</string>\n  </label>\n  <field>\n   <rect>\n    <x>550</x>\n    <y>108</y>\n    <width>100</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>head</query>\n    <column>asofDate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>270</x>\n    <y>8</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>Open Payables</string>\n  </label>\n  <label>\n   <rect>\n    <x>445</x>\n    <y>83</y>\n    <width>100</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   <string>End Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>550</x>\n    <y>65</y>\n    <width>100</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>head</query>\n    <column>startdate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>445</x>\n    <y>65</y>\n    <width>100</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   <string>Start Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>585</x>\n    <y>143</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>Balance</string>\n  </label>\n  <label>\n   <rect>\n    <x>390</x>\n    <y>143</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>470</x>\n    <y>143</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>Amount</string>\n  </label>\n  <field>\n   <rect>\n    <x>550</x>\n    <y>83</y>\n    <width>100</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>head</query>\n    <column>enddate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>143</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>Doc. Type</string>\n  </label>\n  <label>\n   <rect>\n    <x>75</x>\n    <y>143</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>Doc.#</string>\n  </label>\n  <label>\n   <rect>\n    <x>305</x>\n    <y>143</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>Doc. Date</string>\n  </label>\n  <field>\n   <rect>\n    <x>695</x>\n    <y>143</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   <data>\n    <query>head</query>\n    <column>baseCurr</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>645</x>\n    <y>143</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>Curr</string>\n  </label>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>65</y>\n    <width>100</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   <string>Selection:</string>\n  </label>\n  <field>\n   <rect>\n    <x>110</x>\n    <y>65</y>\n    <width>250</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>head</query>\n    <column>selection</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>130</x>\n    <y>143</y>\n    <width>115</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>Vendor</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>530</x>\n    <y>4</y>\n    <width>50</width>\n    <height>16</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>Paid</string>\n  </label>\n  <label>\n   <rect>\n    <x>305</x>\n    <y>4</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>Doc. Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>4</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>Doc. Type</string>\n  </label>\n  <label>\n   <rect>\n    <x>75</x>\n    <y>4</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>Doc.#</string>\n  </label>\n  <label>\n   <rect>\n    <x>585</x>\n    <y>4</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>Balance</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>470</x>\n    <y>4</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>Amount</string>\n  </label>\n  <label>\n   <rect>\n    <x>390</x>\n    <y>4</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>250</x>\n    <y>4</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>P/O #</string>\n  </label>\n  <label>\n   <rect>\n    <x>645</x>\n    <y>4</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>Curr</string>\n  </label>\n  <field>\n   <rect>\n    <x>695</x>\n    <y>4</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   <data>\n    <query>head</query>\n    <column>baseCurr</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>130</x>\n    <y>4</y>\n    <width>115</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>Vendor</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>305</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_docdate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>250</x>\n     <y>2</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>apopen_ponumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>585</x>\n     <y>2</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    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_balance</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>530</x>\n     <y>2</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    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_paid</column>\n    </data>\n   </field>\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    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_doctype</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>390</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>475</x>\n     <y>2</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    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_amount</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>75</x>\n     <y>2</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>apopen_docnumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>695</x>\n     <y>2</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    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_base_balance</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>640</x>\n     <y>2</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    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>currAbbr</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>130</x>\n     <y>2</y>\n     <width>115</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  </detail>\n </section>\n <pgfoot>\n  <height>16</height>\n  <field>\n   <rect>\n    <x>102</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>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 <rptfoot>\n  <height>16</height>\n  <label>\n   <rect>\n    <x>500</x>\n    <y>0</y>\n    <width>130</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>Total:</string>\n  </label>\n  <field>\n   <rect>\n    <x>642</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   <right/>\n   <vcenter/>\n   <data>\n    <query>detail</query>\n    <column>base_balance</column>\n   </data>\n   <format builtin="true" >qty</format>\n   <tracktotal/>\n  </field>\n </rptfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
284	ARAging	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>AR 30 60 90 Aging</title>\n <name>ARAging</name>\n <description>Enhanced AR Aging - Uses 30-60-90 columns - User provides Relative Date - all amounts in base currency based on Document Date.</description>\n <grid>\n  <snap/>\n  <show/>\n  <x>0.05</x>\n  <y>0.05</y>\n </grid>\n <size>Letter</size>\n <landscape/>\n <topmargin>100</topmargin>\n <bottommargin>100</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT \n\taraging_docdate,\n\taraging_duedate,\n\taraging_ponumber,\n\taraging_docnumber,\n\taraging_doctype,\n\taraging_cust_id,\n\taraging_cust_number,\n\taraging_cust_name,\n\taraging_cust_custtype_id,\n\taraging_custtype_code,\n\taraging_terms_descrip,\n\tformatMoney(araging_aropen_amount) AS araging_aropen_amount,\n\taraging_cur_val,   formatMoney(araging_cur_val)    AS araging_cur_amt,\n\taraging_thirty_val,formatMoney(araging_thirty_val) AS araging_thirty_amt,\n\taraging_sixty_val, formatMoney(araging_sixty_val)  AS araging_sixty_amt,\n\taraging_ninety_val,formatMoney(araging_ninety_val) AS araging_ninety_amt,\n\taraging_plus_val,  formatMoney(araging_plus_val)   AS araging_plus_amt,\n\taraging_total_val, formatMoney(araging_total_val)  AS araging_total_amt\nFROM araging(&lt;? value("relDate") ?>, &lt;? value("useDocDate") ?>)\n&lt;? if exists("cust_id") ?>\n   WHERE (araging_cust_id=&lt;? value("cust_id") ?>)\n&lt;? elseif exists("custtype_id") ?>\n   WHERE (araging_cust_custtype_id=&lt;? value("custtype_id") ?>)\n&lt;? elseif exists("custgrp_id") ?>\n   LEFT OUTER JOIN custgrpitem ON (araging_cust_id=custgrpitem_cust_id)\n   WHERE (custgrpitem_custgrp_id=&lt;? value("custgrp_id") ?>)\n&lt;? elseif exists("custtype_pattern") ?>\n   WHERE (araging_custtype_code ~ &lt;? value("custtype_pattern") ?>)\n&lt;? endif ?>;</sql>\n </querysource>\n <rpthead>\n  <height>81</height>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>40</y>\n    <width>50</width>\n    <height>11</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>As of:</string>\n  </label>\n  <field>\n   <rect>\n    <x>60</x>\n    <y>40</y>\n    <width>110</width>\n    <height>11</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>Parameter Query</query>\n    <column>relDate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>0</y>\n    <width>365</width>\n    <height>31</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <top/>\n   <string>Accounts Receivable Aging Report</string>\n  </label>\n </rpthead>\n <section>\n  <name>detail</name>\n  <group>\n   <name>Customer</name>\n   <column>araging_cust_number</column>\n   <pagebreak when="after foot"/>\n   <head>\n    <height>113</height>\n    <label>\n     <rect>\n      <x>891</x>\n      <y>85</y>\n      <width>75</width>\n      <height>11</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>90+ Days</string>\n    </label>\n    <line>\n     <xstart>0</xstart>\n     <ystart>100</ystart>\n     <xend>980</xend>\n     <yend>100</yend>\n     <weight>0</weight>\n    </line>\n    <label>\n     <rect>\n      <x>740</x>\n      <y>85</y>\n      <width>75</width>\n      <height>11</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>31-60 Days</string>\n    </label>\n    <label>\n     <rect>\n      <x>35</x>\n      <y>85</y>\n      <width>85</width>\n      <height>11</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>Invoice#</string>\n    </label>\n    <label>\n     <rect>\n      <x>5</x>\n      <y>40</y>\n      <width>102</width>\n      <height>11</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>Terms:</string>\n    </label>\n    <label>\n     <rect>\n      <x>0</x>\n      <y>85</y>\n      <width>25</width>\n      <height>11</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>Type</string>\n    </label>\n    <line>\n     <xstart>0</xstart>\n     <ystart>5</ystart>\n     <xend>967</xend>\n     <yend>5</yend>\n     <weight>0</weight>\n    </line>\n    <field>\n     <rect>\n      <x>125</x>\n      <y>40</y>\n      <width>220</width>\n      <height>11</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>araging_terms_descrip</column>\n     </data>\n    </field>\n    <label>\n     <rect>\n      <x>825</x>\n      <y>85</y>\n      <width>75</width>\n      <height>11</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>61-90 Days</string>\n    </label>\n    <label>\n     <rect>\n      <x>125</x>\n      <y>85</y>\n      <width>60</width>\n      <height>11</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>Doc Date</string>\n    </label>\n    <label>\n     <rect>\n      <x>490</x>\n      <y>75</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>Original</string>\n    </label>\n    <label>\n     <rect>\n      <x>650</x>\n      <y>85</y>\n      <width>75</width>\n      <height>11</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>0-30 Days</string>\n    </label>\n    <label>\n     <rect>\n      <x>490</x>\n      <y>85</y>\n      <width>80</width>\n      <height>11</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>Doc Amount</string>\n    </label>\n    <field>\n     <rect>\n      <x>125</x>\n      <y>25</y>\n      <width>220</width>\n      <height>11</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>araging_cust_number</column>\n     </data>\n    </field>\n    <label>\n     <rect>\n      <x>35</x>\n      <y>75</y>\n      <width>85</width>\n      <height>11</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>Debit Memo/</string>\n    </label>\n    <label>\n     <rect>\n      <x>5</x>\n      <y>10</y>\n      <width>102</width>\n      <height>11</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>Customer Name:</string>\n    </label>\n    <field>\n     <rect>\n      <x>125</x>\n      <y>10</y>\n      <width>220</width>\n      <height>11</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>araging_cust_name</column>\n     </data>\n    </field>\n    <label>\n     <rect>\n      <x>570</x>\n      <y>85</y>\n      <width>75</width>\n      <height>11</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>0+Days</string>\n    </label>\n    <label>\n     <rect>\n      <x>215</x>\n      <y>85</y>\n      <width>60</width>\n      <height>11</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>35</x>\n      <y>65</y>\n      <width>85</width>\n      <height>11</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>Credit/</string>\n    </label>\n    <label>\n     <rect>\n      <x>340</x>\n      <y>85</y>\n      <width>85</width>\n      <height>11</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>PO Number</string>\n    </label>\n    <label>\n     <rect>\n      <x>5</x>\n      <y>25</y>\n      <width>102</width>\n      <height>11</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>Customer Number:</string>\n    </label>\n   </head>\n   <foot>\n    <height>111</height>\n    <field>\n     <rect>\n      <x>825</x>\n      <y>8</y>\n      <width>70</width>\n      <height>11</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>araging_ninety_val</column>\n     </data>\n     <format builtin="true">qty</format>\n     <tracktotal subtotal="true"/>\n    </field>\n    <field>\n     <rect>\n      <x>740</x>\n      <y>8</y>\n      <width>70</width>\n      <height>11</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>araging_sixty_val</column>\n     </data>\n     <format builtin="true">qty</format>\n     <tracktotal subtotal="true"/>\n    </field>\n    <field>\n     <rect>\n      <x>250</x>\n      <y>50</y>\n      <width>75</width>\n      <height>11</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>araging_total_val</column>\n     </data>\n     <format builtin="true">qty</format>\n     <tracktotal subtotal="true"/>\n    </field>\n    <field>\n     <rect>\n      <x>570</x>\n      <y>8</y>\n      <width>75</width>\n      <height>11</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>araging_cur_val</column>\n     </data>\n     <format builtin="true">qty</format>\n     <tracktotal subtotal="true"/>\n    </field>\n    <field>\n     <rect>\n      <x>650</x>\n      <y>8</y>\n      <width>75</width>\n      <height>11</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>araging_thirty_val</column>\n     </data>\n     <format builtin="true">qty</format>\n     <tracktotal subtotal="true"/>\n    </field>\n    <label>\n     <rect>\n      <x>5</x>\n      <y>35</y>\n      <width>135</width>\n      <height>11</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>Total For Customer</string>\n    </label>\n    <field>\n     <rect>\n      <x>5</x>\n      <y>50</y>\n      <width>220</width>\n      <height>11</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>araging_cust_name</column>\n     </data>\n    </field>\n    <line>\n     <xstart>0</xstart>\n     <ystart>5</ystart>\n     <xend>967</xend>\n     <yend>5</yend>\n     <weight>0</weight>\n    </line>\n    <field>\n     <rect>\n      <x>900</x>\n      <y>8</y>\n      <width>70</width>\n      <height>11</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>araging_plus_val</column>\n     </data>\n     <format builtin="true">qty</format>\n     <tracktotal subtotal="true"/>\n    </field>\n    <label>\n     <rect>\n      <x>570</x>\n      <y>75</y>\n      <width>440</width>\n      <height>11</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>All amounts are in base currency as of the document date.</string>\n    </label>\n    <label>\n     <rect>\n      <x>570</x>\n      <y>60</y>\n      <width>41</width>\n      <height>11</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>Note:</string>\n    </label>\n    <line>\n     <xstart>237</xstart>\n     <ystart>31</ystart>\n     <xend>237</xend>\n     <yend>31</yend>\n     <weight>0</weight>\n    </line>\n    <label>\n     <rect>\n      <x>-35</x>\n      <y>12</y>\n      <width>41</width>\n      <height>11</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <top/>\n     <string></string>\n    </label>\n   </foot>\n  </group>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>18</height>\n   <field>\n    <rect>\n     <x>740</x>\n     <y>0</y>\n     <width>70</width>\n     <height>11</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>araging_sixty_amt</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>480</x>\n     <y>0</y>\n     <width>80</width>\n     <height>11</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>araging_aropen_amount</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>0</x>\n     <y>0</y>\n     <width>25</width>\n     <height>11</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>araging_doctype</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>40</x>\n     <y>0</y>\n     <width>61</width>\n     <height>11</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>araging_docnumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>215</x>\n     <y>0</y>\n     <width>85</width>\n     <height>11</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>araging_duedate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>910</x>\n     <y>0</y>\n     <width>55</width>\n     <height>11</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>araging_plus_amt</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>825</x>\n     <y>0</y>\n     <width>70</width>\n     <height>11</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>araging_ninety_amt</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>120</x>\n     <y>0</y>\n     <width>85</width>\n     <height>11</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>araging_docdate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>340</x>\n     <y>0</y>\n     <width>61</width>\n     <height>11</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>araging_ponumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>570</x>\n     <y>0</y>\n     <width>75</width>\n     <height>11</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>araging_cur_amt</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>650</x>\n     <y>0</y>\n     <width>75</width>\n     <height>11</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>araging_thirty_amt</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <lastpage/>\n  <height>103</height>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>50</y>\n    <width>170</width>\n    <height>11</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>Total For All Customers</string>\n  </label>\n  <field>\n   <rect>\n    <x>650</x>\n    <y>5</y>\n    <width>75</width>\n    <height>11</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>detail</query>\n    <column>araging_thirty_val</column>\n   </data>\n   <format builtin="true">qty</format>\n   <tracktotal/>\n  </field>\n  <field>\n   <rect>\n    <x>740</x>\n    <y>5</y>\n    <width>70</width>\n    <height>11</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>detail</query>\n    <column>araging_sixty_val</column>\n   </data>\n   <format builtin="true">qty</format>\n   <tracktotal/>\n  </field>\n  <label>\n   <rect>\n    <x>385</x>\n    <y>75</y>\n    <width>35</width>\n    <height>11</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>Page: </string>\n  </label>\n  <label>\n   <rect>\n    <x>165</x>\n    <y>5</y>\n    <width>170</width>\n    <height>11</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>Report Totals:</string>\n  </label>\n  <field>\n   <rect>\n    <x>570</x>\n    <y>5</y>\n    <width>75</width>\n    <height>11</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>detail</query>\n    <column>araging_cur_val</column>\n   </data>\n   <format builtin="true">qty</format>\n   <tracktotal/>\n  </field>\n  <field>\n   <rect>\n    <x>910</x>\n    <y>5</y>\n    <width>55</width>\n    <height>11</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>detail</query>\n    <column>araging_plus_val</column>\n   </data>\n   <format builtin="true">qty</format>\n   <tracktotal/>\n  </field>\n  <line>\n   <xstart>1</xstart>\n   <ystart>1</ystart>\n   <xend>967</xend>\n   <yend>1</yend>\n   <weight>2</weight>\n  </line>\n  <field>\n   <rect>\n    <x>440</x>\n    <y>75</y>\n    <width>41</width>\n    <height>11</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>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>250</x>\n    <y>50</y>\n    <width>75</width>\n    <height>11</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>detail</query>\n    <column>araging_total_val</column>\n   </data>\n   <format builtin="true">qty</format>\n   <tracktotal/>\n  </field>\n  <label>\n   <rect>\n    <x>570</x>\n    <y>65</y>\n    <width>440</width>\n    <height>11</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>All amounts are in base currency as of the document date.</string>\n  </label>\n  <label>\n   <rect>\n    <x>570</x>\n    <y>50</y>\n    <width>41</width>\n    <height>11</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>Note:</string>\n  </label>\n  <field>\n   <rect>\n    <x>825</x>\n    <y>5</y>\n    <width>70</width>\n    <height>11</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>detail</query>\n    <column>araging_ninety_val</column>\n   </data>\n   <format builtin="true">qty</format>\n   <tracktotal/>\n  </field>\n </pgfoot>\n <pgfoot>\n  <height>57</height>\n  <field>\n   <rect>\n    <x>440</x>\n    <y>20</y>\n    <width>41</width>\n    <height>11</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>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>385</x>\n    <y>20</y>\n    <width>35</width>\n    <height>11</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>Page: </string>\n  </label>\n </pgfoot>\n</report>\n	Enhanced AR Aging - Uses 30-60-90 columns - User provides Relative Date - all amounts in base currency based on Document Date.	0	2015-10-01 17:14:33.361434
483	ARAgingSummary	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>AR 30 60 90 Aging Customer Summary</title>\n <name>ARAgingSummary</name>\n <description>Enhanced AR Aging - Uses 30-60-90 columns - User provides Relative Date - all amounts in base currency based on Document Date.\n\nCustomer Summarised 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 <landscape/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>40</rightmargin>\n <leftmargin>40</leftmargin>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT \n\taraging_cust_id,\n\taraging_cust_number,\n\taraging_cust_name,\n\taraging_cust_custtype_id,\n\taraging_custtype_code,\n\taraging_terms_descrip,\n\tformatMoney(SUM(araging_aropen_amount)) AS araging_aropen_amount,\n\tSUM(araging_cur_val) AS araging_cur_val, formatMoney(SUM(araging_cur_val)) AS araging_cur_amt,\n\tSUM(araging_thirty_val) AS araging_thirty_val, formatMoney(SUM(araging_thirty_val)) AS araging_thirty_amt,\n\tSUM(araging_sixty_val) AS araging_sixty_val, formatMoney(SUM(araging_sixty_val))  AS araging_sixty_amt,\n\tSUM(araging_ninety_val) AS araging_ninety_val, formatMoney(SUM(araging_ninety_val)) AS araging_ninety_amt,\n\tSUM(araging_plus_val) AS araging_plus_val,  formatMoney(SUM(araging_plus_val))   AS araging_plus_amt,\n\tSUM(araging_total_val) AS araging_total_val, formatMoney(SUM(araging_total_val))  AS araging_total_amt\nFROM araging(&lt;? value("relDate") ?>, &lt;? value("useDocDate") ?>)\n&lt;? if exists("cust_id") ?>\n   WHERE (araging_cust_id=&lt;? value("cust_id") ?>)\n&lt;? elseif exists("custtype_id") ?>\n   WHERE (araging_cust_custtype_id=&lt;? value("custtype_id") ?>)\n&lt;? elseif exists("custgrp_id") ?>\n   LEFT OUTER JOIN custgrpitem ON (araging_cust_id=custgrpitem_cust_id)\n   WHERE (custgrpitem_custgrp_id=&lt;? value("custgrp_id") ?>)\n&lt;? elseif exists("custtype_pattern") ?>\n   WHERE (araging_custtype_code ~ &lt;? value("custtype_pattern") ?>)\n&lt;? endif ?>\nGROUP BY \taraging_cust_id,\n\taraging_cust_number,\n\taraging_cust_name,\n\taraging_cust_custtype_id,\n\taraging_custtype_code,\n\taraging_terms_descrip ;</sql>\n </querysource>\n <rpthead>\n  <height>81</height>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>40</y>\n    <width>50</width>\n    <height>11</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>As of:</string>\n  </label>\n  <field>\n   <rect>\n    <x>60</x>\n    <y>40</y>\n    <width>110</width>\n    <height>11</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>Parameter Query</query>\n    <column>relDate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>0</y>\n    <width>420</width>\n    <height>31</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <top/>\n   <string>Accounts Receivable Aging Report Summary</string>\n  </label>\n  <label>\n   <rect>\n    <x>780</x>\n    <y>60</y>\n    <width>75</width>\n    <height>11</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>31-60 Days</string>\n  </label>\n  <label>\n   <rect>\n    <x>695</x>\n    <y>60</y>\n    <width>75</width>\n    <height>11</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>0-30 Days</string>\n  </label>\n  <label>\n   <rect>\n    <x>860</x>\n    <y>60</y>\n    <width>75</width>\n    <height>11</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>61-90 Days</string>\n  </label>\n  <label>\n   <rect>\n    <x>615</x>\n    <y>60</y>\n    <width>75</width>\n    <height>11</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>0+Days</string>\n  </label>\n  <label>\n   <rect>\n    <x>935</x>\n    <y>60</y>\n    <width>75</width>\n    <height>11</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>90+ Days</string>\n  </label>\n  <line>\n   <xstart>6</xstart>\n   <ystart>76</ystart>\n   <xend>1013</xend>\n   <yend>76</yend>\n   <weight>0</weight>\n  </line>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>60</y>\n    <width>75</width>\n    <height>11</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>Number:</string>\n  </label>\n  <label>\n   <rect>\n    <x>90</x>\n    <y>60</y>\n    <width>102</width>\n    <height>11</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>Customer Name:</string>\n  </label>\n  <label>\n   <rect>\n    <x>375</x>\n    <y>60</y>\n    <width>102</width>\n    <height>11</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>Terms:</string>\n  </label>\n  <label>\n   <rect>\n    <x>535</x>\n    <y>60</y>\n    <width>75</width>\n    <height>11</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Total Amt.</string>\n  </label>\n </rpthead>\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>695</x>\n     <y>4</y>\n     <width>75</width>\n     <height>11</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>araging_thirty_amt</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>935</x>\n     <y>4</y>\n     <width>75</width>\n     <height>11</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>araging_plus_amt</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>860</x>\n     <y>4</y>\n     <width>75</width>\n     <height>11</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>araging_ninety_amt</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>615</x>\n     <y>4</y>\n     <width>75</width>\n     <height>11</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>araging_cur_amt</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>785</x>\n     <y>4</y>\n     <width>70</width>\n     <height>11</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>araging_sixty_amt</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>5</x>\n     <y>4</y>\n     <width>80</width>\n     <height>11</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>araging_cust_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>90</x>\n     <y>4</y>\n     <width>275</width>\n     <height>11</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>araging_cust_name</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>375</x>\n     <y>4</y>\n     <width>140</width>\n     <height>11</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>araging_terms_descrip</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>525</x>\n     <y>4</y>\n     <width>85</width>\n     <height>11</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>araging_total_amt</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <lastpage/>\n  <height>103</height>\n  <label>\n   <rect>\n    <x>125</x>\n    <y>10</y>\n    <width>170</width>\n    <height>11</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>Total For All Customers</string>\n  </label>\n  <field>\n   <rect>\n    <x>695</x>\n    <y>10</y>\n    <width>75</width>\n    <height>11</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>araging_thirty_val</column>\n   </data>\n   <format builtin="true">qty</format>\n   <tracktotal/>\n  </field>\n  <field>\n   <rect>\n    <x>785</x>\n    <y>10</y>\n    <width>70</width>\n    <height>11</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>araging_sixty_val</column>\n   </data>\n   <format builtin="true">qty</format>\n   <tracktotal/>\n  </field>\n  <label>\n   <rect>\n    <x>385</x>\n    <y>75</y>\n    <width>35</width>\n    <height>11</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>Page: </string>\n  </label>\n  <field>\n   <rect>\n    <x>615</x>\n    <y>10</y>\n    <width>75</width>\n    <height>11</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>araging_cur_val</column>\n   </data>\n   <format builtin="true">qty</format>\n   <tracktotal/>\n  </field>\n  <field>\n   <rect>\n    <x>935</x>\n    <y>10</y>\n    <width>75</width>\n    <height>11</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>araging_plus_val</column>\n   </data>\n   <format builtin="true">qty</format>\n   <tracktotal/>\n  </field>\n  <line>\n   <xstart>6</xstart>\n   <ystart>4</ystart>\n   <xend>1018</xend>\n   <yend>4</yend>\n   <weight>2</weight>\n  </line>\n  <field>\n   <rect>\n    <x>440</x>\n    <y>75</y>\n    <width>41</width>\n    <height>11</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>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>525</x>\n    <y>10</y>\n    <width>85</width>\n    <height>11</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>araging_total_val</column>\n   </data>\n   <format builtin="true">qty</format>\n   <tracktotal/>\n  </field>\n  <label>\n   <rect>\n    <x>570</x>\n    <y>65</y>\n    <width>440</width>\n    <height>11</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>All amounts are in base currency as of the document date.</string>\n  </label>\n  <label>\n   <rect>\n    <x>570</x>\n    <y>50</y>\n    <width>41</width>\n    <height>11</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>Note:</string>\n  </label>\n  <field>\n   <rect>\n    <x>860</x>\n    <y>10</y>\n    <width>75</width>\n    <height>11</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>araging_ninety_val</column>\n   </data>\n   <format builtin="true">qty</format>\n   <tracktotal/>\n  </field>\n </pgfoot>\n <pgfoot>\n  <height>57</height>\n  <field>\n   <rect>\n    <x>440</x>\n    <y>22</y>\n    <width>41</width>\n    <height>11</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>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>385</x>\n    <y>22</y>\n    <width>35</width>\n    <height>11</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>Page: </string>\n  </label>\n </pgfoot>\n</report>\n		1	2015-10-01 17:14:33.361434
