339	FinancialReportMonthQuarter	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Financial Report Month and Quarter</title>\n <name>FinancialReportMonthQuarter</name>\n <description></description>\n <parameter default="" active="false" listtype="dynamic" type="integer" name="flcol_id">\n  <description>Financial Report Column Layout</description>\n  <query>SELECT flcol_id, flhead_name || ' - ' || flcol_name FROM flcol, flhead WHERE ((flcol_flhead_id=flhead_id) AND (flhead_active))</query>\n </parameter>\n <parameter default="" active="false" listtype="dynamic" type="integer" name="period_id">\n  <description>Accounting Period Reference</description>\n  <query>SELECT period_id, \n  CASE\n    WHEN period_name &lt;> '' THEN period_name \n    ELSE (formatdate(period_start) || '-' || formatdate(period_end)) \n  END \nFROM period \nORDER BY period_end DESC</query>\n </parameter>\n <grid>\n  <snap/>\n  <show/>\n  <x>0.05</x>\n  <y>0.05</y>\n </grid>\n <size>Letter</size>\n <portrait/>\n <topmargin>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;? value("project") ?> AS project,\n    (SELECT prj_name FROM prj WHERE prj_id=&lt;? value("prj_id") ?>) AS prj_name,\n    flstmthead_username,\n    flstmthead_flhead_name || ' - ' || flstmthead_flcol_name AS f_name,\n    flstmthead_typedescrip1,\n    flstmthead_typedescrip2,\n    flstmthead_month,\n    flstmthead_qtr,\n    flstmthead_year,\n    flstmthead_prmonth,\n    flstmthead_prqtr,\n    flstmthead_pryear\nFROM getflstmthead(&lt;? value("flcol_id") ?>,&lt;? value("period_id") ?>)</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT \n    flstmtitem_flhead_id,\n    flstmtitem_period_id,\n    flstmtitem_username,\n    flstmtitem_order,\n    flstmtitem_level,\n    flstmtitem_subgrp,\n    flstmtitem_type,\n    flstmtitem_type_id,\n    flstmtitem_parent_id,\n    flstmtitem_accnt_id,\n    flstmtitem_name,\n    formatMoney(flstmtitem_month) AS flstmtitem_month,\n    formatMoney(flstmtitem_monthdb) AS flstmtitem_monthdb,\n    formatMoney(flstmtitem_monthcr) AS flstmtitem_monthcr,\n    formatPrcnt(flstmtitem_monthprcnt) AS flstmtitem_monthprcnt,\n    formatMoney(flstmtitem_monthbudget) AS flstmtitem_monthbudget,\n    formatPrcnt(flstmtitem_monthbudgetprcnt) AS flstmtitem_monthbudgetprcnt,\n    formatMoney(flstmtitem_monthbudgetdiff) AS flstmtitem_monthbudgetdiff,\n    formatPrcnt(flstmtitem_monthbudgetdiffprcnt) AS flstmtitem_monthbudgetdiffprcnt,\n    formatMoney(flstmtitem_qtr) AS flstmtitem_qtr,\n    formatMoney(flstmtitem_qtrdb) AS flstmtitem_qtrdb,\n    formatMoney(flstmtitem_qtrcr) AS flstmtitem_qtrcr,\n    formatPrcnt(flstmtitem_qtrprcnt) AS flstmtitem_qtrprcnt,\n    formatMoney(flstmtitem_qtrbudget) AS flstmtitem_qtrbudget,\n    formatPrcnt(flstmtitem_qtrbudgetprcnt) AS flstmtitem_qtrbudgetprcnt,\n    formatMoney(flstmtitem_qtrbudgetdiff) AS flstmtitem_qtrbudgetdiff,\n    formatPrcnt(flstmtitem_qtrbudgetdiffprcnt) AS flstmtitem_qtrbudgetdiffprcnt,\n    formatMoney(flstmtitem_year) AS flstmtitem_year,\n    formatMoney(flstmtitem_yeardb) AS flstmtitem_yeardb,\n    formatMoney(flstmtitem_yearcr) AS flstmtitem_yearcr,\n    formatPrcnt(flstmtitem_yearprcnt) AS flstmtitem_yearprcnt,\n    formatMoney(flstmtitem_yearbudget) AS flstmtitem_yearbudget,\n    formatPrcnt(flstmtitem_yearbudgetprcnt) AS flstmtitem_yearbudgetprcnt,\n    formatMoney(flstmtitem_yearbudgetdiff) AS flstmtitem_yearbudgetdiff,\n    formatPrcnt(flstmtitem_yearbudgetdiffprcnt) AS flstmtitem_yearbudgetdiffprcnt,\n    formatMoney(flstmtitem_prmonth) AS flstmtitem_prmonth,\n    formatPrcnt(flstmtitem_prmonthprcnt) AS flstmtitem_prmonthprcnt,\n    formatMoney(flstmtitem_prmonthdiff) AS flstmtitem_prmonthdiff,\n    formatPrcnt(flstmtitem_prmonthdiffprcnt) AS flstmtitem_prmonthdiffprcnt,\n    formatMoney(flstmtitem_prqtr) AS flstmtitem_prqtr,\n    formatPrcnt(flstmtitem_prqtrprcnt) AS flstmtitem_prqtrprcnt,\n    formatMoney(flstmtitem_prqtrdiff) AS flstmtitem_prqtrdiff,\n    formatPrcnt(flstmtitem_prqtrdiffprcnt) AS flstmtitem_prqtrdiffprcnt,\n    formatMoney(flstmtitem_pryear) AS flstmtitem_pryear,\n    formatPrcnt(flstmtitem_pryearprcnt) AS flstmtitem_pryearprcnt,\n    formatMoney(flstmtitem_pryeardiff) AS flstmtitem_pryeardiff,\n    formatPrcnt(flstmtitem_pryeardiffprcnt) AS flstmtitem_pryeardiffprcnt\nFROM financialreport(&lt;? value("flcol_id") ?>,&lt;? value("period_id") ?>,\n&lt;? if exists("shownumbers") ?>\n  true\n&lt;? else ?>\n  false\n&lt;? endif ?>\n,True,&lt;? value("prj_id") ?>)\n&lt;? if not exists("showzeros") ?>\n  WHERE ((flstmtitem_month &lt;> 0) OR (flstmtitem_qtr &lt;> 0) OR (flstmtitem_type &lt;> 'I'))\n&lt;? endif ?>\n;</sql>\n </querysource>\n <querysource>\n  <name>notes</name>\n  <sql>SELECT * FROM (\nSELECT 1 AS seq, flhead_notes AS notes\nFROM flhead\n JOIN flcol ON (flhead_id=flcol_flhead_id)\nWHERE ((flcol_id=&lt;? value("flcol_id") ?>)\n  AND (length(flhead_notes) > 0))\nUNION ALL\nSELECT 2 AS seq, flnotes_notes AS notes\nFROM flnotes\n  JOIN flcol ON (flcol_flhead_id=flnotes_flhead_id)\nWHERE ((flcol_id=&lt;? value("flcol_id") ?>)\n  AND (flnotes_period_id=&lt;? value("period_id") ?>)\n  AND (length(flnotes_notes) > 0))) data\nORDER BY seq;\n</sql>\n </querysource>\n <rpthead>\n  <height>167</height>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>100</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>Type:</string>\n  </label>\n  <line>\n   <xstart>0.00540306</xstart>\n   <ystart>162.686</ystart>\n   <xend>749.477</xend>\n   <yend>162.686</yend>\n   <weight>2</weight>\n  </line>\n  <field>\n   <rect>\n    <x>580</x>\n    <y>145</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_typedescrip2</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>1</x>\n    <y>130</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>Name</string>\n  </label>\n  <field>\n   <rect>\n    <x>380</x>\n    <y>130</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_month</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>80</y>\n    <width>459</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_name</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>380</x>\n    <y>145</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_typedescrip2</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>459</x>\n    <y>130</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_month</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>100</y>\n    <width>459</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>flstmthead_typedescrip1</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>80</y>\n    <width>80</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Name:</string>\n  </label>\n  <label>\n   <rect>\n    <x>465</x>\n    <y>145</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>% of Group</string>\n  </label>\n  <field>\n   <rect>\n    <x>580</x>\n    <y>130</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_qtr</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>345</x>\n    <y>10</y>\n    <width>380</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>Financial Report</string>\n  </label>\n  <field>\n   <rect>\n    <x>660</x>\n    <y>130</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_qtr</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>660</x>\n    <y>145</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>% of Group</string>\n  </label>\n  <field>\n   <rect>\n    <x>99</x>\n    <y>59.6</y>\n    <width>459</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>prj_name</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>15</x>\n    <y>59.5</y>\n    <width>80</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>project</column>\n   </data>\n  </field>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>4</height>\n </pghead>\n <pghead>\n  <height>37</height>\n  <field>\n   <rect>\n    <x>380</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   <data>\n    <query>head</query>\n    <column>flstmthead_typedescrip2</column>\n   </data>\n  </field>\n  <line>\n   <xstart>0.393337</xstart>\n   <ystart>30</ystart>\n   <xend>750</xend>\n   <yend>30</yend>\n   <weight>2</weight>\n  </line>\n  <field>\n   <rect>\n    <x>580</x>\n    <y>0</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_qtr</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>380</x>\n    <y>0</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_month</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>1</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>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Name</string>\n  </label>\n  <field>\n   <rect>\n    <x>660</x>\n    <y>0</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_qtr</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>459</x>\n    <y>0</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_month</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>580</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   <data>\n    <query>head</query>\n    <column>flstmthead_typedescrip2</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>460.395</x>\n    <y>14.2742</y>\n    <width>70</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>% of Group</string>\n  </label>\n  <label>\n   <rect>\n    <x>661.636</x>\n    <y>14.2742</y>\n    <width>70</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>% of Group</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <group>\n   <name>subgrp</name>\n   <column>flstmtitem_subgrp</column>\n   <foot>\n    <height>4</height>\n    <line>\n     <xstart>380</xstart>\n     <ystart>1</ystart>\n     <xend>740</xend>\n     <yend>1</yend>\n     <weight>0</weight>\n    </line>\n   </foot>\n  </group>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>19</height>\n   <field>\n    <rect>\n     <x>660</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>flstmtitem_qtrprcnt</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>459</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>flstmtitem_monthprcnt</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>25</x>\n     <y>0</y>\n     <width>345</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>flstmtitem_name</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>580</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>flstmtitem_qtr</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>380</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>flstmtitem_month</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <section>\n  <name>notes</name>\n  <detail>\n   <key>\n    <query>notes</query>\n   </key>\n   <height>24</height>\n   <text>\n    <rect>\n     <x>25</x>\n     <y>9</y>\n     <width>700</width>\n     <height>15</height>\n    </rect>\n    <bottompad>0</bottompad>\n    <font>\n     <face>Arial</face>\n     <size>9</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <top/>\n    <data>\n     <query>notes</query>\n     <column>notes</column>\n    </data>\n   </text>\n  </detail>\n </section>\n <pgfoot>\n  <height>22</height>\n  <label>\n   <rect>\n    <x>550</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>695</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 <rptfoot>\n  <height>7</height>\n </rptfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
334	FinancialReportMonthYear	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Financial Report Month and Year</title>\n <name>FinancialReportMonthYear</name>\n <description></description>\n <parameter default="" active="false" listtype="dynamic" type="integer" name="flcol_id">\n  <description>Financial Report Column Layout</description>\n  <query>SELECT flcol_id, flhead_name || ' - ' || flcol_name FROM flcol, flhead WHERE ((flcol_flhead_id=flhead_id) AND (flhead_active))</query>\n </parameter>\n <parameter default="" active="false" listtype="dynamic" type="integer" name="period_id">\n  <description>Accounting Period Reference</description>\n  <query>SELECT period_id, \n  CASE\n    WHEN period_name &lt;> '' THEN period_name \n    ELSE (formatdate(period_start) || '-' || formatdate(period_end)) \n  END \nFROM period \nORDER BY period_end DESC</query>\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>head</name>\n  <sql>SELECT \n    &lt;? value("project") ?> AS project,\n    (SELECT prj_name FROM prj WHERE prj_id=&lt;? value("prj_id") ?>) AS prj_name,\n    flstmthead_username,\n    flstmthead_flhead_name || ' - ' || flstmthead_flcol_name AS f_name,\n    flstmthead_typedescrip1,\n    flstmthead_typedescrip2,\n    flstmthead_month,\n    flstmthead_qtr,\n    flstmthead_year,\n    flstmthead_prmonth,\n    flstmthead_prqtr,\n    flstmthead_pryear\nFROM getflstmthead(&lt;? value("flcol_id") ?>,&lt;? value("period_id") ?>)</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT \n    flstmtitem_flhead_id,\n    flstmtitem_period_id,\n    flstmtitem_username,\n    flstmtitem_order,\n    flstmtitem_level,\n    flstmtitem_subgrp,\n    flstmtitem_type,\n    flstmtitem_type_id,\n    flstmtitem_parent_id,\n    flstmtitem_accnt_id,\n    flstmtitem_name,\n    formatMoney(flstmtitem_month) AS flstmtitem_month,\n    formatMoney(flstmtitem_monthdb) AS flstmtitem_monthdb,\n    formatMoney(flstmtitem_monthcr) AS flstmtitem_monthcr,\n    formatPrcnt(flstmtitem_monthprcnt) AS flstmtitem_monthprcnt,\n    formatMoney(flstmtitem_monthbudget) AS flstmtitem_monthbudget,\n    formatPrcnt(flstmtitem_monthbudgetprcnt) AS flstmtitem_monthbudgetprcnt,\n    formatMoney(flstmtitem_monthbudgetdiff) AS flstmtitem_monthbudgetdiff,\n    formatPrcnt(flstmtitem_monthbudgetdiffprcnt) AS flstmtitem_monthbudgetdiffprcnt,\n    formatMoney(flstmtitem_qtr) AS flstmtitem_qtr,\n    formatMoney(flstmtitem_qtrdb) AS flstmtitem_qtrdb,\n    formatMoney(flstmtitem_qtrcr) AS flstmtitem_qtrcr,\n    formatPrcnt(flstmtitem_qtrprcnt) AS flstmtitem_qtrprcnt,\n    formatMoney(flstmtitem_qtrbudget) AS flstmtitem_qtrbudget,\n    formatPrcnt(flstmtitem_qtrbudgetprcnt) AS flstmtitem_qtrbudgetprcnt,\n    formatMoney(flstmtitem_qtrbudgetdiff) AS flstmtitem_qtrbudgetdiff,\n    formatPrcnt(flstmtitem_qtrbudgetdiffprcnt) AS flstmtitem_qtrbudgetdiffprcnt,\n    formatMoney(flstmtitem_year) AS flstmtitem_year,\n    formatMoney(flstmtitem_yeardb) AS flstmtitem_yeardb,\n    formatMoney(flstmtitem_yearcr) AS flstmtitem_yearcr,\n    formatPrcnt(flstmtitem_yearprcnt) AS flstmtitem_yearprcnt,\n    formatMoney(flstmtitem_yearbudget) AS flstmtitem_yearbudget,\n    formatPrcnt(flstmtitem_yearbudgetprcnt) AS flstmtitem_yearbudgetprcnt,\n    formatMoney(flstmtitem_yearbudgetdiff) AS flstmtitem_yearbudgetdiff,\n    formatPrcnt(flstmtitem_yearbudgetdiffprcnt) AS flstmtitem_yearbudgetdiffprcnt,\n    formatMoney(flstmtitem_prmonth) AS flstmtitem_prmonth,\n    formatPrcnt(flstmtitem_prmonthprcnt) AS flstmtitem_prmonthprcnt,\n    formatMoney(flstmtitem_prmonthdiff) AS flstmtitem_prmonthdiff,\n    formatPrcnt(flstmtitem_prmonthdiffprcnt) AS flstmtitem_prmonthdiffprcnt,\n    formatMoney(flstmtitem_prqtr) AS flstmtitem_prqtr,\n    formatPrcnt(flstmtitem_prqtrprcnt) AS flstmtitem_prqtrprcnt,\n    formatMoney(flstmtitem_prqtrdiff) AS flstmtitem_prqtrdiff,\n    formatPrcnt(flstmtitem_prqtrdiffprcnt) AS flstmtitem_prqtrdiffprcnt,\n    formatMoney(flstmtitem_pryear) AS flstmtitem_pryear,\n    formatPrcnt(flstmtitem_pryearprcnt) AS flstmtitem_pryearprcnt,\n    formatMoney(flstmtitem_pryeardiff) AS flstmtitem_pryeardiff,\n    formatPrcnt(flstmtitem_pryeardiffprcnt) AS flstmtitem_pryeardiffprcnt\nFROM financialreport(&lt;? value("flcol_id") ?>,&lt;? value("period_id") ?>,\n&lt;? if exists("shownumbers") ?>\n  true\n&lt;? else ?>\n  false\n&lt;? endif ?>\n,True,&lt;? value("prj_id") ?>)\n&lt;? if not exists("showzeros") ?>\n  WHERE ((flstmtitem_month &lt;> 0) OR (flstmtitem_year &lt;> 0) OR (flstmtitem_type &lt;> 'I'))\n&lt;? endif ?>\n;</sql>\n </querysource>\n <querysource>\n  <name>notes</name>\n  <sql>SELECT * FROM (\nSELECT 1 AS seq, flhead_notes AS notes\nFROM flhead\n JOIN flcol ON (flhead_id=flcol_flhead_id)\nWHERE ((flcol_id=&lt;? value("flcol_id") ?>)\n  AND (length(flhead_notes) > 0))\nUNION ALL\nSELECT 2 AS seq, flnotes_notes AS notes\nFROM flnotes\n  JOIN flcol ON (flcol_flhead_id=flnotes_flhead_id)\nWHERE ((flcol_id=&lt;? value("flcol_id") ?>)\n  AND (flnotes_period_id=&lt;? value("period_id") ?>)\n  AND (length(flnotes_notes) > 0))) data\nORDER BY seq;\n</sql>\n </querysource>\n <rpthead>\n  <height>166</height>\n  <field>\n   <rect>\n    <x>380</x>\n    <y>130</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_month</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>660.651</x>\n    <y>145.302</y>\n    <width>70</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>% of Group</string>\n  </label>\n  <field>\n   <rect>\n    <x>660</x>\n    <y>130</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_year</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>1</x>\n    <y>130</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>Name</string>\n  </label>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>80</y>\n    <width>460</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_name</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>80</y>\n    <width>80</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Name:</string>\n  </label>\n  <label>\n   <rect>\n    <x>345</x>\n    <y>10</y>\n    <width>380</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>Financial Report</string>\n  </label>\n  <line>\n   <xstart>2.08287</xstart>\n   <ystart>160</ystart>\n   <xend>748</xend>\n   <yend>160</yend>\n   <weight>2</weight>\n  </line>\n  <field>\n   <rect>\n    <x>580</x>\n    <y>130</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_year</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>460</x>\n    <y>130</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_month</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>380</x>\n    <y>145</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_typedescrip2</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>465</x>\n    <y>145</y>\n    <width>70</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>% of Group</string>\n  </label>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>100</y>\n    <width>460</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>flstmthead_typedescrip1</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>580</x>\n    <y>145</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_typedescrip2</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>100</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>Type:</string>\n  </label>\n  <field>\n   <rect>\n    <x>99</x>\n    <y>59.6</y>\n    <width>459</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>prj_name</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>15</x>\n    <y>59.5</y>\n    <width>80</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>project</column>\n   </data>\n  </field>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>3</height>\n </pghead>\n <pghead>\n  <height>36</height>\n  <field>\n   <rect>\n    <x>460</x>\n    <y>0</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_month</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>10</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>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Name</string>\n  </label>\n  <field>\n   <rect>\n    <x>580</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   <data>\n    <query>head</query>\n    <column>flstmthead_typedescrip2</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>380</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   <data>\n    <query>head</query>\n    <column>flstmthead_typedescrip2</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>660</x>\n    <y>0</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_year</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>380</x>\n    <y>0</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_month</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>580</x>\n    <y>0</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_year</column>\n   </data>\n  </field>\n  <line>\n   <xstart>1.43183</xstart>\n   <ystart>30.3326</ystart>\n   <xend>748.17</xend>\n   <yend>30.3326</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>461.238</x>\n    <y>15.0901</y>\n    <width>70</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>% of Group</string>\n  </label>\n  <label>\n   <rect>\n    <x>662.324</x>\n    <y>14.767</y>\n    <width>70</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>% of Group</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <group>\n   <name>subgrp</name>\n   <column>flstmtitem_subgrp</column>\n   <foot>\n    <height>3</height>\n    <line>\n     <xstart>380</xstart>\n     <ystart>1</ystart>\n     <xend>740</xend>\n     <yend>1</yend>\n     <weight>0</weight>\n    </line>\n   </foot>\n  </group>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>18</height>\n   <field>\n    <rect>\n     <x>660</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>flstmtitem_yearprcnt</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>580</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>flstmtitem_year</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>380</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>flstmtitem_month</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>25</x>\n     <y>0</y>\n     <width>345</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>flstmtitem_name</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>460</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>flstmtitem_monthprcnt</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <section>\n  <name>notes</name>\n  <detail>\n   <key>\n    <query>notes</query>\n   </key>\n   <height>24</height>\n   <text>\n    <rect>\n     <x>25</x>\n     <y>9</y>\n     <width>700</width>\n     <height>15</height>\n    </rect>\n    <bottompad>0</bottompad>\n    <font>\n     <face>Arial</face>\n     <size>9</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <top/>\n    <data>\n     <query>notes</query>\n     <column>notes</column>\n    </data>\n   </text>\n  </detail>\n </section>\n <pgfoot>\n  <height>21</height>\n  <field>\n   <rect>\n    <x>695</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  <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>550</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 <rptfoot>\n  <height>6</height>\n </rptfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
340	FinancialReportQuarter	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Financial Report Quarter</title>\n <name>FinancialReportQuarter</name>\n <description></description>\n <parameter default="" active="false" listtype="dynamic" type="integer" name="flcol_id">\n  <description>Financial Report Column Layout</description>\n  <query>SELECT flcol_id, flhead_name || ' - ' || flcol_name FROM flcol, flhead WHERE ((flcol_flhead_id=flhead_id) AND (flhead_active))</query>\n </parameter>\n <parameter default="" active="false" listtype="dynamic" type="integer" name="period_id">\n  <description>Accounting Period Reference</description>\n  <query>SELECT period_id, \n  CASE\n    WHEN period_name &lt;> '' THEN period_name \n    ELSE (formatdate(period_start) || '-' || formatdate(period_end)) \n  END \nFROM period \nORDER BY period_end DESC</query>\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>head</name>\n  <sql>SELECT \n    &lt;? value("project") ?> AS project,\n    (SELECT prj_name FROM prj WHERE prj_id=&lt;? value("prj_id") ?>) AS prj_name,\n    flstmthead_username,\n    flstmthead_flhead_name || ' - ' || flstmthead_flcol_name AS f_name,\n    flstmthead_typedescrip1,\n    flstmthead_typedescrip2,\n    flstmthead_month,\n    flstmthead_qtr,\n    flstmthead_year,\n    flstmthead_prmonth,\n    flstmthead_prqtr,\n    flstmthead_pryear\nFROM getflstmthead(&lt;? value("flcol_id") ?>,&lt;? value("period_id") ?>)</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT \n    flstmtitem_flhead_id,\n    flstmtitem_period_id,\n    flstmtitem_username,\n    flstmtitem_order,\n    flstmtitem_level,\n    flstmtitem_subgrp,\n    flstmtitem_type,\n    flstmtitem_type_id,\n    flstmtitem_parent_id,\n    flstmtitem_accnt_id,\n    flstmtitem_name,\n    formatMoney(flstmtitem_month) AS flstmtitem_month,\n    formatMoney(flstmtitem_monthdb) AS flstmtitem_monthdb,\n    formatMoney(flstmtitem_monthcr) AS flstmtitem_monthcr,\n    formatPrcnt(flstmtitem_monthprcnt) AS flstmtitem_monthprcnt,\n    formatMoney(flstmtitem_monthbudget) AS flstmtitem_monthbudget,\n    formatPrcnt(flstmtitem_monthbudgetprcnt) AS flstmtitem_monthbudgetprcnt,\n    formatMoney(flstmtitem_monthbudgetdiff) AS flstmtitem_monthbudgetdiff,\n    formatPrcnt(flstmtitem_monthbudgetdiffprcnt) AS flstmtitem_monthbudgetdiffprcnt,\n    formatMoney(flstmtitem_qtr) AS flstmtitem_qtr,\n    formatMoney(flstmtitem_qtrdb) AS flstmtitem_qtrdb,\n    formatMoney(flstmtitem_qtrcr) AS flstmtitem_qtrcr,\n    formatPrcnt(flstmtitem_qtrprcnt) AS flstmtitem_qtrprcnt,\n    formatMoney(flstmtitem_qtrbudget) AS flstmtitem_qtrbudget,\n    formatPrcnt(flstmtitem_qtrbudgetprcnt) AS flstmtitem_qtrbudgetprcnt,\n    formatMoney(flstmtitem_qtrbudgetdiff) AS flstmtitem_qtrbudgetdiff,\n    formatPrcnt(flstmtitem_qtrbudgetdiffprcnt) AS flstmtitem_qtrbudgetdiffprcnt,\n    formatMoney(flstmtitem_year) AS flstmtitem_year,\n    formatMoney(flstmtitem_yeardb) AS flstmtitem_yeardb,\n    formatMoney(flstmtitem_yearcr) AS flstmtitem_yearcr,\n    formatPrcnt(flstmtitem_yearprcnt) AS flstmtitem_yearprcnt,\n    formatMoney(flstmtitem_yearbudget) AS flstmtitem_yearbudget,\n    formatPrcnt(flstmtitem_yearbudgetprcnt) AS flstmtitem_yearbudgetprcnt,\n    formatMoney(flstmtitem_yearbudgetdiff) AS flstmtitem_yearbudgetdiff,\n    formatPrcnt(flstmtitem_yearbudgetdiffprcnt) AS flstmtitem_yearbudgetdiffprcnt,\n    formatMoney(flstmtitem_prmonth) AS flstmtitem_prmonth,\n    formatPrcnt(flstmtitem_prmonthprcnt) AS flstmtitem_prmonthprcnt,\n    formatMoney(flstmtitem_prmonthdiff) AS flstmtitem_prmonthdiff,\n    formatPrcnt(flstmtitem_prmonthdiffprcnt) AS flstmtitem_prmonthdiffprcnt,\n    formatMoney(flstmtitem_prqtr) AS flstmtitem_prqtr,\n    formatPrcnt(flstmtitem_prqtrprcnt) AS flstmtitem_prqtrprcnt,\n    formatMoney(flstmtitem_prqtrdiff) AS flstmtitem_prqtrdiff,\n    formatPrcnt(flstmtitem_prqtrdiffprcnt) AS flstmtitem_prqtrdiffprcnt,\n    formatMoney(flstmtitem_pryear) AS flstmtitem_pryear,\n    formatPrcnt(flstmtitem_pryearprcnt) AS flstmtitem_pryearprcnt,\n    formatMoney(flstmtitem_pryeardiff) AS flstmtitem_pryeardiff,\n    formatPrcnt(flstmtitem_pryeardiffprcnt) AS flstmtitem_pryeardiffprcnt\nFROM financialreport(&lt;? value("flcol_id") ?>,&lt;? value("period_id") ?>,\n&lt;? if exists("shownumbers") ?>\n  true\n&lt;? else ?>\n  false\n&lt;? endif ?>\n,True,&lt;? value("prj_id") ?>)\n&lt;? if not exists("showzeros") ?>\n  WHERE ((flstmtitem_qtr &lt;> 0) OR  (flstmtitem_type &lt;> 'I'))\n&lt;? endif ?>\n;</sql>\n </querysource>\n <querysource>\n  <name>notes</name>\n  <sql>SELECT * FROM (\nSELECT 1 AS seq, flhead_notes AS notes\nFROM flhead\n JOIN flcol ON (flhead_id=flcol_flhead_id)\nWHERE ((flcol_id=&lt;? value("flcol_id") ?>)\n  AND (length(flhead_notes) > 0))\nUNION ALL\nSELECT 2 AS seq, flnotes_notes AS notes\nFROM flnotes\n  JOIN flcol ON (flcol_flhead_id=flnotes_flhead_id)\nWHERE ((flcol_id=&lt;? value("flcol_id") ?>)\n  AND (flnotes_period_id=&lt;? value("period_id") ?>)\n  AND (length(flnotes_notes) > 0))) data\nORDER BY seq;\n</sql>\n </querysource>\n <rpthead>\n  <height>168</height>\n  <line>\n   <xstart>1</xstart>\n   <ystart>160</ystart>\n   <xend>750</xend>\n   <yend>160</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>675</x>\n    <y>145</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>% of Group</string>\n  </label>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>80</y>\n    <width>459</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_name</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>80</y>\n    <width>80</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Name:</string>\n  </label>\n  <label>\n   <rect>\n    <x>345</x>\n    <y>10</y>\n    <width>380</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>Financial Report</string>\n  </label>\n  <label>\n   <rect>\n    <x>1</x>\n    <y>130</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>Name</string>\n  </label>\n  <field>\n   <rect>\n    <x>590</x>\n    <y>145</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_typedescrip2</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>670</x>\n    <y>130</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_qtr</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>100</y>\n    <width>459</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>flstmthead_typedescrip1</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>590</x>\n    <y>130</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_qtr</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>100</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>Type:</string>\n  </label>\n  <field>\n   <rect>\n    <x>99</x>\n    <y>59.6</y>\n    <width>459</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>prj_name</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>15</x>\n    <y>59.5</y>\n    <width>80</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>project</column>\n   </data>\n  </field>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>5</height>\n </pghead>\n <pghead>\n  <height>38</height>\n  <field>\n   <rect>\n    <x>590</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   <data>\n    <query>head</query>\n    <column>flstmthead_typedescrip2</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>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_qtr</column>\n   </data>\n  </field>\n  <line>\n   <xstart>1</xstart>\n   <ystart>30</ystart>\n   <xend>749</xend>\n   <yend>30</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>1</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>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Name</string>\n  </label>\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>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_qtr</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>670.717</x>\n    <y>14.9911</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>% of Group</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <group>\n   <name>subgrp</name>\n   <column>flstmtitem_subgrp</column>\n   <foot>\n    <height>5</height>\n    <line>\n     <xstart>380</xstart>\n     <ystart>1</ystart>\n     <xend>740</xend>\n     <yend>1</yend>\n     <weight>0</weight>\n    </line>\n   </foot>\n  </group>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>20</height>\n   <field>\n    <rect>\n     <x>25</x>\n     <y>0</y>\n     <width>550</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>flstmtitem_name</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>flstmtitem_qtr</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    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>flstmtitem_qtrprcnt</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <section>\n  <name>notes</name>\n  <detail>\n   <key>\n    <query>notes</query>\n   </key>\n   <height>24</height>\n   <text>\n    <rect>\n     <x>25</x>\n     <y>9</y>\n     <width>700</width>\n     <height>15</height>\n    </rect>\n    <bottompad>0</bottompad>\n    <font>\n     <face>Arial</face>\n     <size>9</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <top/>\n    <data>\n     <query>notes</query>\n     <column>notes</column>\n    </data>\n   </text>\n  </detail>\n </section>\n <pgfoot>\n  <height>23</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>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>695</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>550</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 <rptfoot>\n  <height>8</height>\n </rptfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
345	FinancialReportYearPriorYear	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Financial Report Year and Prior Year</title>\n <name>FinancialReportYearPriorYear</name>\n <description></description>\n <parameter default="" active="false" listtype="dynamic" type="integer" name="flcol_id">\n  <description>Financial Report Column Layout</description>\n  <query>SELECT flcol_id, flhead_name || ' - ' || flcol_name FROM flcol, flhead WHERE ((flcol_flhead_id=flhead_id) AND (flhead_active))</query>\n </parameter>\n <parameter default="" active="false" listtype="dynamic" type="integer" name="period_id">\n  <description>Accounting Period Reference</description>\n  <query>SELECT period_id, \n  CASE\n    WHEN period_name &lt;> '' THEN period_name \n    ELSE (formatdate(period_start) || '-' || formatdate(period_end)) \n  END \nFROM period \nORDER BY period_end DESC</query>\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>head</name>\n  <sql>SELECT \n    &lt;? value("project") ?> AS project,\n    (SELECT prj_name FROM prj WHERE prj_id=&lt;? value("prj_id") ?>) AS prj_name,\n    flstmthead_username,\n    flstmthead_flhead_name || ' - ' || flstmthead_flcol_name AS f_name,\n    flstmthead_typedescrip1,\n    flstmthead_typedescrip2,\n    flstmthead_typedescrip2 || 'Diff.' AS f_diff,\n    flstmthead_typedescrip2 || ' % Diff.' AS f_diffprcnt,\n    flstmthead_month,\n    flstmthead_qtr,\n    flstmthead_year,\n    flstmthead_prmonth,\n    flstmthead_prqtr,\n    flstmthead_pryear\nFROM getflstmthead(&lt;? value("flcol_id") ?>,&lt;? value("period_id") ?>)</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT \n    flstmtitem_flhead_id,\n    flstmtitem_period_id,\n    flstmtitem_username,\n    flstmtitem_order,\n    flstmtitem_level,\n    flstmtitem_subgrp,\n    flstmtitem_type,\n    flstmtitem_type_id,\n    flstmtitem_parent_id,\n    flstmtitem_accnt_id,\n    flstmtitem_name,\n    formatMoney(flstmtitem_month) AS flstmtitem_month,\n    formatMoney(flstmtitem_monthdb) AS flstmtitem_monthdb,\n    formatMoney(flstmtitem_monthcr) AS flstmtitem_monthcr,\n    formatPrcnt(flstmtitem_monthprcnt) AS flstmtitem_monthprcnt,\n    formatMoney(flstmtitem_monthbudget) AS flstmtitem_monthbudget,\n    formatPrcnt(flstmtitem_monthbudgetprcnt) AS flstmtitem_monthbudgetprcnt,\n    formatMoney(flstmtitem_monthbudgetdiff) AS flstmtitem_monthbudgetdiff,\n    formatPrcnt(flstmtitem_monthbudgetdiffprcnt) AS flstmtitem_monthbudgetdiffprcnt,\n    formatMoney(flstmtitem_qtr) AS flstmtitem_qtr,\n    formatMoney(flstmtitem_qtrdb) AS flstmtitem_qtrdb,\n    formatMoney(flstmtitem_qtrcr) AS flstmtitem_qtrcr,\n    formatPrcnt(flstmtitem_qtrprcnt) AS flstmtitem_qtrprcnt,\n    formatMoney(flstmtitem_qtrbudget) AS flstmtitem_qtrbudget,\n    formatPrcnt(flstmtitem_qtrbudgetprcnt) AS flstmtitem_qtrbudgetprcnt,\n    formatMoney(flstmtitem_qtrbudgetdiff) AS flstmtitem_qtrbudgetdiff,\n    formatPrcnt(flstmtitem_qtrbudgetdiffprcnt) AS flstmtitem_qtrbudgetdiffprcnt,\n    formatMoney(flstmtitem_year) AS flstmtitem_year,\n    formatMoney(flstmtitem_yeardb) AS flstmtitem_yeardb,\n    formatMoney(flstmtitem_yearcr) AS flstmtitem_yearcr,\n    formatPrcnt(flstmtitem_yearprcnt) AS flstmtitem_yearprcnt,\n    formatMoney(flstmtitem_yearbudget) AS flstmtitem_yearbudget,\n    formatPrcnt(flstmtitem_yearbudgetprcnt) AS flstmtitem_yearbudgetprcnt,\n    formatMoney(flstmtitem_yearbudgetdiff) AS flstmtitem_yearbudgetdiff,\n    formatPrcnt(flstmtitem_yearbudgetdiffprcnt) AS flstmtitem_yearbudgetdiffprcnt,\n    formatMoney(flstmtitem_prmonth) AS flstmtitem_prmonth,\n    formatPrcnt(flstmtitem_prmonthprcnt) AS flstmtitem_prmonthprcnt,\n    formatMoney(flstmtitem_prmonthdiff) AS flstmtitem_prmonthdiff,\n    formatPrcnt(flstmtitem_prmonthdiffprcnt) AS flstmtitem_prmonthdiffprcnt,\n    formatMoney(flstmtitem_prqtr) AS flstmtitem_prqtr,\n    formatPrcnt(flstmtitem_prqtrprcnt) AS flstmtitem_prqtrprcnt,\n    formatMoney(flstmtitem_prqtrdiff) AS flstmtitem_prqtrdiff,\n    formatPrcnt(flstmtitem_prqtrdiffprcnt) AS flstmtitem_prqtrdiffprcnt,\n    formatMoney(flstmtitem_pryear) AS flstmtitem_pryear,\n    formatPrcnt(flstmtitem_pryearprcnt) AS flstmtitem_pryearprcnt,\n    formatMoney(flstmtitem_pryeardiff) AS flstmtitem_pryeardiff,\n    formatPrcnt(flstmtitem_pryeardiffprcnt) AS flstmtitem_pryeardiffprcnt\nFROM financialreport(&lt;? value("flcol_id") ?>,&lt;? value("period_id") ?>,\n&lt;? if exists("shownumbers") ?>\n  true\n&lt;? else ?>\n  false\n&lt;? endif ?>\n,True,&lt;? value("prj_id") ?>)\n&lt;? if not exists("showzeros") ?>\n  WHERE ((flstmtitem_year &lt;> 0) OR (flstmtitem_pryear &lt;> 0) OR (flstmtitem_type &lt;> 'I'))\n&lt;? endif ?>\n;</sql>\n </querysource>\n <querysource>\n  <name>notes</name>\n  <sql>SELECT * FROM (\nSELECT 1 AS seq, flhead_notes AS notes\nFROM flhead\n JOIN flcol ON (flhead_id=flcol_flhead_id)\nWHERE ((flcol_id=&lt;? value("flcol_id") ?>)\n  AND (length(flhead_notes) > 0))\nUNION ALL\nSELECT 2 AS seq, flnotes_notes AS notes\nFROM flnotes\n  JOIN flcol ON (flcol_flhead_id=flnotes_flhead_id)\nWHERE ((flcol_id=&lt;? value("flcol_id") ?>)\n  AND (flnotes_period_id=&lt;? value("period_id") ?>)\n  AND (length(flnotes_notes) > 0))) data\nORDER BY seq;\n</sql>\n </querysource>\n <rpthead>\n  <height>167</height>\n  <field>\n   <rect>\n    <x>650</x>\n    <y>130</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   <data>\n    <query>head</query>\n    <column>flstmthead_pryear</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>555</x>\n    <y>145</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   <data>\n    <query>head</query>\n    <column>f_diff</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>100</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>Type:</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>Name:</string>\n  </label>\n  <field>\n   <rect>\n    <x>360</x>\n    <y>145</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   <data>\n    <query>head</query>\n    <column>flstmthead_typedescrip2</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>459</x>\n    <y>130</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   <data>\n    <query>head</query>\n    <column>flstmthead_pryear</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>555</x>\n    <y>130</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   <data>\n    <query>head</query>\n    <column>flstmthead_pryear</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>650</x>\n    <y>145</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   <data>\n    <query>head</query>\n    <column>f_diffprcnt</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>100</y>\n    <width>459</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>flstmthead_typedescrip1</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>80</y>\n    <width>459</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_name</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>459</x>\n    <y>145</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   <data>\n    <query>head</query>\n    <column>flstmthead_typedescrip2</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>1</x>\n    <y>130</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>Name</string>\n  </label>\n  <field>\n   <rect>\n    <x>360</x>\n    <y>130</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   <data>\n    <query>head</query>\n    <column>flstmthead_year</column>\n   </data>\n  </field>\n  <line>\n   <xstart>0</xstart>\n   <ystart>160</ystart>\n   <xend>750</xend>\n   <yend>160</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>345</x>\n    <y>10</y>\n    <width>380</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>Financial Report</string>\n  </label>\n  <field>\n   <rect>\n    <x>99</x>\n    <y>59.6</y>\n    <width>459</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>prj_name</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>15</x>\n    <y>59.5</y>\n    <width>80</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>project</column>\n   </data>\n  </field>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>4</height>\n </pghead>\n <pghead>\n  <height>37</height>\n  <field>\n   <rect>\n    <x>650</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   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_pryear</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>1</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>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Name</string>\n  </label>\n  <line>\n   <xstart>1</xstart>\n   <ystart>30</ystart>\n   <xend>749</xend>\n   <yend>30</yend>\n   <weight>2</weight>\n  </line>\n  <field>\n   <rect>\n    <x>555</x>\n    <y>15</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_diff</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>555</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   <data>\n    <query>head</query>\n    <column>flstmthead_pryear</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>360</x>\n    <y>15</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_typedescrip2</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>360</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   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_year</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>459</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   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_pryear</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>650</x>\n    <y>15</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_diffprcnt</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>459</x>\n    <y>15</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_typedescrip2</column>\n   </data>\n  </field>\n </pghead>\n <section>\n  <name>detail</name>\n  <group>\n   <name>subgrp</name>\n   <column>flstmtitem_subgrp</column>\n   <foot>\n    <height>4</height>\n    <line>\n     <xstart>360</xstart>\n     <ystart>0</ystart>\n     <xend>750</xend>\n     <yend>0</yend>\n     <weight>0</weight>\n    </line>\n   </foot>\n  </group>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>19</height>\n   <field>\n    <rect>\n     <x>25</x>\n     <y>0</y>\n     <width>345</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>flstmtitem_name</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>459</x>\n     <y>0</y>\n     <width>85</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>flstmtitem_pryear</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>555</x>\n     <y>0</y>\n     <width>85</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>flstmtitem_pryeardiff</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>360</x>\n     <y>0</y>\n     <width>85</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>flstmtitem_year</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>650</x>\n     <y>0</y>\n     <width>85</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>flstmtitem_pryeardiffprcnt</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <section>\n  <name>notes</name>\n  <detail>\n   <key>\n    <query>notes</query>\n   </key>\n   <height>24</height>\n   <text>\n    <rect>\n     <x>25</x>\n     <y>9</y>\n     <width>700</width>\n     <height>15</height>\n    </rect>\n    <bottompad>0</bottompad>\n    <font>\n     <face>Arial</face>\n     <size>9</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <top/>\n    <data>\n     <query>notes</query>\n     <column>notes</column>\n    </data>\n   </text>\n  </detail>\n </section>\n <pgfoot>\n  <height>22</height>\n  <label>\n   <rect>\n    <x>550</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>695</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  <field>\n   <rect>\n    <x>95</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n </pgfoot>\n <rptfoot>\n  <height>7</height>\n </rptfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
344	FinancialReportYearBudget	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Financial Report Year and Budget</title>\n <name>FinancialReportYearBudget</name>\n <description></description>\n <parameter default="" active="false" listtype="dynamic" type="integer" name="flcol_id">\n  <description>Financial Report Column Layout</description>\n  <query>SELECT flcol_id, flhead_name || ' - ' || flcol_name FROM flcol, flhead WHERE ((flcol_flhead_id=flhead_id) AND (flhead_active))</query>\n </parameter>\n <parameter default="" active="false" listtype="dynamic" type="integer" name="period_id">\n  <description>Accounting Period Reference</description>\n  <query>SELECT period_id, \n  CASE\n    WHEN period_name &lt;> '' THEN period_name \n    ELSE (formatdate(period_start) || '-' || formatdate(period_end)) \n  END \nFROM period \nORDER BY period_end DESC</query>\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>head</name>\n  <sql>SELECT \n    &lt;? value("project") ?> AS project,\n    (SELECT prj_name FROM prj WHERE prj_id=&lt;? value("prj_id") ?>) AS prj_name,\n    flstmthead_username,\n    flstmthead_flhead_name || ' - ' || flstmthead_flcol_name AS f_name,\n    flstmthead_typedescrip1,\n    flstmthead_typedescrip2,\n    flstmthead_month,\n    flstmthead_qtr,\n    flstmthead_year,\n    flstmthead_prmonth,\n    flstmthead_prqtr,\n    flstmthead_pryear\nFROM getflstmthead(&lt;? value("flcol_id") ?>,&lt;? value("period_id") ?>)</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT \n    flstmtitem_flhead_id,\n    flstmtitem_period_id,\n    flstmtitem_username,\n    flstmtitem_order,\n    flstmtitem_level,\n    flstmtitem_subgrp,\n    flstmtitem_type,\n    flstmtitem_type_id,\n    flstmtitem_parent_id,\n    flstmtitem_accnt_id,\n    flstmtitem_name,\n    formatMoney(flstmtitem_month) AS flstmtitem_month,\n    formatMoney(flstmtitem_monthdb) AS flstmtitem_monthdb,\n    formatMoney(flstmtitem_monthcr) AS flstmtitem_monthcr,\n    formatPrcnt(flstmtitem_monthprcnt) AS flstmtitem_monthprcnt,\n    formatMoney(flstmtitem_monthbudget) AS flstmtitem_monthbudget,\n    formatPrcnt(flstmtitem_monthbudgetprcnt) AS flstmtitem_monthbudgetprcnt,\n    formatMoney(flstmtitem_monthbudgetdiff) AS flstmtitem_monthbudgetdiff,\n    formatPrcnt(flstmtitem_monthbudgetdiffprcnt) AS flstmtitem_monthbudgetdiffprcnt,\n    formatMoney(flstmtitem_qtr) AS flstmtitem_qtr,\n    formatMoney(flstmtitem_qtrdb) AS flstmtitem_qtrdb,\n    formatMoney(flstmtitem_qtrcr) AS flstmtitem_qtrcr,\n    formatPrcnt(flstmtitem_qtrprcnt) AS flstmtitem_qtrprcnt,\n    formatMoney(flstmtitem_qtrbudget) AS flstmtitem_qtrbudget,\n    formatPrcnt(flstmtitem_qtrbudgetprcnt) AS flstmtitem_qtrbudgetprcnt,\n    formatMoney(flstmtitem_qtrbudgetdiff) AS flstmtitem_qtrbudgetdiff,\n    formatPrcnt(flstmtitem_qtrbudgetdiffprcnt) AS flstmtitem_qtrbudgetdiffprcnt,\n    formatMoney(flstmtitem_year) AS flstmtitem_year,\n    formatMoney(flstmtitem_yeardb) AS flstmtitem_yeardb,\n    formatMoney(flstmtitem_yearcr) AS flstmtitem_yearcr,\n    formatPrcnt(flstmtitem_yearprcnt) AS flstmtitem_yearprcnt,\n    formatMoney(flstmtitem_yearbudget) AS flstmtitem_yearbudget,\n    formatPrcnt(flstmtitem_yearbudgetprcnt) AS flstmtitem_yearbudgetprcnt,\n    formatMoney(flstmtitem_yearbudgetdiff) AS flstmtitem_yearbudgetdiff,\n    formatPrcnt(flstmtitem_yearbudgetdiffprcnt) AS flstmtitem_yearbudgetdiffprcnt,\n    formatMoney(flstmtitem_prmonth) AS flstmtitem_prmonth,\n    formatPrcnt(flstmtitem_prmonthprcnt) AS flstmtitem_prmonthprcnt,\n    formatMoney(flstmtitem_prmonthdiff) AS flstmtitem_prmonthdiff,\n    formatPrcnt(flstmtitem_prmonthdiffprcnt) AS flstmtitem_prmonthdiffprcnt,\n    formatMoney(flstmtitem_prqtr) AS flstmtitem_prqtr,\n    formatPrcnt(flstmtitem_prqtrprcnt) AS flstmtitem_prqtrprcnt,\n    formatMoney(flstmtitem_prqtrdiff) AS flstmtitem_prqtrdiff,\n    formatPrcnt(flstmtitem_prqtrdiffprcnt) AS flstmtitem_prqtrdiffprcnt,\n    formatMoney(flstmtitem_pryear) AS flstmtitem_pryear,\n    formatPrcnt(flstmtitem_pryearprcnt) AS flstmtitem_pryearprcnt,\n    formatMoney(flstmtitem_pryeardiff) AS flstmtitem_pryeardiff,\n    formatPrcnt(flstmtitem_pryeardiffprcnt) AS flstmtitem_pryeardiffprcnt\nFROM financialreport(&lt;? value("flcol_id") ?>,&lt;? value("period_id") ?>,\n&lt;? if exists("shownumbers") ?>\n  true\n&lt;? else ?>\n  false\n&lt;? endif ?>\n,True,&lt;? value("prj_id") ?>)\n&lt;? if not exists("showzeros") ?>\n  WHERE ((flstmtitem_year &lt;> 0) OR (flstmtitem_yearbudget &lt;> 0) OR (flstmtitem_type &lt;> 'I'))\n&lt;? endif ?>\n;</sql>\n </querysource>\n <querysource>\n  <name>notes</name>\n  <sql>SELECT * FROM (\nSELECT 1 AS seq, flhead_notes AS notes\nFROM flhead\n JOIN flcol ON (flhead_id=flcol_flhead_id)\nWHERE ((flcol_id=&lt;? value("flcol_id") ?>)\n  AND (length(flhead_notes) > 0))\nUNION ALL\nSELECT 2 AS seq, flnotes_notes AS notes\nFROM flnotes\n  JOIN flcol ON (flcol_flhead_id=flnotes_flhead_id)\nWHERE ((flcol_id=&lt;? value("flcol_id") ?>)\n  AND (flnotes_period_id=&lt;? value("period_id") ?>)\n  AND (length(flnotes_notes) > 0))) data\nORDER BY seq;\n</sql>\n </querysource>\n <rpthead>\n  <height>167</height>\n  <field>\n   <rect>\n    <x>465</x>\n    <y>130</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   <data>\n    <query>head</query>\n    <column>flstmthead_year</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>360</x>\n    <y>130</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   <data>\n    <query>head</query>\n    <column>flstmthead_year</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>465</x>\n    <y>145</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>Budget</string>\n  </label>\n  <field>\n   <rect>\n    <x>360</x>\n    <y>145</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   <data>\n    <query>head</query>\n    <column>flstmthead_typedescrip2</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>560</x>\n    <y>145</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   <data>\n    <query>head</query>\n    <column>Budget Diff.</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>100</y>\n    <width>459</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>flstmthead_typedescrip1</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>80</y>\n    <width>80</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Name:</string>\n  </label>\n  <field>\n   <rect>\n    <x>560</x>\n    <y>130</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   <data>\n    <query>head</query>\n    <column>flstmthead_year</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>345</x>\n    <y>10</y>\n    <width>380</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>Financial Report</string>\n  </label>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>80</y>\n    <width>459</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_name</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>100</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>Type:</string>\n  </label>\n  <label>\n   <rect>\n    <x>650</x>\n    <y>145</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>% Diff.</string>\n  </label>\n  <label>\n   <rect>\n    <x>1</x>\n    <y>130</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>Name</string>\n  </label>\n  <line>\n   <xstart>3.53065</xstart>\n   <ystart>160</ystart>\n   <xend>749.738</xend>\n   <yend>160</yend>\n   <weight>2</weight>\n  </line>\n  <field>\n   <rect>\n    <x>650</x>\n    <y>130</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   <data>\n    <query>head</query>\n    <column>flstmthead_year</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>99</x>\n    <y>59.6</y>\n    <width>459</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>prj_name</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>15</x>\n    <y>59.5</y>\n    <width>80</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>project</column>\n   </data>\n  </field>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>4</height>\n </pghead>\n <pghead>\n  <height>37</height>\n  <field>\n   <rect>\n    <x>555</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   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_year</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>455</x>\n    <y>15</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Budget</string>\n  </label>\n  <field>\n   <rect>\n    <x>355</x>\n    <y>15</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_typedescrip2</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>650</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   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_year</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>455</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   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_year</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>355</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   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>flstmthead_year</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>1</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>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Name</string>\n  </label>\n  <line>\n   <xstart>-0.610015</xstart>\n   <ystart>29.5831</ystart>\n   <xend>748.788</xend>\n   <yend>29.5831</yend>\n   <weight>2</weight>\n  </line>\n  <field>\n   <rect>\n    <x>555</x>\n    <y>15</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>Budget Diff.</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>650</x>\n    <y>15</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>% Diff.</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <group>\n   <name>subgrp</name>\n   <column>flstmtitem_subgrp</column>\n   <foot>\n    <height>4</height>\n    <line>\n     <xstart>355</xstart>\n     <ystart>0</ystart>\n     <xend>750</xend>\n     <yend>0</yend>\n     <weight>0</weight>\n    </line>\n   </foot>\n  </group>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>19</height>\n   <field>\n    <rect>\n     <x>459</x>\n     <y>0</y>\n     <width>85</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>flstmtitem_yearbudget</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>560</x>\n     <y>0</y>\n     <width>85</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>flstmtitem_yearbudgetdiff</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>650</x>\n     <y>0</y>\n     <width>85</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>flstmtitem_yearbudgetdiffprcnt</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>360</x>\n     <y>0</y>\n     <width>85</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>flstmtitem_year</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>25</x>\n     <y>0</y>\n     <width>345</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>flstmtitem_name</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <section>\n  <name>notes</name>\n  <detail>\n   <key>\n    <query>notes</query>\n   </key>\n   <height>24</height>\n   <text>\n    <rect>\n     <x>25</x>\n     <y>9</y>\n     <width>700</width>\n     <height>15</height>\n    </rect>\n    <bottompad>0</bottompad>\n    <font>\n     <face>Arial</face>\n     <size>9</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <top/>\n    <data>\n     <query>notes</query>\n     <column>notes</column>\n    </data>\n   </text>\n  </detail>\n </section>\n <pgfoot>\n  <height>22</height>\n  <field>\n   <rect>\n    <x>695</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>550</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 <rptfoot>\n  <height>7</height>\n </rptfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
409	FreightPricesByCustomer	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Freight Prices By Customer</title>\n <name>FreightPricesByCustomer</name>\n <description></description>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT cust_name,\n       addr_line1 AS cust_address1,\n       addr_line2 AS cust_address2,\n       addr_line3 AS cust_address3,\n       &lt;? if exists("showExpired") ?>\n         text('Yes')\n       &lt;? else ?>\n         text('No')\n       &lt;? endif ?>\n       AS f_showexpired,\n       &lt;? if exists("showFuture") ?>\n         text('Yes')\n       &lt;? else ?>\n         text('No')\n       &lt;? endif ?>\n       AS f_showfuture\n   FROM custinfo\n   LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id)\n   LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id)\nWHERE (cust_id=&lt;? value("cust_id") ?>);\n</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT itemid, sourcetype, ipshead_name, source,\n       formatQty(ipsfreight_qtybreak) AS f_qtybreak,\n       formatSalesPrice(ipsfreight_price) AS f_price,\n       CASE WHEN (ipsfreight_type = 'F') THEN 'Flat Rate'\n            ELSE 'Per UOM'\n       END AS method,\n       currConcat(ipshead_curr_id) AS currConcat,\n       CASE WHEN (warehous_code IS NULL) THEN 'Any' ELSE warehous_code END AS f_warehous,\n       CASE WHEN (shipzone_name IS NULL) THEN 'Any' ELSE shipzone_name END AS f_shipzone,\n       CASE WHEN (freightclass_code IS NULL) THEN 'Any' ELSE freightclass_code END AS f_freightclass,\n       CASE WHEN (ipsfreight_shipvia IS NULL) THEN 'Any' ELSE ipsfreight_shipvia END AS f_shipvia\n\nFROM ( SELECT ipsfreight_id AS itemid, 1 AS sourcetype,\n              ipshead_name, 'Customer' AS source,\n              ipsfreight_qtybreak, ipsfreight_price,\n              ipsfreight_type, ipshead_curr_id,\n              warehous_code, shipzone_name, freightclass_code, ipsfreight_shipvia\nFROM ipsass JOIN ipshead ON (ipshead_id=ipsass_ipshead_id)\n            JOIN ipsfreight ON (ipsfreight_ipshead_id=ipshead_id)\n            LEFT OUTER JOIN whsinfo ON (warehous_id=ipsfreight_warehous_id)\n            LEFT OUTER JOIN shipzone ON (shipzone_id=ipsfreight_shipzone_id)\n            LEFT OUTER JOIN freightclass ON (freightclass_id=ipsfreight_freightclass_id)\nWHERE ( (ipsass_cust_id=&lt;? value("cust_id") ?>)\n AND (COALESCE(LENGTH(ipsass_shipto_pattern), 0) = 0)\n\n&lt;? if not exists("showExpired") ?>\n     AND (ipshead_expires > CURRENT_DATE)\n&lt;? endif ?>\n&lt;? if not exists("showFuture") ?>\n     AND (ipshead_effective &lt;= CURRENT_DATE)\n&lt;? endif ?>\n\n)\nUNION SELECT ipsfreight_id AS itemid, 2 AS sourcetype,\n             ipshead_name, 'CustType' AS source,\n             ipsfreight_qtybreak, ipsfreight_price,\n             ipsfreight_type, ipshead_curr_id,\n             warehous_code, shipzone_name, freightclass_code, ipsfreight_shipvia\nFROM ipsass JOIN ipshead ON (ipshead_id=ipsass_ipshead_id)\n            JOIN ipsfreight ON (ipsfreight_ipshead_id=ipshead_id)\n            JOIN custinfo ON (cust_custtype_id=ipsass_custtype_id)\n            LEFT OUTER JOIN whsinfo ON (warehous_id=ipsfreight_warehous_id)\n            LEFT OUTER JOIN shipzone ON (shipzone_id=ipsfreight_shipzone_id)\n            LEFT OUTER JOIN freightclass ON (freightclass_id=ipsfreight_freightclass_id)\nWHERE ( (cust_id=&lt;? value("cust_id") ?>)\n                  \n&lt;? if not exists("showExpired") ?>\n     AND (ipshead_expires > CURRENT_DATE)\n&lt;? endif ?>\n&lt;? if not exists("showFuture") ?>\n     AND (ipshead_effective &lt;= CURRENT_DATE)\n&lt;? endif ?>\n\n)\nUNION SELECT ipsfreight_id AS itemid, 3 AS sourcetype,\n             ipshead_name, 'CustTypePattern' AS source,\n             ipsfreight_qtybreak, ipsfreight_price,\n             ipsfreight_type, ipshead_curr_id,\n             warehous_code, shipzone_name, freightclass_code, ipsfreight_shipvia\nFROM custinfo   JOIN custtype ON (custtype_id=cust_custtype_id)\n            JOIN ipsass ON ((coalesce(length(ipsass_custtype_pattern), 0) > 0) AND\n                            (custtype_code ~ ipsass_custtype_pattern))\n            JOIN ipshead ON (ipshead_id=ipsass_ipshead_id)\n            JOIN ipsfreight ON (ipsfreight_ipshead_id=ipshead_id)\n            LEFT OUTER JOIN whsinfo ON (warehous_id=ipsfreight_warehous_id)\n            LEFT OUTER JOIN shipzone ON (shipzone_id=ipsfreight_shipzone_id)\n            LEFT OUTER JOIN freightclass ON (freightclass_id=ipsfreight_freightclass_id)\nWHERE ( (cust_id=&lt;? value("cust_id") ?>)\n                  \n&lt;? if not exists("showExpired") ?>\n     AND (ipshead_expires > CURRENT_DATE)\n&lt;? endif ?>\n&lt;? if not exists("showFuture") ?>\n     AND (ipshead_effective &lt;= CURRENT_DATE)\n&lt;? endif ?>\n\n)\nUNION SELECT ipsfreight_id AS itemid, 4 AS sourcetype,\n             ipshead_name, ('Sale' || '-' || sale_name) AS source,\n             ipsfreight_qtybreak, ipsfreight_price,\n             ipsfreight_type, ipshead_curr_id,\n             warehous_code, shipzone_name, freightclass_code, ipsfreight_shipvia\nFROM sale JOIN ipshead ON (ipshead_id=sale_ipshead_id)\n          JOIN ipsfreight ON (ipsfreight_ipshead_id=ipshead_id)\n          LEFT OUTER JOIN whsinfo ON (warehous_id=ipsfreight_warehous_id)\n          LEFT OUTER JOIN shipzone ON (shipzone_id=ipsfreight_shipzone_id)\n          LEFT OUTER JOIN freightclass ON (freightclass_id=ipsfreight_freightclass_id)\nWHERE ((TRUE)\n                  \n&lt;? if not exists("showExpired") ?>\n     AND (sale_enddate > CURRENT_DATE)\n&lt;? endif ?>\n&lt;? if not exists("showFuture") ?>\n     AND (sale_startdate &lt;= CURRENT_DATE)\n&lt;? endif ?>\n\n) ) AS data\nORDER BY ipsfreight_qtybreak, ipsfreight_price;</sql>\n </querysource>\n <rpthead>\n  <height>234</height>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>140</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>cust_address3</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>150</x>\n    <y>195</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. Break</string>\n  </label>\n  <label>\n   <rect>\n    <x>145</x>\n    <y>209</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>Price</string>\n  </label>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>195</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Schedule</string>\n  </label>\n  <field>\n   <rect>\n    <x>565</x>\n    <y>100</y>\n    <width>113</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_showexpired</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>245</x>\n    <y>195</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>Method</string>\n  </label>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>120</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>cust_address2</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>375</x>\n    <y>10</y>\n    <width>350</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>Freight Prices by Customer</string>\n  </label>\n  <label>\n   <rect>\n    <x>405</x>\n    <y>120</y>\n    <width>155</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Show Future Prices:</string>\n  </label>\n  <label>\n   <rect>\n    <x>350</x>\n    <y>209</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>To</string>\n  </label>\n  <field>\n   <rect>\n    <x>565</x>\n    <y>120</y>\n    <width>113</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_showfuture</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>350</x>\n    <y>195</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>From</string>\n  </label>\n  <label>\n   <rect>\n    <x>405</x>\n    <y>100</y>\n    <width>155</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Show Expired Prices:</string>\n  </label>\n  <label>\n   <rect>\n    <x>465</x>\n    <y>195</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 Class</string>\n  </label>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>80</y>\n    <width>605</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>cust_name</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>100</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>cust_address1</column>\n   </data>\n  </field>\n  <line>\n   <xstart>5</xstart>\n   <ystart>228</ystart>\n   <xend>745</xend>\n   <yend>228</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>245</x>\n    <y>209</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>Currency</string>\n  </label>\n  <label>\n   <rect>\n    <x>465</x>\n    <y>209</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>Ship Via</string>\n  </label>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>209</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Source</string>\n  </label>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>80</y>\n    <width>80</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Customer:</string>\n  </label>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>41</height>\n  <label>\n   <rect>\n    <x>350</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   <hcenter/>\n   <vcenter/>\n   <string>To</string>\n  </label>\n  <label>\n   <rect>\n    <x>15</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>Source</string>\n  </label>\n  <label>\n   <rect>\n    <x>465</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Freight Class</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>15</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>Schedule</string>\n  </label>\n  <label>\n   <rect>\n    <x>250</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   <hcenter/>\n   <vcenter/>\n   <string>Method</string>\n  </label>\n  <label>\n   <rect>\n    <x>465</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   <hcenter/>\n   <vcenter/>\n   <string>Ship Via</string>\n  </label>\n  <label>\n   <rect>\n    <x>155</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   <right/>\n   <vcenter/>\n   <string>Price</string>\n  </label>\n  <label>\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>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Qty. Break</string>\n  </label>\n  <label>\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>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>From</string>\n  </label>\n  <label>\n   <rect>\n    <x>250</x>\n    <y>15</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Currency</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>150</x>\n     <y>15</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_price</column>\n    </data>\n   </field>\n   <line>\n    <xstart>5</xstart>\n    <ystart>50</ystart>\n    <xend>745</xend>\n    <yend>50</yend>\n    <weight>0</weight>\n   </line>\n   <field>\n    <rect>\n     <x>480</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_freightclass</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>245</x>\n     <y>15</y>\n     <width>85</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>currConcat</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>10</x>\n     <y>0</y>\n     <width>120</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>ipshead_name</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>10</x>\n     <y>15</y>\n     <width>100</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>source</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>360</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_warehous</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>360</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>f_shipzone</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>245</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>method</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>480</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>f_shipvia</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>150</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_qtybreak</column>\n    </data>\n   </field>\n  </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
408	FreightPricesByCustomerType	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Freight Prices By Customer Type</title>\n <name>FreightPricesByCustomerType</name>\n <description></description>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT (custtype_code || '-' || custtype_descrip) as custtype,\n       &lt;? if exists("showExpired") ?>\n         text('Yes')\n       &lt;? else ?>\n         text('No')\n       &lt;? endif ?>\n       AS f_showexpired,\n       &lt;? if exists("showFuture") ?>\n         text('Yes')\n       &lt;? else ?>\n         text('No')\n       &lt;? endif ?>\n       AS f_showfuture\n  FROM custtype\n WHERE (custtype_id=&lt;? value("custtype_id") ?>);\n</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT itemid, sourcetype, ipshead_name, source,\n       formatQty(ipsfreight_qtybreak) AS f_qtybreak,\n       formatSalesPrice(ipsfreight_price) AS f_price,\n       CASE WHEN (ipsfreight_type = 'F') THEN 'Flat Rate'\n            ELSE 'Per UOM'\n       END AS method,\n       currConcat(ipshead_curr_id) AS currConcat,\n       CASE WHEN (warehous_code IS NULL) THEN 'Any' ELSE warehous_code END AS f_warehous,\n       CASE WHEN (shipzone_name IS NULL) THEN 'Any' ELSE shipzone_name END AS f_shipzone,\n       CASE WHEN (freightclass_code IS NULL) THEN 'Any' ELSE freightclass_code END AS f_freightclass,\n       CASE WHEN (ipsfreight_shipvia IS NULL) THEN 'Any' ELSE ipsfreight_shipvia END AS f_shipvia\n\nFROM ( SELECT ipsfreight_id AS itemid, 1 AS sourcetype,\n              ipshead_name, 'CustType' AS source,\n              ipsfreight_qtybreak, ipsfreight_price,\n              ipsfreight_type, ipshead_curr_id,\n              warehous_code, shipzone_name, freightclass_code, ipsfreight_shipvia\nFROM ipsass JOIN ipshead ON (ipshead_id=ipsass_ipshead_id)\n            JOIN ipsfreight ON (ipsfreight_ipshead_id=ipshead_id)\n            LEFT OUTER JOIN whsinfo ON (warehous_id=ipsfreight_warehous_id)\n            LEFT OUTER JOIN shipzone ON (shipzone_id=ipsfreight_shipzone_id)\n            LEFT OUTER JOIN freightclass ON (freightclass_id=ipsfreight_freightclass_id)\nWHERE ( (ipsass_custtype_id=&lt;? value("custtype_id") ?>)\n                  \n&lt;? if not exists("showExpired") ?>\n     AND (ipshead_expires > CURRENT_DATE)\n&lt;? endif ?>\n&lt;? if not exists("showFuture") ?>\n     AND (ipshead_effective &lt;= CURRENT_DATE)\n&lt;? endif ?>\n\n)\nUNION SELECT ipsfreight_id AS itemid, 2 AS sourcetype,\n             ipshead_name, 'CustTypePattern' AS source,\n             ipsfreight_qtybreak, ipsfreight_price,\n             ipsfreight_type, ipshead_curr_id,\n             warehous_code, shipzone_name, freightclass_code, ipsfreight_shipvia\nFROM custtype JOIN ipsass ON ((coalesce(length(ipsass_custtype_pattern), 0) > 0) AND\n                              (custtype_code ~ ipsass_custtype_pattern))\n              JOIN ipshead ON (ipshead_id=ipsass_ipshead_id)\n              JOIN ipsfreight ON (ipsfreight_ipshead_id=ipshead_id)\n              LEFT OUTER JOIN whsinfo ON (warehous_id=ipsfreight_warehous_id)\n              LEFT OUTER JOIN shipzone ON (shipzone_id=ipsfreight_shipzone_id)\n              LEFT OUTER JOIN freightclass ON (freightclass_id=ipsfreight_freightclass_id)\nWHERE ( (custtype_id=&lt;? value("custtype_id") ?>)\n                  \n&lt;? if not exists("showExpired") ?>\n     AND (ipshead_expires > CURRENT_DATE)\n&lt;? endif ?>\n&lt;? if not exists("showFuture") ?>\n     AND (ipshead_effective &lt;= CURRENT_DATE)\n&lt;? endif ?>\n\n)\nUNION SELECT ipsfreight_id AS itemid, 3 AS sourcetype,\n             ipshead_name, ('Sale' || '-' || sale_name) AS source,\n             ipsfreight_qtybreak, ipsfreight_price,\n             ipsfreight_type, ipshead_curr_id,\n             warehous_code, shipzone_name, freightclass_code, ipsfreight_shipvia\nFROM sale JOIN ipshead ON (ipshead_id=sale_ipshead_id)\n          JOIN ipsfreight ON (ipsfreight_ipshead_id=ipshead_id)\n          LEFT OUTER JOIN whsinfo ON (warehous_id=ipsfreight_warehous_id)\n          LEFT OUTER JOIN shipzone ON (shipzone_id=ipsfreight_shipzone_id)\n          LEFT OUTER JOIN freightclass ON (freightclass_id=ipsfreight_freightclass_id)\nWHERE ((TRUE)\n\n&lt;? if not exists("showExpired") ?>\n     AND (ipshead_expires > CURRENT_DATE)\n&lt;? endif ?>\n&lt;? if not exists("showFuture") ?>\n     AND (ipshead_effective &lt;= CURRENT_DATE)\n&lt;? endif ?>\n\n) ) AS data\nORDER BY ipsfreight_qtybreak, ipsfreight_price;\n</sql>\n </querysource>\n <rpthead>\n  <height>233</height>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>195</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Schedule</string>\n  </label>\n  <label>\n   <rect>\n    <x>150</x>\n    <y>195</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. Break</string>\n  </label>\n  <label>\n   <rect>\n    <x>465</x>\n    <y>195</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 Class</string>\n  </label>\n  <label>\n   <rect>\n    <x>405</x>\n    <y>100</y>\n    <width>155</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Show Expired Prices:</string>\n  </label>\n  <label>\n   <rect>\n    <x>245</x>\n    <y>195</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>Method</string>\n  </label>\n  <label>\n   <rect>\n    <x>350</x>\n    <y>208</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>To</string>\n  </label>\n  <label>\n   <rect>\n    <x>350</x>\n    <y>195</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>From</string>\n  </label>\n  <field>\n   <rect>\n    <x>565</x>\n    <y>100</y>\n    <width>112</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_showexpired</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>465</x>\n    <y>208</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>Ship Via</string>\n  </label>\n  <field>\n   <rect>\n    <x>565</x>\n    <y>120</y>\n    <width>112</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>f_showfuture</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>320</x>\n    <y>10</y>\n    <width>405</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>Freight Prices by Customer Type</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>227</ystart>\n   <xend>745</xend>\n   <yend>227</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>405</x>\n    <y>120</y>\n    <width>155</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Show Future Prices:</string>\n  </label>\n  <label>\n   <rect>\n    <x>145</x>\n    <y>208</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>Price</string>\n  </label>\n  <field>\n   <rect>\n    <x>125</x>\n    <y>80</y>\n    <width>535</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>custtype</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>80</y>\n    <width>104</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Customer Type:</string>\n  </label>\n  <label>\n   <rect>\n    <x>245</x>\n    <y>208</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>Currency</string>\n  </label>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>208</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Source</string>\n  </label>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>41</height>\n  <label>\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>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>From</string>\n  </label>\n  <label>\n   <rect>\n    <x>465</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   <hcenter/>\n   <vcenter/>\n   <string>Ship Via</string>\n  </label>\n  <label>\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>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Qty. Break</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>35</ystart>\n   <xend>745</xend>\n   <yend>35</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>350</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   <hcenter/>\n   <vcenter/>\n   <string>To</string>\n  </label>\n  <label>\n   <rect>\n    <x>250</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   <hcenter/>\n   <vcenter/>\n   <string>Method</string>\n  </label>\n  <label>\n   <rect>\n    <x>15</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>Source</string>\n  </label>\n  <label>\n   <rect>\n    <x>250</x>\n    <y>15</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Currency</string>\n  </label>\n  <label>\n   <rect>\n    <x>155</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   <right/>\n   <vcenter/>\n   <string>Price</string>\n  </label>\n  <label>\n   <rect>\n    <x>465</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Freight Class</string>\n  </label>\n  <label>\n   <rect>\n    <x>15</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>Schedule</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>360</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>f_shipzone</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>245</x>\n     <y>15</y>\n     <width>85</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>currConcat</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>480</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>f_shipvia</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>150</x>\n     <y>15</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_price</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>10</x>\n     <y>15</y>\n     <width>100</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>source</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>245</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>method</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>360</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_warehous</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>10</x>\n     <y>0</y>\n     <width>120</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>ipshead_name</column>\n    </data>\n   </field>\n   <line>\n    <xstart>5</xstart>\n    <ystart>50</ystart>\n    <xend>745</xend>\n    <yend>50</yend>\n    <weight>0</weight>\n   </line>\n   <field>\n    <rect>\n     <x>150</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_qtybreak</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>480</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_freightclass</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  <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 </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
430	InventoryHistory	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Inventory History</title>\n <name>InventoryHistory</name>\n <description></description>\n <grid>\n  <snap/>\n  <show/>\n  <x>0.05</x>\n  <y>0.05</y>\n </grid>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT invhist_id,\n       invhist_transdate,\n       formatDateTime(invhist_transdate) AS f_transdate,\n       invhist_transtype,\n       whs1.warehous_code AS warehous_code,\n       item_number,\n       item_descrip1,\n       item_descrip2,\n       formatQty(invhist_invqty) AS transqty,\n       (invhist_value_after-invhist_value_before) AS transvalue,\n       formatMoney(invhist_value_after-invhist_value_before) AS f_transvalue,\n       invhist_invuom,\n       CASE WHEN (invhist_ordtype NOT LIKE '') THEN (invhist_ordtype || '-' || invhist_ordnumber)\n            ELSE invhist_ordnumber\n       END AS ordernumber,\n       formatQty(invhist_qoh_before) AS qohbefore,\n       formatQty(invhist_qoh_after) AS qohafter,\n       CASE WHEN (invhist_costmethod='A') THEN &lt;? value("average") ?>\n            WHEN (invhist_costmethod='S') THEN &lt;? value("standard") ?>\n            WHEN (invhist_costmethod='J') THEN &lt;? value("job") ?>\n            WHEN (invhist_costmethod='N') THEN &lt;? value("none") ?>\n            ELSE &lt;? value("unknown") ?>\n       END AS costmethod,\n       formatMoney(invhist_value_before) AS valbefore,\n       formatMoney(invhist_value_after) AS valafter,\n       invhist_user AS username,\n       invhist_posted,\n       0 AS invdetail_id,\n       '' AS locationname,\n       '' AS detailqty,\n       '' AS locationqtybefore,\n       '' AS locationqtyafter,\n       CASE WHEN (invhist_transtype='TW') THEN whs1.warehous_code\n            WHEN (invhist_transtype='IB') THEN whs1.warehous_code\n            WHEN (invhist_transtype='IM') THEN whs1.warehous_code\n            WHEN (invhist_transtype='IT') THEN whs1.warehous_code\n            WHEN (invhist_transtype='RB') THEN 'WIP'\n            WHEN (invhist_transtype='RM') THEN 'WIP'\n            WHEN (invhist_transtype='RP') THEN 'PURCH'\n            WHEN (invhist_transtype='RR') THEN 'CUST'\n            WHEN (invhist_transtype='RS') THEN 'SHIP'\n            WHEN (invhist_transtype='SH') THEN whs1.warehous_code\n            WHEN (invhist_transtype='SI') THEN whs1.warehous_code\n            WHEN (invhist_transtype='SV') THEN whs1.warehous_code\n\t    WHEN (invhist_transtype='TR') THEN whs2.warehous_code\n\t    WHEN (invhist_transtype='TS') THEN whs1.warehous_code\n            ELSE ''\n       END AS locfrom,\n       CASE WHEN (invhist_transtype='TW') THEN whs2.warehous_code\n            WHEN (invhist_transtype='AD') THEN whs1.warehous_code\n            WHEN (invhist_transtype='CC') THEN whs1.warehous_code\n            WHEN (invhist_transtype='IB') THEN 'WIP'\n            WHEN (invhist_transtype='IM') THEN 'WIP'\n            WHEN (invhist_transtype='NN') THEN whs1.warehous_code\n            WHEN (invhist_transtype='RB') THEN whs1.warehous_code\n            WHEN (invhist_transtype='RM') THEN whs1.warehous_code\n            WHEN (invhist_transtype='RP') THEN whs1.warehous_code\n            WHEN (invhist_transtype='RR') THEN whs1.warehous_code\n            WHEN (invhist_transtype='RS') THEN whs1.warehous_code\n            WHEN (invhist_transtype='RT') THEN whs1.warehous_code\n            WHEN (invhist_transtype='RX') THEN whs1.warehous_code\n            WHEN (invhist_transtype='SH') THEN 'SHIP'\n            WHEN (invhist_transtype='SI') THEN 'SCRAP'\n            WHEN (invhist_transtype='SV') THEN 'SHIP'\n\t    WHEN (invhist_transtype='TR') THEN whs1.warehous_code\n\t    WHEN (invhist_transtype='TS') THEN whs2.warehous_code\n            ELSE ''\n       END AS locto\n  FROM itemsite, item, whsinfo AS whs1, invhist LEFT OUTER JOIN whsinfo AS whs2 ON (invhist_xfer_warehous_id=whs2.warehous_id)\n WHERE ( (NOT invhist_hasdetail)\n   AND (invhist_itemsite_id=itemsite_id)\n   AND (itemsite_item_id=item_id)\n   AND (itemsite_warehous_id=whs1.warehous_id)\n  AND  (DATE(invhist_transdate) BETWEEN &lt;? value("startDate") ?> AND &lt;? value("endDate") ?> )\n   AND (transType(invhist_transtype, &lt;? value("transType") ?>))\n&lt;? if exists("orderType") ?>\n  AND  (invhist_ordtype=&lt;? value("orderType") ?>)\n&lt;? endif ?>\n&lt;? if exists("orderNumber") ?>\n  AND  (invhist_ordnumber ~ &lt;? value("orderNumber") ?>)\n&lt;? endif ?>\n&lt;? if exists("cohead_id") ?>\n  AND  (invhist_ordtype='SO')\n  AND  (invhist_ordnumber ~ (\n    SELECT cohead_number \n    FROM cohead \n    WHERE cohead_id=&lt;? value("cohead_id") ?>))\n&lt;? endif ?>\n&lt;? if exists("pohead_id") ?>\n  AND  (invhist_ordtype='PO')\n  AND  (invhist_ordnumber ~ (\n    SELECT pohead_number \n    FROM pohead \n    WHERE pohead_id=&lt;? value("pohead_id") ?>))\n&lt;? endif ?>\n&lt;? if exists("tohead_id") ?>\n  AND  (invhist_ordtype='TO')\n  AND  (invhist_ordnumber ~ (\n    SELECT tohead_number \n    FROM tohead \n    WHERE tohead_id=&lt;? value("tohead_id") ?>))\n&lt;? endif ?>\n&lt;? if exists("wo_id") ?>\n  AND  (invhist_ordtype='WO')\n  AND  (invhist_ordnumber ~ formatWoNumber(&lt;? value("wo_id") ?>))\n&lt;? endif ?>\n&lt;? if exists("warehous_id") ?>\n  AND  (itemsite_warehous_id=&lt;? value("warehous_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("item_id") ?>\n  AND  (itemsite_item_id=&lt;? value("item_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("classcode_id") ?>\n  AND  (item_classcode_id=&lt;? value("classcode_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("itemgrp_id") ?>\n  AND (item_id IN (SELECT itemgrpitem_item_id\n\t\t   FROM itemgrpitem\n\t\t   WHERE (itemgrpitem_itemgrp_id=&lt;? value("itemgrp_id") ?>)))\n&lt;? endif ?>\n&lt;? if exists("plancode_id") ?>\n  AND  (itemsite_plancode_id=&lt;? value("plancode_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("classcode_pattern") ?>\n  AND  (item_classcode_id IN (SELECT classcode_id\n\t\t\t      FROM classcode\n\t\t\t      WHERE (classcode_code ~ &lt;? value ("classcode_pattern") ?>)))\n&lt;? endif ?>\n&lt;? if exists("itemgrp_pattern") ?>\n  AND (item_id IN (SELECT itemgrpitem_item_id\n\t\t   FROM itemgrpitem, itemgrp\n\t\t   WHERE ( (itemgrpitem_itemgrp_id=itemgrp_id)\n\t\t     AND  (itemgrp_name ~ &lt;? value ("itemgrp_pattern") ?>))))\n&lt;? endif ?>\n&lt;? if exists("plancode_pattern") ?>\n  AND (itemsite_plancode_id IN (SELECT plancode_id\n\t\t\t\tFROM plancode\n\t\t\t\tWHERE (plancode_code ~ &lt;? value("plancode_pattern") ?>)))\n&lt;? endif ?>\n&lt;? if exists("itemgrp") ?>\n  AND (item_id IN (SELECT DISTINCT itemgrpitem_item_id FROM itemgrpitem))\n&lt;? endif ?>\n)\nUNION\nSELECT invhist_id,\n       invhist_transdate,\n       formatDateTime(invhist_transdate) AS transdate,\n       invhist_transtype,\n       whs1.warehous_code AS warehous_code,\n       item_number,\n       item_descrip1,\n       item_descrip2,\n       formatQty(invhist_invqty) AS transqty,\n       0 AS transvalue,\n       formatMoney(invhist_value_after-invhist_value_before) AS f_transvalue,\n       invhist_invuom,\n       CASE WHEN (invhist_ordtype NOT LIKE '') THEN (invhist_ordtype || '-' || invhist_ordnumber)\n            ELSE invhist_ordnumber\n       END AS ordernumber,\n       formatQty(invhist_qoh_before) AS qohbefore,\n       formatQty(invhist_qoh_after) AS qohafter,\n       CASE WHEN(invhist_costmethod='A') THEN text('Average')\n            WHEN(invhist_costmethod='S') THEN text('Standard')\n            WHEN(invhist_costmethod='J') THEN text('Job')\n            WHEN(invhist_costmethod='N') THEN text('None')\n            ELSE 'UNKNOWN'\n       END AS costmethod,\n       formatMoney(invhist_value_before) AS valbefore,\n       formatMoney(invhist_value_after) AS valafter,\n       invhist_user AS username,\n       invhist_posted,\n       invdetail_id,\n       CASE WHEN (invdetail_location_id=-1) THEN formatlotserialnumber(invdetail_ls_id)\n            WHEN (invdetail_ls_id IS NULL) THEN formatLocationName(invdetail_location_id)\n            ELSE (formatLocationName(invdetail_location_id) || '-' || formatlotserialnumber(invdetail_ls_id))\n       END AS locationname,\n       formatQty(invdetail_qty) AS detailqty,\n       formatQty(invdetail_qty_before) AS locationqtybefore,\n       formatQty(invdetail_qty_after) AS locationqtyafter,\n       CASE WHEN (invhist_transtype='TW') THEN whs1.warehous_code\n            WHEN (invhist_transtype='IB') THEN whs1.warehous_code\n            WHEN (invhist_transtype='IM') THEN whs1.warehous_code\n            WHEN (invhist_transtype='IT') THEN whs1.warehous_code\n            WHEN (invhist_transtype='RB') THEN 'WIP'\n            WHEN (invhist_transtype='RM') THEN 'WIP'\n            WHEN (invhist_transtype='RP') THEN 'PURCH'\n            WHEN (invhist_transtype='RR') THEN 'CUST'\n            WHEN (invhist_transtype='RS') THEN 'SHIP'\n            WHEN (invhist_transtype='SH') THEN whs1.warehous_code\n            WHEN (invhist_transtype='SI') THEN whs1.warehous_code\n            WHEN (invhist_transtype='SV') THEN whs1.warehous_code\n\t    WHEN (invhist_transtype='TR') THEN whs2.warehous_code\n\t    WHEN (invhist_transtype='TS') THEN whs1.warehous_code\n            ELSE ''\n       END AS locfrom,\n       CASE WHEN (invhist_transtype='TW') THEN whs2.warehous_code\n            WHEN (invhist_transtype='AD') THEN whs1.warehous_code\n            WHEN (invhist_transtype='CC') THEN whs1.warehous_code\n            WHEN (invhist_transtype='IB') THEN 'WIP'\n            WHEN (invhist_transtype='IM') THEN 'WIP'\n            WHEN (invhist_transtype='NN') THEN whs1.warehous_code\n            WHEN (invhist_transtype='RB') THEN whs1.warehous_code\n            WHEN (invhist_transtype='RM') THEN whs1.warehous_code\n            WHEN (invhist_transtype='RP') THEN whs1.warehous_code\n            WHEN (invhist_transtype='RR') THEN whs1.warehous_code\n            WHEN (invhist_transtype='RS') THEN whs1.warehous_code\n            WHEN (invhist_transtype='RT') THEN whs1.warehous_code\n            WHEN (invhist_transtype='RX') THEN whs1.warehous_code\n            WHEN (invhist_transtype='SH') THEN 'SHIP'\n            WHEN (invhist_transtype='SI') THEN 'SCRAP'\n            WHEN (invhist_transtype='SV') THEN 'SHIP'\n\t    WHEN (invhist_transtype='TR') THEN whs1.warehous_code\n\t    WHEN (invhist_transtype='TS') THEN whs2.warehous_code\n            ELSE ''\n       END AS locto\n  FROM itemsite, item, whsinfo AS whs1, invdetail, invhist LEFT OUTER JOIN whsinfo AS whs2 ON (invhist_xfer_warehous_id=whs2.warehous_id)\n WHERE ((invhist_hasdetail)\n   AND (invhist_itemsite_id=itemsite_id)\n   AND (itemsite_item_id=item_id)\n   AND (itemsite_warehous_id=whs1.warehous_id)\n   AND (invdetail_invhist_id=invhist_id)\n   AND  (DATE(invhist_transdate) BETWEEN &lt;? value("startDate") ?> AND &lt;? value("endDate") ?> )\n   AND (transType(invhist_transtype, &lt;? value("transType") ?>))\n&lt;? if exists("orderType") ?>\n  AND  (invhist_ordtype=&lt;? value("orderType") ?>)\n&lt;? endif ?>\n&lt;? if exists("orderNumber") ?>\n  AND  (invhist_ordnumber ~ &lt;? value("orderNumber") ?>)\n&lt;? endif ?>\n&lt;? if exists("cohead_id") ?>\n  AND  (invhist_ordtype='SO')\n  AND  (invhist_ordnumber ~ (\n    SELECT cohead_number \n    FROM cohead \n    WHERE cohead_id=&lt;? value("cohead_id") ?>))\n&lt;? endif ?>\n&lt;? if exists("pohead_id") ?>\n  AND  (invhist_ordtype='PO')\n  AND  (invhist_ordnumber ~ (\n    SELECT pohead_number \n    FROM pohead \n    WHERE pohead_id=&lt;? value("pohead_id") ?>))\n&lt;? endif ?>\n&lt;? if exists("tohead_id") ?>\n  AND  (invhist_ordtype='TO')\n  AND  (invhist_ordnumber ~ (\n    SELECT tohead_number \n    FROM tohead \n    WHERE tohead_id=&lt;? value("tohead_id") ?>))\n&lt;? endif ?>\n&lt;? if exists("wo_id") ?>\n  AND  (invhist_ordtype='WO')\n  AND  (invhist_ordnumber ~ formatWoNumber(&lt;? value("wo_id") ?>))\n&lt;? endif ?>\n&lt;? if exists("warehous_id") ?>\n  AND  (itemsite_warehous_id=&lt;? value("warehous_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("item_id") ?>\n  AND  (itemsite_item_id=&lt;? value("item_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("classcode_id") ?>\n  AND  (item_classcode_id=&lt;? value("classcode_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("itemgrp_id") ?>\n  AND (item_id IN (SELECT itemgrpitem_item_id\n\t\t   FROM itemgrpitem\n\t\t   WHERE (itemgrpitem_itemgrp_id=&lt;? value("itemgrp_id") ?>)))\n&lt;? endif ?>\n&lt;? if exists("plancode_id") ?>\n  AND  (itemsite_plancode_id=&lt;? value("plancode_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("classcode_pattern") ?>\n  AND  (item_classcode_id IN (SELECT classcode_id\n\t\t\t      FROM classcode\n\t\t\t      WHERE (classcode_code ~ &lt;? value ("classcode_pattern") ?>)))\n&lt;? endif ?>\n&lt;? if exists("itemgrp_pattern") ?>\n  AND (item_id IN (SELECT itemgrpitem_item_id\n\t\t   FROM itemgrpitem, itemgrp\n\t\t   WHERE ( (itemgrpitem_itemgrp_id=itemgrp_id)\n\t\t     AND  (itemgrp_name ~ &lt;? value ("itemgrp_pattern") ?>))))\n&lt;? endif ?>\n&lt;? if exists("plancode_pattern") ?>\n  AND (itemsite_plancode_id IN (SELECT plancode_id\n\t\t\t\tFROM plancode\n\t\t\t\tWHERE (plancode_code ~ &lt;? value("plancode_pattern") ?>)))\n&lt;? endif ?>\n&lt;? if exists("itemgrp") ?>\n  AND (item_id IN (SELECT DISTINCT itemgrpitem_item_id FROM itemgrpitem))\n&lt;? endif ?>\n);</sql>\n </querysource>\n <querysource>\n  <name>footer</name>\n  <sql>SELECT formatMoney(sum(invhist_value_after-invhist_value_before)) AS transvalue_total\nFROM itemsite, item, whsinfo AS whs1, invhist LEFT OUTER JOIN\n     whsinfo AS whs2 ON (invhist_xfer_warehous_id=whs2.warehous_id)\nWHERE ( (invhist_itemsite_id=itemsite_id)\n  AND  (itemsite_item_id=item_id) \n  AND  (itemsite_warehous_id=whs1.warehous_id)\n  AND  (DATE(invhist_transdate) BETWEEN &lt;? value("startDate") ?> AND &lt;? value("endDate") ?> )\n  AND  (transType(invhist_transtype, &lt;? value("transType") ?>))\n&lt;? if exists("orderType") ?>\n  AND  (invhist_ordtype=&lt;? value("orderType") ?>)\n&lt;? endif ?>\n&lt;? if exists("orderNumber") ?>\n  AND  (invhist_ordnumber ~ &lt;? value("orderNumber") ?>)\n  AND  (invhist_ordtype = 'SO')\n&lt;? endif ?>\n&lt;? if exists("warehous_id") ?>\n  AND  (itemsite_warehous_id=&lt;? value("warehous_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("item_id") ?>\n  AND  (itemsite_item_id=&lt;? value("item_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("classcode_id") ?>\n  AND  (item_classcode_id=&lt;? value("classcode_id") ?>)\n&lt;? elseif exists("itemgrp_id") ?>\n  AND (item_id IN (SELECT itemgrpitem_item_id\n\t\t   FROM itemgrpitem\n\t\t   WHERE (itemgrpitem_itemgrp_id=&lt;? value("itemgrp_id") ?>)))\n&lt;? elseif exists("plancode_id") ?>\n  AND  (itemsite_plancode_id=&lt;? value("plancode_id") ?>)\n&lt;? elseif exists("classcode_pattern") ?>\n  AND  (item_classcode_id IN (SELECT classcode_id\n\t\t\t      FROM classcode\n\t\t\t      WHERE (classcode_code ~ &lt;? value ("classcode_pattern") ?>)))\n&lt;? elseif exists("itemgrp_pattern") ?>\n  AND (item_id IN (SELECT itemgrpitem_item_id\n\t\t   FROM itemgrpitem, itemgrp\n\t\t   WHERE ( (itemgrpitem_itemgrp_id=itemgrp_id)\n\t\t     AND  (itemgrp_name ~ &lt;? value ("itemgrp_pattern") ?>))))\n&lt;? elseif exists("plancode_pattern") ?>\n  AND (itemsite_plancode_id IN (SELECT plancode_id\n\t\t\t\tFROM plancode\n\t\t\t\tWHERE (plancode_code ~ &lt;? value("plancode_pattern") ?>)))\n&lt;? elseif exists("itemgrp") ?>\n  AND (item_id IN (SELECT DISTINCT itemgrpitem_item_id FROM itemgrpitem))\n&lt;? endif ?>\n)</sql>\n </querysource>\n <rpthead>\n  <height>242</height>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>200</y>\n    <width>50</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>Site</string>\n  </label>\n  <label>\n   <rect>\n    <x>660</x>\n    <y>211</y>\n    <width>72</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>Area To</string>\n  </label>\n  <label>\n   <rect>\n    <x>660</x>\n    <y>222</y>\n    <width>72</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>Val. After</string>\n  </label>\n  <label>\n   <rect>\n    <x>660</x>\n    <y>200</y>\n    <width>72</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>QOH After</string>\n  </label>\n  <label>\n   <rect>\n    <x>200</x>\n    <y>211</y>\n    <width>228</width>\n    <height>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>585</x>\n    <y>222</y>\n    <width>72</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>Val. Before</string>\n  </label>\n  <label>\n   <rect>\n    <x>60</x>\n    <y>200</y>\n    <width>130</width>\n    <height>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Time</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>237</ystart>\n   <xend>745</xend>\n   <yend>237</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>5.68571</x>\n    <y>211</y>\n    <width>50</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>Type</string>\n  </label>\n  <label>\n   <rect>\n    <x>586</x>\n    <y>211</y>\n    <width>72</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>Area From</string>\n  </label>\n  <label>\n   <rect>\n    <x>585</x>\n    <y>200</y>\n    <width>72</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>QOH Before</string>\n  </label>\n  <label>\n   <rect>\n    <x>200</x>\n    <y>200</y>\n    <width>228</width>\n    <height>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>510</x>\n    <y>211</y>\n    <width>72</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>Cost Method</string>\n  </label>\n  <label>\n   <rect>\n    <x>432</x>\n    <y>200</y>\n    <width>72</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>UOM</string>\n  </label>\n  <label>\n   <rect>\n    <x>60</x>\n    <y>211</y>\n    <width>130</width>\n    <height>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Order Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>508</x>\n    <y>200</y>\n    <width>72</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>Qty</string>\n  </label>\n  <label>\n   <rect>\n    <x>60</x>\n    <y>222</y>\n    <width>130</width>\n    <height>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Username</string>\n  </label>\n  <label>\n   <rect>\n    <x>510</x>\n    <y>222</y>\n    <width>72</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>Value</string>\n  </label>\n  <label>\n   <rect>\n    <x>430</x>\n    <y>7</y>\n    <width>310</width>\n    <height>30</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>Inventory History</string>\n  </label>\n  <text>\n   <rect>\n    <x>10</x>\n    <y>37</y>\n    <width>725</width>\n    <height>15</height>\n   </rect>\n   <bottompad>12</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>Parameter Query</query>\n    <column>filter</column>\n   </data>\n  </text>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>2</height>\n </pghead>\n <pghead>\n  <height>51</height>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>0</y>\n    <width>32</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>Site</string>\n  </label>\n  <label>\n   <rect>\n    <x>585</x>\n    <y>12</y>\n    <width>72</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>Area From</string>\n  </label>\n  <label>\n   <rect>\n    <x>585</x>\n    <y>0</y>\n    <width>72</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>QOH Before</string>\n  </label>\n  <label>\n   <rect>\n    <x>586.32</x>\n    <y>25</y>\n    <width>72</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>Val. Before</string>\n  </label>\n  <label>\n   <rect>\n    <x>200</x>\n    <y>0</y>\n    <width>228</width>\n    <height>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>510</x>\n    <y>12</y>\n    <width>72</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>Cost Method</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>12</y>\n    <width>32</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>Type</string>\n  </label>\n  <label>\n   <rect>\n    <x>60</x>\n    <y>0</y>\n    <width>130</width>\n    <height>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Time</string>\n  </label>\n  <label>\n   <rect>\n    <x>660</x>\n    <y>12</y>\n    <width>72</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>Area To</string>\n  </label>\n  <label>\n   <rect>\n    <x>200</x>\n    <y>12</y>\n    <width>228</width>\n    <height>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Item Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>432</x>\n    <y>0</y>\n    <width>72</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>UOM</string>\n  </label>\n  <label>\n   <rect>\n    <x>60</x>\n    <y>25</y>\n    <width>130</width>\n    <height>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Username</string>\n  </label>\n  <label>\n   <rect>\n    <x>665</x>\n    <y>25</y>\n    <width>72</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>Val. After</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>45</ystart>\n   <xend>745</xend>\n   <yend>45</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>660</x>\n    <y>0</y>\n    <width>72</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>QOH After</string>\n  </label>\n  <label>\n   <rect>\n    <x>60</x>\n    <y>12</y>\n    <width>130</width>\n    <height>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Order Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>508</x>\n    <y>0</y>\n    <width>72</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>Qty</string>\n  </label>\n  <label>\n   <rect>\n    <x>510</x>\n    <y>25</y>\n    <width>72</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>Value</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <group>\n   <name>invhist_id</name>\n   <column>invhist_id</column>\n   <head>\n    <height>45</height>\n    <field>\n     <rect>\n      <x>60</x>\n      <y>0</y>\n      <width>132</width>\n      <height>12</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>f_transdate</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>200</x>\n      <y>0</y>\n      <width>228</width>\n      <height>12</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>item_number</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>200</x>\n      <y>25</y>\n      <width>228</width>\n      <height>12</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>item_descrip2</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>660</x>\n      <y>25</y>\n      <width>72</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     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>valafter</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>60</x>\n      <y>12</y>\n      <width>132</width>\n      <height>12</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>ordernumber</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>585</x>\n      <y>0</y>\n      <width>72</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     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>qohbefore</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>5</x>\n      <y>0</y>\n      <width>50</width>\n      <height>12</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>432</x>\n      <y>0</y>\n      <width>72</width>\n      <height>12</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>invhist_invuom</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>60</x>\n      <y>25</y>\n      <width>132</width>\n      <height>12</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>username</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>585</x>\n      <y>25</y>\n      <width>72</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     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>valbefore</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>660</x>\n      <y>12</y>\n      <width>72</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     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>locto</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>660</x>\n      <y>0</y>\n      <width>72</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     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>qohafter</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>5</x>\n      <y>12</y>\n      <width>50</width>\n      <height>12</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>invhist_transtype</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>510</x>\n      <y>0</y>\n      <width>72</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     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>transqty</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>585</x>\n      <y>12</y>\n      <width>72</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     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>locfrom</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>200</x>\n      <y>12</y>\n      <width>228</width>\n      <height>12</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>item_descrip1</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>510</x>\n      <y>12</y>\n      <width>72</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     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>costmethod</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>510</x>\n      <y>25</y>\n      <width>72</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     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>f_transvalue</column>\n     </data>\n    </field>\n   </head>\n   <foot>\n    <height>9</height>\n    <line>\n     <xstart>5</xstart>\n     <ystart>5</ystart>\n     <xend>745</xend>\n     <yend>5</yend>\n     <weight>0</weight>\n    </line>\n   </foot>\n  </group>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>16</height>\n   <field>\n    <rect>\n     <x>585</x>\n     <y>0</y>\n     <width>72</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    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>locationqtybefore</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>200</x>\n     <y>0</y>\n     <width>228</width>\n     <height>12</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>locationname</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>508</x>\n     <y>0</y>\n     <width>72</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    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>detailqty</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>660</x>\n     <y>0</y>\n     <width>72</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    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>locationqtyafter</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>14</height>\n  <label>\n   <rect>\n    <x>0</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   <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>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>612</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   <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>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n </pgfoot>\n <rptfoot>\n  <height>20</height>\n  <field>\n   <rect>\n    <x>510</x>\n    <y>5</y>\n    <width>72</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   <vcenter/>\n   <data>\n    <query>footer</query>\n    <column>transvalue_total</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>5</y>\n    <width>130</width>\n    <height>12</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Total:</string>\n  </label>\n </rptfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
59	CustomerInformation	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Customer Information</title>\n <name>CustomerInformation</name>\n <description></description>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT cust_name, cust_number,\n       ba.addr_line1 AS cust_address1, ba.addr_line2 AS cust_address2, ba.addr_line3 AS cust_address3,\n       ba.addr_city AS cust_city, ba.addr_state AS cust_state, ba.addr_postalcode AS cust_zipcode,\n       (ba.addr_city || ', ' || ba.addr_state || ' ' || ba.addr_postalcode) AS citystatezip,\n       trim(bc.cntct_first_name || ' ' || bc.cntct_last_name) AS cust_contact, bc.cntct_phone AS cust_phone, bc.cntct_fax AS cust_fax, bc.cntct_email AS cust_email,\n       ca.addr_line1 AS cust_corraddress1, ca.addr_line2 AS cust_corraddress2, ca.addr_line3 AS cust_corraddress3,\n       ca.addr_city AS cust_corrcity, ca.addr_state AS cust_corrstate, ca.addr_postalcode AS cust_corrzipcode,\n       (ca.addr_city || ', ' || ca.addr_state || ' ' || ca.addr_postalcode) AS corrcitystatezip,\n       trim(cc.cntct_first_name || ' ' || cc.cntct_last_name) AS cust_corrcontact, cc.cntct_phone AS cust_corrphone,\n       cc.cntct_fax AS cust_corrfax, cc.cntct_email AS cust_corremail,\n       CASE WHEN (cust_creditstatus='G') THEN 'In Good Standing'\n            WHEN (cust_creditstatus='W') THEN 'On Credit Warning'\n            WHEN (cust_creditstatus='H') THEN 'On Credit Hold'\n            ELSE ('Unknown Status: ' || cust_creditstatus)\n       END AS f_creditstatus,\n       cust_comments\n FROM custinfo\n LEFT OUTER JOIN cntct cc ON (cust_corrcntct_id=cc.cntct_id)\n LEFT OUTER JOIN addr ca ON (cc.cntct_addr_id=ca.addr_id)\n LEFT OUTER JOIN cntct bc ON (cust_cntct_id=bc.cntct_id)\n LEFT OUTER JOIN addr ba ON (bc.cntct_addr_id=ba.addr_id)\n WHERE (cust_id=&lt;? value(&quot;cust_id&quot;) ?>);</sql>\n </querysource>\n <querysource>\n  <name>firstlastorderdate</name>\n  <sql>SELECT formatDate(MIN(cohist_invcdate)) AS firstdate,\n       formatDate(MAX(cohist_invcdate)) AS lastdate\n   FROM cohist\nWHERE (cohist_cust_id=&lt;? value(&quot;cust_id&quot;) ?>);</sql>\n </querysource>\n <querysource>\n  <name>lysales</name>\n  <sql>SELECT formatMoney(COALESCE(SUM(round(cohist_qtyshipped * cohist_unitprice,2)), 0)) AS lysales FROM cohist WHERE ( (cohist_invcdate BETWEEN (DATE_TRUNC('year', CURRENT_TIMESTAMP) - INTERVAL '1 year') AND                                 (DATE_TRUNC('year', CURRENT_TIMESTAMP) - INTERVAL '1 day')) AND (cohist_cust_id=&lt;? value(&quot;cust_id&quot;) ?>) );</sql>\n </querysource>\n <querysource>\n  <name>ytdsales</name>\n  <sql>SELECT formatExtPrice(SUM(round(cohist_qtyshipped * cohist_unitprice,2))) AS ytdsales\n  FROM cohist\n WHERE ((cohist_invcdate>=DATE_TRUNC('year', CURRENT_TIMESTAMP))\n   AND (cohist_cust_id=&lt;? value(&quot;cust_id&quot;) ?>) );</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(&quot;cust_id&quot;) ?>) );</sql>\n </querysource>\n <querysource>\n  <name>OpenBalance</name>\n  <sql>SELECT formatMoney( COALESCE( SUM( CASE WHEN (aropen_doctype IN ('I', 'D')) THEN (aropen_amount - aropen_paid)                                       ELSE ((aropen_amount - aropen_paid) * -1)                                   END ), 0 ) ) AS f_balance FROM aropen WHERE ( (aropen_open) AND (aropen_cust_id=&lt;? value(&quot;cust_id&quot;) ?>) );</sql>\n </querysource>\n <querysource>\n  <name>LateBalance</name>\n  <sql>SELECT formatMoney( noNeg( COALESCE( SUM( CASE WHEN (aropen_doctype IN ('I', 'D')) THEN (aropen_amount - aropen_paid)                                      ELSE ((aropen_amount - aropen_paid) * -1)                                   END ), 0 ) ) ) AS f_balance FROM aropen WHERE ( (aropen_open) AND (aropen_duedate &lt; CURRENT_DATE) AND (aropen_cust_id=&lt;? value(&quot;cust_id&quot;) ?>) );\n</sql>\n </querysource>\n <querysource>\n  <name>Comments</name>\n  <sql>SELECT comment_source_id AS cust_id,\n       comment_id,\n       formatDate(comment_date) AS f_date,\n       comment_user,\n       comment_text\n  FROM comment\n WHERE ( (comment_source='C')\n   AND (comment_source_id=&lt;? value(&quot;cust_id&quot;) ?>) )\nORDER BY comment_date;</sql>\n </querysource>\n <querysource>\n  <name>History</name>\n  <sql>SELECT aropen_cust_id AS cust_id,\n       aropen_id AS aropenid, -1 AS applyid,\n       aropen_docnumber AS sortnumber,\n       aropen_docnumber AS docnumber,\n       formatBoolYN(aropen_open) AS f_open,\n       CASE WHEN (aropen_doctype='I') THEN text('Invoice')\n            WHEN (aropen_doctype='C') THEN text('C/M')\n            WHEN (aropen_doctype='D') THEN text('D/M')\n            WHEN (aropen_doctype='R') THEN text('C/D')\n            ELSE text('Other')\n       END AS documenttype,\n       formatDate(aropen_docdate) AS f_docdate,\n       formatDate(aropen_duedate) AS f_duedate,\n       formatMoney(aropen_amount) AS f_amount,\n       formatMoney((aropen_amount - aropen_paid)) AS f_balance\nFROM aropen\nWHERE (aropen_cust_id=&lt;? value(&quot;cust_id&quot;) ?>)\n\nUNION\nSELECT aropen_cust_id AS cust_id,\n       -1 AS aropenid, arapply_source_aropen_id AS applyid,\n       aropen_docnumber AS sortnumber,\n       CASE WHEN (arapply_source_doctype='C') THEN arapply_source_docnumber\n            WHEN (arapply_source_doctype='K') THEN arapply_refnumber\n            ELSE :error\n       END AS docnumber,\n       '' AS f_open,\n       CASE WHEN (arapply_source_doctype='C') THEN text('C/M')\n            WHEN (arapply_fundstype='C') THEN text('Check')\n            WHEN (arapply_fundstype='T') THEN text('Certified Check')\n            WHEN (arapply_fundstype='M') THEN text('Master Card')\n            WHEN (arapply_fundstype='V') THEN text('Visa')\n            WHEN (arapply_fundstype='A') THEN text('American Express')\n            WHEN (arapply_fundstype='D') THEN text('Discover Card')\n            WHEN (arapply_fundstype='R') THEN text('Other Credit Card')\n            WHEN (arapply_fundstype='K') THEN text('Cash')\n            WHEN (arapply_fundstype='W') THEN text('Wire Transfer')\n            WHEN (arapply_fundstype='O') THEN text('Other')\n       END AS documenttype,\n       formatDate(arapply_postdate) AS f_docdate,\n       '' AS f_duedate,\n       formatMoney(arapply_applied) AS f_amount,\n       '' AS f_balance\nFROM arapply, aropen\nWHERE ( (arapply_target_doctype IN ('I', 'D'))\n AND (arapply_target_doctype=aropen_doctype)\n AND (arapply_target_docnumber=aropen_docnumber)\n AND (arapply_cust_id=&lt;? value(&quot;cust_id&quot;) ?>)\n AND (aropen_cust_id=&lt;? value(&quot;cust_id&quot;) ?>) )\n\nUNION\nSELECT aropen_cust_id AS cust_id,\n       -1 AS aropenid, arapply_target_aropen_id AS applyid,\n       aropen_docnumber AS sortnumber,\n       arapply_target_docnumber AS docnumber,\n       '' AS f_open,\n       CASE WHEN (arapply_target_doctype='I') THEN text('Invoice')\n            WHEN (arapply_target_doctype='D') THEN text('D/M')\n            ELSE text('Other')\n       END AS documenttype,\n       formatDate(arapply_postdate) AS f_docdate,\n       '' AS f_duedate,\n       formatMoney(arapply_applied) AS f_amount,\n       '' AS f_balance\nFROM arapply, aropen\nWHERE ( (arapply_source_doctype IN ('K', 'C'))\n AND (arapply_source_doctype=aropen_doctype)\n AND (arapply_source_docnumber=aropen_docnumber)\n AND (arapply_cust_id=&lt;? value(&quot;cust_id&quot;) ?>)\n AND (aropen_cust_id=&lt;? value(&quot;cust_id&quot;) ?>) )\n\nORDER BY sortnumber, applyid;</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>365</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>cust_comments</column>\n   </data>\n  </text>\n  <field>\n   <rect>\n    <x>105</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>firstlastorderdate</query>\n    <column>firstdate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>500</x>\n    <y>345</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>Credit Status:</string>\n  </label>\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>Customer Information</string>\n  </label>\n  <field>\n   <rect>\n    <x>100</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>cust_corrcontact</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>385</x>\n    <y>160</y>\n    <width>350</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>cust_address1</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>cust_corrfax</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>240</x>\n    <y>305</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>Last Year Sales:</string>\n  </label>\n  <field>\n   <rect>\n    <x>385</x>\n    <y>175</y>\n    <width>350</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   <bottom/>\n   <data>\n    <query>head</query>\n    <column>cust_address2</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>10</x>\n    <y>204</y>\n    <width>350</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>corrcitystatezip</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>475</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>cust_contact</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  <field>\n   <rect>\n    <x>385</x>\n    <y>190</y>\n    <width>350</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>cust_address3</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>325</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>Last Sales Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>600</x>\n    <y>345</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>head</query>\n    <column>f_creditstatus</column>\n   </data>\n  </field>\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>340</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>lysales</query>\n    <column>lysales</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>600</x>\n    <y>325</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>LateBalance</query>\n    <column>f_balance</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>cust_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>cust_corremail</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>cust_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>cust_name</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>10</x>\n    <y>190</y>\n    <width>350</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>cust_corraddress3</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>240</x>\n    <y>325</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>YTD Sales:</string>\n  </label>\n  <field>\n   <rect>\n    <x>340</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>ytdsales</query>\n    <column>ytdsales</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>240</x>\n    <y>345</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>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>cust_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>Billing Address</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>Correspondence Address</string>\n  </label>\n  <field>\n   <rect>\n    <x>10</x>\n    <y>160</y>\n    <width>350</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>cust_corraddress1</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>340</x>\n    <y>345</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>backlog</query>\n    <column>backlog</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>500</x>\n    <y>325</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>Late Balance:</string>\n  </label>\n  <field>\n   <rect>\n    <x>10</x>\n    <y>175</y>\n    <width>350</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>cust_corraddress2</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>cust_corrphone</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>105</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>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>firstlastorderdate</query>\n    <column>lastdate</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>600</x>\n    <y>305</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>OpenBalance</query>\n    <column>f_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>cust_number</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>385</x>\n    <y>204</y>\n    <width>350</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>citystatezip</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>500</x>\n    <y>305</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>Open Balance:</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>305</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>First Sales Date:</string>\n  </label>\n </rpthead>\n <section>\n  <name>Comments</name>\n  <group>\n   <name>Head</name>\n   <column>cust_id</column>\n   <head>\n    <height>46</height>\n    <line>\n     <xstart>55</xstart>\n     <ystart>40</ystart>\n     <xend>745</xend>\n     <yend>40</yend>\n     <weight>0</weight>\n    </line>\n    <label>\n     <rect>\n      <x>5</x>\n      <y>5</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>Comments:</string>\n    </label>\n    <label>\n     <rect>\n      <x>260</x>\n      <y>25</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>Comment</string>\n    </label>\n    <label>\n     <rect>\n      <x>160</x>\n      <y>25</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>User</string>\n    </label>\n    <label>\n     <rect>\n      <x>60</x>\n      <y>25</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>Date</string>\n    </label>\n   </head>\n  </group>\n  <detail>\n   <key>\n    <query>Comments</query>\n   </key>\n   <height>16</height>\n   <text>\n    <rect>\n     <x>260</x>\n     <y>0</y>\n     <width>484</width>\n     <height>15</height>\n    </rect>\n    <bottompad>5</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>Comments</query>\n     <column>comment_text</column>\n    </data>\n   </text>\n   <field>\n    <rect>\n     <x>60</x>\n     <y>0</y>\n     <width>95</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>Comments</query>\n     <column>f_date</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>160</x>\n     <y>0</y>\n     <width>95</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>Comments</query>\n     <column>comment_user</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <section>\n  <name>History</name>\n  <group>\n   <name>Head</name>\n   <column>cust_id</column>\n   <head>\n    <height>46</height>\n    <label>\n     <rect>\n      <x>130</x>\n      <y>25</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>Doc. Type</string>\n    </label>\n    <label>\n     <rect>\n      <x>210</x>\n      <y>25</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>Doc. #</string>\n    </label>\n    <label>\n     <rect>\n      <x>380</x>\n      <y>25</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>Due Date</string>\n    </label>\n    <label>\n     <rect>\n      <x>60</x>\n      <y>25</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>Open</string>\n    </label>\n    <label>\n     <rect>\n      <x>470</x>\n      <y>25</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>Amount</string>\n    </label>\n    <label>\n     <rect>\n      <x>5</x>\n      <y>5</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>A/R History:</string>\n    </label>\n    <label>\n     <rect>\n      <x>290</x>\n      <y>25</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>Doc. Date</string>\n    </label>\n    <label>\n     <rect>\n      <x>560</x>\n      <y>25</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>Balance</string>\n    </label>\n    <line>\n     <xstart>55</xstart>\n     <ystart>40</ystart>\n     <xend>745</xend>\n     <yend>40</yend>\n     <weight>0</weight>\n    </line>\n   </head>\n  </group>\n  <detail>\n   <key>\n    <query>History</query>\n   </key>\n   <height>16</height>\n   <field>\n    <rect>\n     <x>60</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>History</query>\n     <column>f_open</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>290</x>\n     <y>0</y>\n     <width>85</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>History</query>\n     <column>f_docdate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>210</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>History</query>\n     <column>docnumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>380</x>\n     <y>0</y>\n     <width>85</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>History</query>\n     <column>f_duedate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>470</x>\n     <y>0</y>\n     <width>85</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>History</query>\n     <column>f_amount</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>130</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>History</query>\n     <column>documenttype</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>560</x>\n     <y>0</y>\n     <width>85</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>History</query>\n     <column>f_balance</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>18</height>\n  <field>\n   <rect>\n    <x>95</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <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
50	IndentedBOM	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Indented Bill of Materials</title>\n <name>IndentedBOM</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       uom_name AS item_invuom,\n       item_descrip1,\n       item_descrip2\n  FROM item, uom\n WHERE ((item_id=&lt;? value("item_id") ?>)\n AND (item_inv_uom_id=uom_id));\n    </sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT (REPEAT(' ',(bomdata_bomwork_level-1)*3) || bomdata_bomwork_seqnumber) AS f_seqnumber,\n       bomdata_item_number AS item_number,\n       bomdata_uom_name AS item_invuom,\n       bomdata_item_descrip1 AS item_descrip1,\n       bomdata_item_descrip2 AS item_descrip2,\n       bomdata_issuemethod AS issuemethod,\n       bomdata_createchild AS createchild,\n       formatQtyPer(bomdata_qtyreq) AS qtyreq,\n       formatScrap(bomdata_scrap) AS scrap,\n       CASE WHEN COALESCE(bomdata_effective, startOfTime()) &lt;= startOfTime()\n            THEN &lt;? value("always") ?>\n            ELSE formatDate(bomdata_effective)\n       END AS effective,\n       CASE WHEN COALESCE(bomdata_expires, endOfTime()) >= endOfTime()\n            THEN &lt;? value("never") ?>\n            ELSE formatDate(bomdata_expires)\n       END AS expires\nFROM indentedBOM(&lt;? value("item_id") ?>,&lt;? value("revision_id") ?>,&lt;? value("expiredDays") ?>,&lt;? value("futureDays") ?>)\nWHERE (bomdata_item_id>0);</sql>\n </querysource>\n <querysource>\n  <name>bomhead</name>\n  <sql>SELECT bomhead_docnum, bomhead_revision,\nformatDate(bomhead_revisiondate) AS f_revisiondate\nFROM bomhead\nWHERE ((bomhead_item_id=&lt;? value("item_id") ?>)\nAND (bomhead_rev_id=&lt;? value("revision_id") ?>));</sql>\n </querysource>\n <rpthead>\n  <height>242</height>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>103</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>585</x>\n    <y>203</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>113</x>\n    <y>203</y>\n    <width>165</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>505</x>\n    <y>203</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>275</x>\n    <y>203</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>UOM</string>\n  </label>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>103</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>485</x>\n    <y>125</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>Revsion Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>125</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>580</x>\n    <y>103</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>bomhead</query>\n    <column>bomhead_docnum</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>260</x>\n    <y>103</y>\n    <width>50</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>UOM:</string>\n  </label>\n  <label>\n   <rect>\n    <x>425</x>\n    <y>203</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>Ext. Qty. Req.</string>\n  </label>\n  <label>\n   <rect>\n    <x>113</x>\n    <y>220</y>\n    <width>228</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  <field>\n   <rect>\n    <x>580</x>\n    <y>125</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>bomhead</query>\n    <column>f_revisiondate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>665</x>\n    <y>203</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>10</x>\n    <y>203</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>Seq. #</string>\n  </label>\n  <label>\n   <rect>\n    <x>485</x>\n    <y>103</y>\n    <width>90</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Document #:</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>235</ystart>\n   <xend>745</xend>\n   <yend>235</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>585</x>\n    <y>220</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  <field>\n   <rect>\n    <x>100</x>\n    <y>145</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>item_descrip2</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>580</x>\n    <y>145</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>bomhead</query>\n    <column>bomhead_revision</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>315</x>\n    <y>103</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_invuom</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>485</x>\n    <y>145</y>\n    <width>90</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Revision:</string>\n  </label>\n  <label>\n   <rect>\n    <x>375</x>\n    <y>10</y>\n    <width>350</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>Indented Bill of Materials</string>\n  </label>\n  <label>\n   <rect>\n    <x>665</x>\n    <y>220</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 </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>36</height>\n  <label>\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>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Expires</string>\n  </label>\n  <label>\n   <rect>\n    <x>113</x>\n    <y>0</y>\n    <width>165</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Component Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>425</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>Ext. Qty. Per</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</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>Seq. #</string>\n  </label>\n  <label>\n   <rect>\n    <x>585</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>275</x>\n    <y>0</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>UOM</string>\n  </label>\n  <label>\n   <rect>\n    <x>505</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  <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>585</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>665</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>113</x>\n    <y>15</y>\n    <width>228</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Description</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>53</height>\n   <field>\n    <rect>\n     <x>505</x>\n     <y>0</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>scrap</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>665</x>\n     <y>15</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>issuemethod</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>585</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>effective</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>110</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   <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>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    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>expires</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>275</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>item_invuom</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>5</x>\n     <y>0</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    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_seqnumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>110</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>425</x>\n     <y>0</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>qtyreq</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>110</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>585</x>\n     <y>15</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>createchild</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>18</height>\n  <field>\n   <rect>\n    <x>95</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>615</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
208	IndentedWhereUsed	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Indented Where Used</title>\n <name>IndentedWhereUsed</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       uom_name AS item_invuom,\n       item_descrip1,\n       item_descrip2\n  FROM item, uom\n WHERE ((item_id=&lt;? value("item_id") ?>)\n AND (item_inv_uom_id=uom_id));\n    </sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT (REPEAT(' ',(bomwork_level-1)*3) || bomwork_seqnumber) AS f_seqnumber,\n       bomworkitemsequence(bomwork_id) AS seqord,\n       item_number, uom_name AS item_invuom,\n       item_descrip1, item_descrip2,\n       formatQty(bomwork_qtyfxd) AS qtyfxd,\n       formatQtyPer(bomwork_qtyper) AS qtyper,\n       formatScrap(bomwork_scrap) AS scrap,\n       formatDate(bomwork_effective, 'Always') AS effective,\n       formatDate(bomwork_expires, 'Never') AS expires\n  FROM bomwork, item, uom\n WHERE ((bomwork_item_id=item_id)\n   AND (item_inv_uom_id=uom_id)\n   AND (bomwork_set_id=&lt;? value("bomworkset_id") ?>)\n&lt;? if not exists("showExpired") ?>\n   AND (bomwork_expires > CURRENT_DATE)\n&lt;? endif ?>\n&lt;? if not exists("showFuture") ?>\n   AND (bomwork_effective &lt;= CURRENT_DATE)\n&lt;? endif ?>\n)\nORDER BY seqord;</sql>\n </querysource>\n <rpthead>\n  <height>242</height>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>145</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>10</x>\n    <y>203</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>Seq. #</string>\n  </label>\n  <field>\n   <rect>\n    <x>100</x>\n    <y>125</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>item_descrip1</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>425</x>\n    <y>203</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>113</x>\n    <y>220</y>\n    <width>228</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>375</x>\n    <y>10</y>\n    <width>350</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>Indented Where Used</string>\n  </label>\n  <label>\n   <rect>\n    <x>275</x>\n    <y>203</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>UOM</string>\n  </label>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>103</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>315</x>\n    <y>103</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_invuom</column>\n   </data>\n  </field>\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  <label>\n   <rect>\n    <x>505</x>\n    <y>203</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>260</x>\n    <y>103</y>\n    <width>50</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>UOM:</string>\n  </label>\n  <label>\n   <rect>\n    <x>113</x>\n    <y>203</y>\n    <width>165</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>665</x>\n    <y>203</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  <field>\n   <rect>\n    <x>100</x>\n    <y>103</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>585</x>\n    <y>203</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>350</x>\n    <y>203</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>505</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  <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>585</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>275</x>\n    <y>0</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>UOM</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</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>Seq. #</string>\n  </label>\n  <label>\n   <rect>\n    <x>425</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>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>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Expires</string>\n  </label>\n  <label>\n   <rect>\n    <x>113</x>\n    <y>15</y>\n    <width>228</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>113</x>\n    <y>0</y>\n    <width>165</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Component Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>350</x>\n    <y>-1</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>52</height>\n   <field>\n    <rect>\n     <x>275</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>item_invuom</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    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>expires</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>5</x>\n     <y>0</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    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_seqnumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>113</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>585</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>effective</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>505</x>\n     <y>0</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>scrap</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>113</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>425</x>\n     <y>0</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>qtyper</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>113</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   <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>345</x>\n     <y>1</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>qtyfxd</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>17</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  <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  <field>\n   <rect>\n    <x>95</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
364	InventoryAvailabilityByCustomerType	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Inventory Availability by Customer Type</title>\n <name>InventoryAvailabilityByCustomerType</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 \n       &lt;? if exists("onlyShowShortages") ?>\n         text('Only Showing Shortages')\n       &lt;? else ?>\n         text('')\n       &lt;? endif ?>\n       AS f_onlyShowShortages,\n      &lt;? if exists("showWoSupply") ?>\n         text('Show W/O Supply')\n       &lt;? else ?>\n         text('')\n       &lt;? endif ?>\n       AS f_showWoSupply,\n&lt;? if exists("custtype_id") ?>\n       (SELECT custtype_code from custtype where (custtype_id=&lt;? value("custtype_id") ?>))\n&lt;? elseif exists("custtype_pattern") ?>\n       &lt;? value("custtype_pattern") ?>\n&lt;? else ?>\n       text('All Customer Types')\n&lt;? endif ?>\n       AS f_custtype;</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT itemsite_id, coitem_id,\n       cohead_id, cohead_number, (cust_number||'-'||cust_name) AS custname,\n       item_number, item_description, uom_name, item_picklist,\n       qoh, formatQty(qoh) AS f_qoh,sobalance,\n       formatQty(sobalance) AS f_sobalance,\n       formatQty(allocated) AS f_allocated,\n       ordered, formatQty(ordered) AS f_ordered,\n       (qoh + ordered - sobalance) AS woavail,\n&lt;? if exists("useReservationNetting") ?>\n       formatQty(coitem_qtyreserved) AS f_soavail,\n&lt;? else ?>\n       formatQty(qoh + ordered - sobalance) AS f_soavail,\n&lt;? endif ?>\n       (qoh + ordered - allocated) AS totalavail,\n       formatQty(qoh + ordered - allocated) AS f_totalavail,\n       atshipping,formatQty(atshipping) AS f_atshipping,\n       reorderlevel \n&lt;? if exists(showWoSupply) ?>,         \n       wo_id,\n       wo_status,\n       wo_number,\n       wo_ordered,\n       CASE WHEN (wo_id = -1) THEN NULL ELSE formatQty(wo_ordered) END AS f_wo_ordered,\n       formatdate(wo_startdate) AS f_wo_startdate, \n       formatdate(wo_duedate) AS f_wo_duedate,\n       COALESCE(wo_latestart,false) AS wo_latestart,\n       COALESCE(wo_latedue,false) AS wo_latedue \n&lt;? endif ?>\n       FROM ( SELECT itemsite_id, coitem_id,\n                     cohead_id, cohead_number, cust_number, cust_name,\n                     item_number, (item_descrip1 || ' ' || item_descrip2) AS item_description,\n                     uom_name, item_picklist,\n                     noNeg(qtyAvailable(itemsite_id)) AS qoh,\n                     noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) AS sobalance,\n                     qtyAllocated(itemsite_id, coitem_scheddate) AS allocated,\n                     qtyOrdered(itemsite_id, coitem_scheddate) AS ordered,\n                     qtyatshipping(coitem_id) AS atshipping,\n                     coitem_qtyreserved,\n                     CASE WHEN(itemsite_useparams) THEN itemsite_reorderlevel ELSE 0.0 END AS reorderlevel \n&lt;? if exists(showWoSupply) ?>,  \n                     COALESCE(wo_id,-1) AS wo_id,\n                     formatwonumber(wo_id) AS wo_number,\n                     noNeg((wo_qtyord-wo_qtyrcv)) AS wo_ordered,\n                     wo_status, wo_startdate, wo_duedate,\n                     ((wo_startdate &lt;= CURRENT_DATE) AND (wo_status IN ('O','E','S','R'))) AS wo_latestart,\n                     (wo_duedate&lt;=CURRENT_DATE) AS wo_latedue  \n&lt;? endif ?> \n                FROM cohead, itemsite, item, uom, custinfo, coitem\n&lt;? if exists(showWoSupply) ?> \n                LEFT OUTER JOIN wo\n                  ON ((coitem_itemsite_id=wo_itemsite_id)\n                  AND (wo_status IN ('E','R','I'))\n                  AND (wo_qtyord-wo_qtyrcv > 0)\n                  AND (noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned-qtyatshipping(coitem_id)) > \n                        (SELECT qtyAvailable(itemsite_id) AS availableqoh FROM itemsite WHERE (itemsite_id=coitem_itemsite_id))))\n&lt;? endif ?>\n                WHERE((coitem_cohead_id=cohead_id)\n                  AND (cohead_cust_id=cust_id)\n                  AND (coitem_itemsite_id=itemsite_id)\n                  AND (itemsite_item_id=item_id)\n                  AND (item_inv_uom_id=uom_id)\n                  AND (coitem_status NOT IN ('C', 'X'))\n&lt;? if exists("custtype_id") ?>\n                  AND (cust_custtype_id=&lt;? value("custtype_id") ?>)\n&lt;? elseif exists("custtype_pattern") ?>\n                  AND (cust_custtype_id IN (SELECT custtype_id\n                                              FROM custtype\n                                             WHERE(custtype_code ~ &lt;? value("custtype_pattern") ?>)))\n&lt;? endif ?>\n              )\n            ) AS data \n&lt;? if exists(onlyShowShortages) ?>\n      WHERE ( ((qoh + ordered - allocated) &lt; 0)\n           OR ((qoh + ordered - sobalance) &lt; 0) ) \n&lt;? endif ?>\n      ORDER BY cohead_id, cohead_number, item_number\n&lt;? if exists(showWoSupply) ?> ,\n               wo_duedate\n&lt;? endif ?>\n;</sql>\n </querysource>\n <rpthead>\n  <height>251</height>\n  <label>\n   <rect>\n    <x>180</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>360</x>\n    <y>120</y>\n    <width>380</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_showWoSupply</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>10</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  <line>\n   <xstart>10</xstart>\n   <ystart>245</ystart>\n   <xend>750</xend>\n   <yend>245</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>330</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>QOH</string>\n  </label>\n  <label>\n   <rect>\n    <x>30</x>\n    <y>100</y>\n    <width>102</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Customer Type:</string>\n  </label>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>100</y>\n    <width>209</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>645</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   <hcenter/>\n   <vcenter/>\n   <string>Total Available</string>\n  </label>\n  <label>\n   <rect>\n    <x>645</x>\n    <y>230</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>Due Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>540</x>\n    <y>230</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>Start Date</string>\n  </label>\n  <field>\n   <rect>\n    <x>360</x>\n    <y>100</y>\n    <width>380</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_onlyShowShortages</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>540</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   <hcenter/>\n   <vcenter/>\n   <string>At Shipping</string>\n  </label>\n  <label>\n   <rect>\n    <x>185</x>\n    <y>230</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>Status</string>\n  </label>\n  <label>\n   <rect>\n    <x>432</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>This Allocated</string>\n  </label>\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>Orders</string>\n  </label>\n  <label>\n   <rect>\n    <x>430</x>\n    <y>230</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>Qty Due</string>\n  </label>\n  <label>\n   <rect>\n    <x>645</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>This Available</string>\n  </label>\n  <label>\n   <rect>\n    <x>20</x>\n    <y>230</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>W/O Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>225</x>\n    <y>10</y>\n    <width>500</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>Inventory Availability by Customer Type</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>200</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>Item</string>\n  </label>\n  <label>\n   <rect>\n    <x>432</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   <hcenter/>\n   <vcenter/>\n   <string>Total Allocated</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>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>This Available</string>\n  </label>\n  <label>\n   <rect>\n    <x>432</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>This Allocated</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>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>Orders</string>\n  </label>\n  <label>\n   <rect>\n    <x>432</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>Total Allocated</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>20</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>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>180</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>UOM</string>\n  </label>\n  <label>\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>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Total Available</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>At Shipping</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</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>Item</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <group>\n   <name>cohead</name>\n   <column>cohead_id</column>\n   <head>\n    <height>26</height>\n    <label>\n     <rect>\n      <x>5</x>\n      <y>0</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>S/O #:</string>\n    </label>\n    <field>\n     <rect>\n      <x>390</x>\n      <y>0</y>\n      <width>209</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>detail</query>\n      <column>custname</column>\n     </data>\n    </field>\n    <label>\n     <rect>\n      <x>300</x>\n      <y>0</y>\n      <width>80</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <string>Customer:</string>\n    </label>\n    <field>\n     <rect>\n      <x>65</x>\n      <y>0</y>\n      <width>209</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>detail</query>\n      <column>cohead_number</column>\n     </data>\n    </field>\n   </head>\n   <foot>\n    <height>6</height>\n    <line>\n     <xstart>5</xstart>\n     <ystart>0</ystart>\n     <xend>745</xend>\n     <yend>0</yend>\n     <weight>0</weight>\n    </line>\n   </foot>\n  </group>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>46</height>\n   <field>\n    <rect>\n     <x>640</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_totalavail</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>25</x>\n     <y>30</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>wo_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>535</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>10</x>\n     <y>15</y>\n     <width>400</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_description</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>640</x>\n     <y>30</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_wo_duedate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>10</x>\n     <y>0</y>\n     <width>150</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>Item_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>430</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_sobalance</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>185</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    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>uom_name</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>185</x>\n     <y>30</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    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>wo_status</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>640</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_soavail</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>430</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_allocated</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>430</x>\n     <y>30</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_wo_ordered</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>325</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_qoh</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>535</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_atshipping</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>535</x>\n     <y>30</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_wo_startdate</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>18</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</report>\n		0	2015-10-01 17:14:33.361434
244	InventoryAvailabilityBySalesOrder	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Inventory Availability by Sales Order</title>\n <name>InventoryAvailabilityBySalesOrder</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 cohead_number,\n       formatDate(cohead_orderdate) AS orderdate,\n       cohead_custponumber,\n       cust_name,\n       cntct_phone AS cust_phone,\n       &lt;? if exists("onlyShowShortages") ?>\n         text('Only Showing Shortages')\n       &lt;? else ?>\n         text('')\n       &lt;? endif ?>\n       AS f_onlyShowShortages,\n      &lt;? if exists("showWoSupply") ?>\n         text('Show W/O Supply')\n       &lt;? else ?>\n         text('')\n       &lt;? endif ?>\n       AS f_showWoSupply\n  FROM cohead, custinfo\n  LEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id)\n  LEFT OUTER JOIN addr ON (cntct_addr_id=addr_id)\n WHERE ((cohead_cust_id=cust_id)\n   AND (cohead_id=&lt;? value("sohead_id") ?>) );</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT itemsite_id, coitem_id,\n                        item_number, item_description, uom_name, item_picklist,\n                        qoh, formatQty(qoh) AS f_qoh,sobalance,\n                        formatQty(sobalance) AS f_sobalance,\n                        formatQty(allocated) AS f_allocated,\n                        ordered, formatQty(ordered) AS f_ordered,\n                        (qoh + ordered - sobalance) AS woavail,\n                        formatQty(qoh + ordered - sobalance) AS f_soavail,\n                        (qoh + ordered - allocated) AS totalavail,\n                        formatQty(qoh + ordered - allocated) AS f_totalavail,\n                        atshipping,formatQty(atshipping) AS f_atshipping,\n                        reorderlevel \n                 &lt;? if exists(showWoSupply) ?>,         \n                        wo_id,\n                        wo_status,\n                        wo_number,\n                        wo_ordered,\n                        CASE WHEN (wo_id = -1) THEN NULL ELSE formatQty(wo_ordered) END AS f_wo_ordered,\n                        formatdate(wo_startdate) AS f_wo_startdate, \n                        formatdate(wo_duedate) AS f_wo_duedate,\n                        COALESCE(wo_latestart,false) AS wo_latestart,\n                        COALESCE(wo_latedue,false) AS wo_latedue \n                 &lt;? endif ?>\n                 FROM ( SELECT itemsite_id, coitem_id,\n                               item_number, (item_descrip1 || ' ' || item_descrip2) AS item_description,\n                               uom_name, item_picklist,\n                               noNeg(qtyAvailable(itemsite_id)) AS qoh,\n                               noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned) AS sobalance,\n                               qtyAllocated(itemsite_id, coitem_scheddate) AS allocated,\n                               qtyOrdered(itemsite_id, coitem_scheddate) AS ordered,\n                               qtyatshipping(coitem_id) AS atshipping,\n                               CASE WHEN(itemsite_useparams) THEN itemsite_reorderlevel ELSE 0.0 END AS reorderlevel \n                 &lt;? if exists(showWoSupply) ?>,  \n                               COALESCE(wo_id,-1) AS wo_id,\n                               formatwonumber(wo_id) AS wo_number,\n                               noNeg((wo_qtyord-wo_qtyrcv)) AS wo_ordered,\n                               wo_status, wo_startdate, wo_duedate,\n                               ((wo_startdate &lt;= CURRENT_DATE) AND (wo_status IN ('O','E','S','R'))) AS wo_latestart,\n                               (wo_duedate&lt;=CURRENT_DATE) AS wo_latedue  \n                 &lt;? endif ?> \n                        FROM cohead, itemsite, item, uom, coitem \n                 &lt;? if exists(showWoSupply) ?> \n                             LEFT OUTER JOIN wo\n                              ON ((coitem_itemsite_id=wo_itemsite_id)\n                              AND (wo_status IN ('E','R','I'))\n                              AND (wo_qtyord-wo_qtyrcv > 0)\n                              AND (noNeg(coitem_qtyord - coitem_qtyshipped + coitem_qtyreturned-qtyatshipping(coitem_id)) > \n                               (SELECT qtyAvailable(itemsite_id) AS availableqoh FROM itemsite WHERE (itemsite_id=coitem_itemsite_id))))\n                 &lt;? endif ?>\n                        WHERE ( (coitem_cohead_id=cohead_id)\n                         AND (coitem_itemsite_id=itemsite_id)\n                         AND (itemsite_item_id=item_id)\n                         AND (item_inv_uom_id=uom_id)\n                         AND (coitem_status NOT IN ('C', 'X'))\n                         AND (cohead_id=&lt;? value(sohead_id) ?>))\n                 ) AS data \n\t              &lt;? if exists(onlyShowShortages) ?>\n                 WHERE ( ((qoh + ordered - allocated) &lt; 0)\n                  OR ((qoh + ordered - sobalance) &lt; 0) ) \n                 &lt;? endif ?>\n                 ORDER BY item_number\n                 &lt;? if exists(showWoSupply) ?> ,\n                 wo_duedate\n                 &lt;? endif ?>\n                 ;</sql>\n </querysource>\n <rpthead>\n  <height>251</height>\n  <label>\n   <rect>\n    <x>430</x>\n    <y>230</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>Qty Due</string>\n  </label>\n  <label>\n   <rect>\n    <x>432</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   <hcenter/>\n   <vcenter/>\n   <string>Total Allocated</string>\n  </label>\n  <label>\n   <rect>\n    <x>185</x>\n    <y>230</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>Status</string>\n  </label>\n  <label>\n   <rect>\n    <x>275</x>\n    <y>100</y>\n    <width>102</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Customer:</string>\n  </label>\n  <label>\n   <rect>\n    <x>540</x>\n    <y>230</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>Start Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>275</x>\n    <y>120</y>\n    <width>102</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>Cust. Phone:</string>\n  </label>\n  <label>\n   <rect>\n    <x>645</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>This Available</string>\n  </label>\n  <label>\n   <rect>\n    <x>30</x>\n    <y>100</y>\n    <width>102</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 Order #:</string>\n  </label>\n  <field>\n   <rect>\n    <x>385</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>cohead_custponumber</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>225</x>\n    <y>10</y>\n    <width>500</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>Inventory Availability by Sales Order</string>\n  </label>\n  <label>\n   <rect>\n    <x>275</x>\n    <y>140</y>\n    <width>102</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>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>Orders</string>\n  </label>\n  <label>\n   <rect>\n    <x>20</x>\n    <y>230</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>W/O Number</string>\n  </label>\n  <field>\n   <rect>\n    <x>360</x>\n    <y>175</y>\n    <width>380</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_showWoSupply</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>10</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>432</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>This Allocated</string>\n  </label>\n  <line>\n   <xstart>10</xstart>\n   <ystart>245</ystart>\n   <xend>750</xend>\n   <yend>245</yend>\n   <weight>2</weight>\n  </line>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>100</y>\n    <width>125</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>cohead_number</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>30</x>\n    <y>120</y>\n    <width>102</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  <field>\n   <rect>\n    <x>385</x>\n    <y>100</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>cust_name</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>645</x>\n    <y>230</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>Due Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>200</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>Item</string>\n  </label>\n  <field>\n   <rect>\n    <x>385</x>\n    <y>120</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>cust_phone</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>360</x>\n    <y>160</y>\n    <width>380</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_onlyShowShortages</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>120</y>\n    <width>125</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>orderdate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>180</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  <label>\n   <rect>\n    <x>330</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>QOH</string>\n  </label>\n  <label>\n   <rect>\n    <x>645</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   <hcenter/>\n   <vcenter/>\n   <string>Total Available</string>\n  </label>\n  <label>\n   <rect>\n    <x>540</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   <hcenter/>\n   <vcenter/>\n   <string>At Shipping</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>432</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>This Allocated</string>\n  </label>\n  <label>\n   <rect>\n    <x>180</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>UOM</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>20</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>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>At Shipping</string>\n  </label>\n  <label>\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>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Total Available</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</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>Item</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>This Available</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>432</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>Total Allocated</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>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>Orders</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <group>\n   <name>coitem</name>\n   <column>coitem_id</column>\n   <head>\n    <height>31</height>\n    <field>\n     <rect>\n      <x>430</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_allocated</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>325</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_qoh</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>185</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     <left/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>uom_name</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>640</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_soavail</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>535</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_atshipping</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>640</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_totalavail</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>535</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>10</x>\n      <y>0</y>\n      <width>150</width>\n      <height>15</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>Item_number</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>10</x>\n      <y>15</y>\n      <width>400</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_description</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>430</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_sobalance</column>\n     </data>\n    </field>\n   </head>\n   <foot>\n    <height>6</height>\n    <line>\n     <xstart>5</xstart>\n     <ystart>0</ystart>\n     <xend>745</xend>\n     <yend>0</yend>\n     <weight>0</weight>\n    </line>\n   </foot>\n  </group>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>16</height>\n   <field>\n    <rect>\n     <x>535</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_wo_startdate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>25</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>wo_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>430</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_wo_ordered</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>640</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_wo_duedate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>185</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    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>wo_status</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>17</height>\n  <field>\n   <rect>\n    <x>90</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>615</x>\n    <y>0</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
257	InvoiceInformation	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Invoice Information</title>\n <name>InvoiceInformation</name>\n <description></description>\n <watermark>\n  <data>\n   <query>Parameter Query</query>\n   <column>watermark</column>\n  </data>\n  <opacity>25</opacity>\n </watermark>\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>GroupHead</name>\n  <sql>SELECT invchead_id, invchead_ponumber,\n       formatDate(invchead_shipdate) AS f_shipdate,\n       formatDate(invchead_invcdate) AS f_invcdate,\n       formatMoney(invoiceTotal(invchead_id)) AS f_amount,\n       invchead_billto_name, invchead_billto_address1,\n       invchead_billto_address2, invchead_billto_address3,\n       ( invchead_billto_city || ' ' || invchead_billto_state || ', '\n         || invchead_billto_zipcode ) AS billtocitystatezip,\n       invchead_shipto_name, invchead_shipto_address1,\n       invchead_shipto_address2, invchead_shipto_address3,\n       ( invchead_shipto_city || ' ' || invchead_shipto_state || ', '\n         || invchead_shipto_zipcode ) AS shiptocitystatezip,\n       invchead_notes, invchead_invcnumber\nFROM invchead LEFT OUTER JOIN (invcitem LEFT OUTER JOIN item ON (invcitem_item_id=item_id) ) ON (invcitem_invchead_id=invchead_id)\nWHERE (invchead_id=&lt;? value("invchead_id") ?>)\nGROUP BY invchead_id, invchead_ponumber,\n         invchead_shipdate, invchead_invcdate,\n         invchead_misc_amount, invchead_freight,\n         invchead_billto_name, invchead_billto_address1,\n         invchead_billto_address2, invchead_billto_address3,\n         invchead_billto_city, invchead_billto_state, invchead_billto_zipcode,\n         invchead_shipto_name, invchead_shipto_address1,\n         invchead_shipto_address2, invchead_shipto_address3,\n         invchead_shipto_city, invchead_shipto_state, invchead_shipto_zipcode,\n         invchead_notes, invchead_invcnumber;</sql>\n </querysource>\n <querysource>\n  <name>CustInfo</name>\n  <sql>SELECT cust_id,\n       cust_number,\n       cust_name,\n       addr_line1 AS cust_address1,\n       addr_line2 AS cust_address2,\n       addr_line3 AS cust_address3,\n       addr_city || ' ' || addr_state || ', ' || addr_postalcode AS custcitystatezip\nFROM invchead, custinfo\nLEFT OUTER JOIN cntct ON (cust_cntct_id=cntct_id)\nLEFT OUTER JOIN addr ON (cntct_addr_id=addr_id)\nWHERE ( (invchead_id=&lt;? value("invchead_id") ?>)\n AND (invchead_cust_id=cust_id) );</sql>\n </querysource>\n <querysource>\n  <name>Details</name>\n  <sql>SELECT 1 as grpnum,\n       arapply_id,\n       CASE WHEN (arapply_source_doctype = 'C') THEN text('C/M')\n            WHEN (arapply_fundstype='C') THEN text('Check')\n            WHEN (arapply_fundstype='T') THEN text('Certified Check')\n            WHEN (arapply_fundstype='M') THEN text('Master Card')\n            WHEN (arapply_fundstype='V') THEN text('Visa')\n            WHEN (arapply_fundstype='A') THEN text('American Express')\n            WHEN (arapply_fundstype='D') THEN text('Discover Card')\n            WHEN (arapply_fundstype='R') THEN text('Other Credit Card')\n            WHEN (arapply_fundstype='K') THEN text('Cash')\n            WHEN (arapply_fundstype='W') THEN text('Wire Transfer')\n            WHEN (arapply_fundstype='O') THEN text('Other')\n       END AS documenttype,\n       CASE WHEN (arapply_source_doctype = 'C') THEN arapply_source_docnumber\n            WHEN (arapply_source_doctype = 'R') THEN arapply_source_docnumber\n            WHEN (arapply_source_doctype = 'K') THEN arapply_refnumber\n            ELSE text('Error')\n       END AS docnumber,\n       formatDate(arapply_postdate) AS f_postdate,\n       formatMoney(arapply_applied) AS f_amount\n  FROM arapply, invchead\n WHERE ( (arapply_target_doctype='I')\n   AND (arapply_target_docnumber=invchead_invcnumber)\n   AND (invchead_id=&lt;? value("invchead_id") ?>) )\nORDER BY arapply_postdate;</sql>\n </querysource>\n <pghead>\n  <firstpage/>\n  <height>389</height>\n  <field>\n   <rect>\n    <x>590</x>\n    <y>80</y>\n    <width>125</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>GroupHead</query>\n    <column>f_invcdate</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>155</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>CustInfo</query>\n    <column>cust_address2</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>50</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Cust. P/O Number:</string>\n  </label>\n  <field>\n   <rect>\n    <x>155</x>\n    <y>80</y>\n    <width>125</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>CustInfo</query>\n    <column>cust_number</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>25</x>\n    <y>280</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>GroupHead</query>\n    <column>invchead_billto_address2</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>155</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>CustInfo</query>\n    <column>cust_address1</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>590</x>\n    <y>125</y>\n    <width>125</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>GroupHead</query>\n    <column>f_amount</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>25</x>\n    <y>240</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>GroupHead</query>\n    <column>invchead_billto_name</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>155</x>\n    <y>25</y>\n    <width>125</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>GroupHead</query>\n    <column>invchead_invcnumber</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>155</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>CustInfo</query>\n    <column>cust_address3</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>155</x>\n    <y>100</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>CustInfo</query>\n    <column>cust_name</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>360</x>\n    <y>225</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Ship To:</string>\n  </label>\n  <label>\n   <rect>\n    <x>457</x>\n    <y>125</y>\n    <width>125</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Invoice Amount:</string>\n  </label>\n  <field>\n   <rect>\n    <x>155</x>\n    <y>180</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>CustInfo</query>\n    <column>custcitystatezip</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>350</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Notes:</string>\n  </label>\n  <field>\n   <rect>\n    <x>25</x>\n    <y>320</y>\n    <width>325</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>GroupHead</query>\n    <column>billtocitystatezip</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>225</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Bill To:</string>\n  </label>\n  <label>\n   <rect>\n    <x>457</x>\n    <y>100</y>\n    <width>125</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Ship Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>385</x>\n    <y>320</y>\n    <width>325</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>GroupHead</query>\n    <column>shiptocitystatezip</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>80</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Customer #:</string>\n  </label>\n  <field>\n   <rect>\n    <x>385</x>\n    <y>300</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>GroupHead</query>\n    <column>invchead_shipto_address3</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>25</y>\n    <width>150</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Invoice #:</string>\n  </label>\n  <field>\n   <rect>\n    <x>385</x>\n    <y>280</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>GroupHead</query>\n    <column>invchead_shipto_address2</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>155</x>\n    <y>50</y>\n    <width>125</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>GroupHead</query>\n    <column>invchead_ponumber</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>457</x>\n    <y>80</y>\n    <width>125</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Invoice Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>385</x>\n    <y>240</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>GroupHead</query>\n    <column>invchead_shipto_name</column>\n   </data>\n  </field>\n  <text>\n   <rect>\n    <x>20</x>\n    <y>365</y>\n    <width>690</width>\n    <height>20</height>\n   </rect>\n   <bottompad>0</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>GroupHead</query>\n    <column>invchead_notes</column>\n   </data>\n  </text>\n  <field>\n   <rect>\n    <x>25</x>\n    <y>300</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>GroupHead</query>\n    <column>invchead_billto_address3</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>385</x>\n    <y>260</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>GroupHead</query>\n    <column>invchead_shipto_address1</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>340</x>\n    <y>10</y>\n    <width>400</width>\n    <height>40</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>20</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Invoice Information</string>\n  </label>\n  <field>\n   <rect>\n    <x>25</x>\n    <y>260</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>GroupHead</query>\n    <column>invchead_billto_address1</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>590</x>\n    <y>100</y>\n    <width>125</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>GroupHead</query>\n    <column>f_shipdate</column>\n   </data>\n  </field>\n </pghead>\n <section>\n  <name>details</name>\n  <group>\n   <name>header</name>\n   <column>grpnum</column>\n   <head>\n    <height>47</height>\n    <label>\n     <rect>\n      <x>540</x>\n      <y>25</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>Apply Date</string>\n    </label>\n    <label>\n     <rect>\n      <x>5</x>\n      <y>25</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>Type</string>\n    </label>\n    <label>\n     <rect>\n      <x>110</x>\n      <y>25</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>Doc./Ref. Number</string>\n    </label>\n    <line>\n     <xstart>5</xstart>\n     <ystart>40</ystart>\n     <xend>745</xend>\n     <yend>40</yend>\n     <weight>2</weight>\n    </line>\n    <label>\n     <rect>\n      <x>5</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>Applications:</string>\n    </label>\n    <label>\n     <rect>\n      <x>645</x>\n      <y>25</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>Amount</string>\n    </label>\n   </head>\n  </group>\n  <detail>\n   <key>\n    <query>Details</query>\n   </key>\n   <height>17</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>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>Details</query>\n     <column>f_amount</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>110</x>\n     <y>0</y>\n     <width>425</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>Details</query>\n     <column>docnumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>5</x>\n     <y>0</y>\n     <width>100</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>Details</query>\n     <column>documenttype</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>normal</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>Details</query>\n     <column>f_postdate</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>17</height>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>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  <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
281	InvoiceRegister	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Invoice Register</title>\n <name>InvoiceRegister</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("startDate") ?>, 'Earliest') AS startdate,\n       formatDate(&lt;? value("endDate") ?>, 'Latest') AS enddate,\n       &lt;? if exists("accnt_id") ?>\n         ( SELECT (accnt_number || '-' || accnt_descrip)\n             FROM accnt\n            WHERE (accnt_id=&lt;? value("accnt_id") ?>) )\n       &lt;? else ?>\n         text('All Accounts')\n       &lt;? endif ?>\n       AS accnt</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT gltrans_id, gltrans_date AS transdate,\n       formatDate(gltrans_date) AS f_transdate,\n       gltrans_source AS source,\n       CASE WHEN(gltrans_doctype='IN') THEN text('Invoice')\n            WHEN(gltrans_doctype='CM') THEN text('Credit Memo')\n            WHEN(gltrans_doctype='DM') THEN text('Debit Memo')\n            WHEN(gltrans_doctype='CD') THEN text('Customer Deposit')\n            ELSE gltrans_doctype\n       END AS doctype,\n       gltrans_docnumber AS docnumber,\n       CASE WHEN(gltrans_doctype='IN') THEN\n                (SELECT invchead_shipto_name\n                   FROM aropen LEFT OUTER JOIN\n                        invchead\n                          ON (invchead_id=aropen_cobmisc_id\n                          AND invchead_cust_id=aropen_cust_id)\n                  WHERE ((aropen_docnumber=gltrans_docnumber)\n                    AND  (aropen_doctype='I')))\n            ELSE firstLine(gltrans_notes)\n       END 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 &lt; 0) THEN ABS(gltrans_amount)\n            ELSE 0\n       END AS debit,\n       CASE WHEN (gltrans_amount > 0) THEN formatMoney(gltrans_amount)\n            ELSE ''\n       END AS f_credit,\n       CASE WHEN (gltrans_amount > 0) THEN gltrans_amount\n            ELSE 0\n       END AS credit\n  FROM gltrans, accnt\n WHERE ((gltrans_accnt_id=accnt_id)\n   AND (gltrans_doctype IN ('IN', 'CM', 'DM', 'CD'))\n   AND (gltrans_source = 'A/R')\n   AND (gltrans_date BETWEEN &lt;? value("startDate") ?> AND &lt;? value("endDate") ?>)\n&lt;? if exists("accnt_id") ?>\n   AND (gltrans_accnt_id=&lt;? value("accnt_id") ?>)\n&lt;? endif ?>\n       )\nUNION\nSELECT sltrans_id AS id, sltrans_date AS transdate,\n       formatDate(sltrans_date) AS f_transdate,\n       sltrans_source AS source,\n       CASE WHEN(sltrans_doctype='IN') THEN text('Invoice')\n            WHEN(sltrans_doctype='CM') THEN text('Credit Memo')\n            WHEN(sltrans_doctype='DM') THEN text('Debit Memo')\n            WHEN(sltrans_doctype='CD') THEN text('Customer Deposit')\n            ELSE sltrans_doctype\n       END AS doctype,\n       sltrans_docnumber AS docnumber,\n       CASE WHEN(sltrans_doctype='IN') THEN\n                (SELECT invchead_shipto_name\n                   FROM aropen LEFT OUTER JOIN\n                        invchead\n                          ON (invchead_id=aropen_cobmisc_id\n                          AND invchead_cust_id=aropen_cust_id)\n                  WHERE ((aropen_docnumber=sltrans_docnumber)\n                    AND  (aropen_doctype='I')))\n            ELSE firstLine(sltrans_notes)\n       END AS transnotes,\n       (formatGLAccount(accnt_id) || ' - ' || accnt_descrip) AS account,\n       CASE WHEN (sltrans_amount &lt; 0) THEN formatMoney(ABS(sltrans_amount))\n            ELSE ''\n       END AS f_debit,\n       CASE WHEN (sltrans_amount &lt; 0) THEN ABS(sltrans_amount)\n            ELSE 0\n       END AS debit,\n       CASE WHEN (sltrans_amount > 0) THEN formatMoney(sltrans_amount)\n            ELSE ''\n       END AS f_credit,\n       CASE WHEN (sltrans_amount > 0) THEN sltrans_amount\n            ELSE 0\n       END AS credit\n  FROM sltrans, accnt\n WHERE ((sltrans_accnt_id=accnt_id)\n   AND (sltrans_doctype IN ('IN', 'CM', 'DM', 'CD'))\n   AND (sltrans_source = 'A/R')\n   AND (sltrans_date BETWEEN &lt;? value("startDate") ?> AND &lt;? value("endDate") ?>)\n&lt;? if exists("accnt_id") ?>\n   AND (sltrans_accnt_id=&lt;? value("accnt_id") ?>)\n&lt;? endif ?>\n       )\nORDER BY transdate, docnumber;</sql>\n </querysource>\n <rpthead>\n  <height>205</height>\n  <label>\n   <rect>\n    <x>408</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  <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>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  <label>\n   <rect>\n    <x>95</x>\n    <y>170</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>Source</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>Invoice Register</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  <label>\n   <rect>\n    <x>245</x>\n    <y>185</y>\n    <width>104</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>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>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  <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  <label>\n   <rect>\n    <x>245</x>\n    <y>170</y>\n    <width>104</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Reference</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  <label>\n   <rect>\n    <x>408</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>595</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>Credit</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>200</ystart>\n   <xend>745</xend>\n   <yend>200</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>508</x>\n    <y>185</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 </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>41</height>\n  <label>\n   <rect>\n    <x>245</x>\n    <y>5</y>\n    <width>104</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Reference</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  <label>\n   <rect>\n    <x>95</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>Source</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>508</x>\n    <y>20</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>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>Credit</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>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>245</x>\n    <y>20</y>\n    <width>104</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Account</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <group>\n   <name>bydate</name>\n   <column>f_transdate</column>\n   <head>\n    <height>21</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     <hcenter/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>f_transdate</column>\n     </data>\n    </field>\n   </head>\n   <foot>\n    <height>21</height>\n    <label>\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>normal</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <string>Subtotal:</string>\n    </label>\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     <right/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>debit</column>\n     </data>\n     <tracktotal subtotal="true" builtin="true" >money</tracktotal>\n    </field>\n    <field>\n     <rect>\n      <x>600</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>credit</column>\n     </data>\n     <tracktotal subtotal="true" builtin="true" >money</tracktotal>\n    </field>\n    <line>\n     <xstart>5</xstart>\n     <ystart>15</ystart>\n     <xend>745</xend>\n     <yend>15</yend>\n     <weight>1</weight>\n    </line>\n   </foot>\n  </group>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>31</height>\n   <field>\n    <rect>\n     <x>95</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    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>source</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>docnumber</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>doctype</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>509</x>\n     <y>15</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_debit</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>600</x>\n     <y>15</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_credit</column>\n    </data>\n   </field>\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  </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  <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 </pgfoot>\n <rptfoot>\n  <height>21</height>\n  <field>\n   <rect>\n    <x>600</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>credit</column>\n   </data>\n   <tracktotal builtin="true" >money</tracktotal>\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   <right/>\n   <vcenter/>\n   <data>\n    <query>detail</query>\n    <column>debit</column>\n   </data>\n   <tracktotal builtin="true" >money</tracktotal>\n  </field>\n  <label>\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>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Total:</string>\n  </label>\n </rptfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
443	Journals	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Journals</title>\n <name>Journals</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 <landscape/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT formatDate(&lt;? value("startDate") ?>, 'Earliest') AS startdate,\n       formatDate(&lt;? value("endDate") ?>, 'Latest') AS enddate,\n       &lt;? if exists("source") ?>\n         text(&lt;? value("source") ?>)\n       &lt;? else ?>\n         text('All Sources')\n       &lt;? endif  ?>\n       AS source,\n       &lt;? if exists("accnt_id") ?>\n         ( SELECT (accnt_number || '-' || accnt_descrip)\n             FROM accnt\n            WHERE (accnt_id=&lt;? value("accnt_id") ?>) )\n       &lt;? else ?>\n         text('All Accounts')\n       &lt;? endif ?>\n       AS accnt,\n       &lt;? if exists("showUsernames") ?>\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 sltrans_id,\n       sltrans_created, formatDate(sltrans_date) AS transdate,\n       sltrans_source, sltrans_doctype, sltrans_docnumber, invhist_docnumber,\n       firstLine(sltrans_notes) AS transnotes,\n       (formatGLAccount(accnt_id) || ' - ' || accnt_descrip) AS account,\n-- Debits:\n       CASE WHEN (sltrans_amount &lt; 0) THEN formatMoney(ABS(sltrans_amount))\n            ELSE ''\n       END AS f_debit,       \n       CASE WHEN (sltrans_amount &lt; 0) THEN ABS(sltrans_amount)\n            ELSE 0\n       END AS debit_amt, \n--Credits:\n       CASE WHEN (sltrans_amount > 0) THEN formatMoney(sltrans_amount)\n            ELSE ''\n       END AS f_credit,\n       CASE WHEN (sltrans_amount > 0) THEN sltrans_amount\n            ELSE 0\n       END AS credit_amt,\n--Balance:\n       sltrans_amount * -1 as balance_amt,\n--\n       sltrans_amount,\n       CASE WHEN accnt_type IN ('A','E') THEN \n         sltrans_amount * -1\n       ELSE sltrans_amount END AS running,\n       formatBoolYN(sltrans_posted) AS f_posted,\n       sltrans_username AS f_username,\n       sltrans_sequence\nFROM sltrans\n  JOIN accnt ON (sltrans_accnt_id=accnt_id) \n     LEFT OUTER JOIN invhist ON (sltrans_misc_id=invhist_id\n                            AND sltrans_docnumber='Misc.') \n&lt;? if exists("company_id") ?>\n     JOIN company ON (accnt_company=company_number) \n&lt;? endif ?>\n&lt;? if exists("prfcntr_id") ?>\n     JOIN prftcntr ON (accnt_profit=prftcntr_number) \n&lt;? endif ?>\n&lt;? if exists("subaccnt_id") ?>\n     JOIN subaccnt ON (accnt_sub=subaccnt_number) \n&lt;? endif ?>\n&lt;? if exists("subType") ?>\n     JOIN subaccnttype ON (subaccnttype_code=accnt_subaccnttype_code) \n&lt;? endif ?>\nWHERE (\n&lt;? if exists("startDate") ?>\n  &lt;? if exists("endDate") ?>\n       (sltrans_date BETWEEN &lt;? value("startDate") ?>\n                         AND &lt;? value("endDate") ?>)\n  &lt;? else ?>\n       (sltrans_date BETWEEN &lt;? value("startDate") ?>\n                         AND endoftime())\n  &lt;? endif ?>\n&lt;? else ?>\n  &lt;? if exists("endDate") ?>\n       (sltrans_date BETWEEN startoftime()\n                         AND &lt;? value("endDate") ?>)\n  &lt;? else ?>\n       (sltrans_date BETWEEN startoftime()\n                         AND endoftime())\n  &lt;? endif ?>\n&lt;? endif ?>\n&lt;? if exists("company_id") ?>\n   AND (company_id=&lt;? value("company_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("prfcntr_id") ?>\n   AND (prftcntr_id=&lt;? value("prfcntr_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("accnt_number") ?>\n   AND (accnt_number=&lt;? value("accnt_number") ?>)\n&lt;? endif ?>\n&lt;? if exists("subaccnt_id") ?>\n   AND (subaccnt_id=&lt;? value("subaccnt_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("subType") ?>\n   AND (subaccnttype_id=&lt;? value("subType") ?>)\n&lt;? endif ?>\n&lt;? if exists("accntType") ?>\n   AND (accnt_type= &lt;? value("accntType") ?>)\n&lt;? endif ?>\n&lt;? if exists("accnt_id") ?>\n   AND (sltrans_accnt_id=&lt;? value("accnt_id") ?>)\n&lt;? endif ?>\n&lt;? if exists("docnum") ?>\n   AND (sltrans_docnumber = case when &lt;? value("docnum") ?> = '' then \n sltrans_docnumber else \n&lt;? value("docnum") ?> end ) \n&lt;? endif ?>\n&lt;? if exists("source") ?>\n   AND (sltrans_source=&lt;? value("source") ?>)\n&lt;? endif ?>\n&lt;? if exists("source_pattern") ?>\n   AND (sltrans_source ~* &lt;? value("source_pattern") ?>)\n&lt;? endif ?>\n&lt;? if exists("journalnumber") ?>\n   AND (sltrans_gltrans_journalnumber=&lt;? value("journalnumber") ?>)\n&lt;? endif ?>\n&lt;? if exists("posted") ?>\n   AND (sltrans_posted=&lt;? value("posted") ?>)\n&lt;? endif ?>\n       )\nORDER BY sltrans_created,\n        sltrans_sequence, sltrans_amount;</sql>\n </querysource>\n <rpthead>\n  <height>205</height>\n  <label>\n   <rect>\n    <x>240</x>\n    <y>170</y>\n    <width>105</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>240</x>\n    <y>185</y>\n    <width>105</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>125</x>\n    <y>185</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Doc. Type</string>\n  </label>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>185</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>Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>180</x>\n    <y>185</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Doc. #</string>\n  </label>\n  <label>\n   <rect>\n    <x>65</x>\n    <y>185</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   <left/>\n   <vcenter/>\n   <string>Source</string>\n  </label>\n  <line>\n   <xstart>0</xstart>\n   <ystart>200</ystart>\n   <xend>1000</xend>\n   <yend>200</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>535</x>\n    <y>5</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>Journals</string>\n  </label>\n  <label>\n   <rect>\n    <x>787.345</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>Credit</string>\n  </label>\n  <label>\n   <rect>\n    <x>676.25</x>\n    <y>185.891</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>960</x>\n    <y>185</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>Posted</string>\n  </label>\n  <label>\n   <rect>\n    <x>875</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>Username</string>\n  </label>\n  <text>\n   <rect>\n    <x>10</x>\n    <y>40</y>\n    <width>725</width>\n    <height>15</height>\n   </rect>\n   <bottompad>12</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>Parameter Query</query>\n    <column>filter</column>\n   </data>\n  </text>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>5</height>\n </pghead>\n <pghead>\n  <height>45</height>\n  <label>\n   <rect>\n    <x>240</x>\n    <y>10</y>\n    <width>105</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>125</x>\n    <y>25</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Doc. Type</string>\n  </label>\n  <label>\n   <rect>\n    <x>65</x>\n    <y>25</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   <left/>\n   <vcenter/>\n   <string>Source</string>\n  </label>\n  <line>\n   <xstart>0</xstart>\n   <ystart>40</ystart>\n   <xend>1000</xend>\n   <yend>40</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>785.815</x>\n    <y>25.8923</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>0</x>\n    <y>25</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>Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>180</x>\n    <y>25</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Doc. #</string>\n  </label>\n  <label>\n   <rect>\n    <x>674.738</x>\n    <y>25.8923</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>240</x>\n    <y>25</y>\n    <width>105</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>960.892</x>\n    <y>25</y>\n    <width>40</width>\n    <height>16.7846</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Posted</string>\n  </label>\n  <label>\n   <rect>\n    <x>869.692</x>\n    <y>25.923</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>Username</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>31</height>\n   <field>\n    <rect>\n     <x>882.19</x>\n     <y>-0.890523</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>f_username</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>790.907</x>\n     <y>-0.890523</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>240</x>\n     <y>15</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>transnotes</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>954.846</x>\n     <y>-0.891</y>\n     <width>42.1539</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_posted</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>12500</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>gltrans_doctype</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>125</x>\n     <y>0</y>\n     <width>50</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>sltrans_doctype</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>0</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    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>transdate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>180</x>\n     <y>15</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>invhist_docnumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>180</x>\n     <y>0</y>\n     <width>50</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>sltrans_docnumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>681.65</x>\n     <y>-0.890523</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>240</x>\n     <y>0</y>\n     <width>270</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>65</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    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>sltrans_source</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <lastpage/>\n  <height>75</height>\n  <field>\n   <rect>\n    <x>765.907</x>\n    <y>8.08006</y>\n    <width>105</width>\n    <height>14</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>credit_amt</column>\n   </data>\n   <format builtin="true">money</format>\n   <tracktotal/>\n  </field>\n  <line>\n   <xstart>632.141</xstart>\n   <ystart>5.07044</ystart>\n   <xend>1000</xend>\n   <yend>5</yend>\n   <weight>2</weight>\n  </line>\n  <field>\n   <rect>\n    <x>960</x>\n    <y>60</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>60</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>598.701</x>\n    <y>8.21895</y>\n    <width>55</width>\n    <height>14</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:</string>\n  </label>\n  <field>\n   <rect>\n    <x>656.65</x>\n    <y>8.08006</y>\n    <width>105</width>\n    <height>14</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>debit_amt</column>\n   </data>\n   <format builtin="true">money</format>\n   <tracktotal/>\n  </field>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>60</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>868</x>\n    <y>60</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 <pgfoot>\n  <height>15</height>\n  <field>\n   <rect>\n    <x>90</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>868</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>960</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   <left/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
95	MaterialUsageVarianceByItem	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Material Usage Variance By Item</title>\n <name>MaterialUsageVarianceByItem</name>\n <description></description>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT item_number,\n       item_descrip1,\n       item_descrip2,\n       uom_name,\n       &lt;? if exists("warehous_id") ?>\n         ( SELECT warehous_code\n             FROM whsinfo\n            WHERE (warehous_id=&lt;? value("warehous_id") ?>) )\n       &lt;? else ?>\n         text('All Sites')\n       &lt;? endif ?>\n       AS warehouse,\n       formatDate(&lt;? value("startDate") ?>, 'Earliest') AS startdate,\n       formatDate(&lt;? value("endDate") ?>, 'Latest') AS enddate\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>workOrderVariance</mqlgroup>\n  <mqlname>material</mqlname>\n </querysource>\n <rpthead>\n  <height>234</height>\n  <label>\n   <rect>\n    <x>665</x>\n    <y>215</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>%</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>228</ystart>\n   <xend>745</xend>\n   <yend>228</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>85</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>Component Item</string>\n  </label>\n  <field>\n   <rect>\n    <x>605</x>\n    <y>90</y>\n    <width>120</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>startdate</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>605</x>\n    <y>110</y>\n    <width>120</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>enddate</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>30</x>\n    <y>155</y>\n    <width>104</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Site:</string>\n  </label>\n  <label>\n   <rect>\n    <x>305</x>\n    <y>90</y>\n    <width>50</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>UOM:</string>\n  </label>\n  <field>\n   <rect>\n    <x>360</x>\n    <y>90</y>\n    <width>120</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>uom_name</column>\n   </data>\n  </field>\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>Qty. per Var.</string>\n  </label>\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   <hcenter/>\n   <vcenter/>\n   <string>Produced</string>\n  </label>\n  <label>\n   <rect>\n    <x>85</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  <field>\n   <rect>\n    <x>140</x>\n    <y>130</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>item_descrip2</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>110</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>item_descrip1</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>30</x>\n    <y>90</y>\n    <width>104</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Item Number:</string>\n  </label>\n  <label>\n   <rect>\n    <x>500</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>End Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>155</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>580</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Act. Issue</string>\n  </label>\n  <label>\n   <rect>\n    <x>580</x>\n    <y>215</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Act. Qty. per</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>200</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Post Date</string>\n  </label>\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>Material Usage Variance By Item</string>\n  </label>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>90</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>500</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>Start Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>315</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Ordered</string>\n  </label>\n  <label>\n   <rect>\n    <x>494</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>Proj. Req.</string>\n  </label>\n  <label>\n   <rect>\n    <x>494</x>\n    <y>215</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Proj. Qty. per</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>580</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Act. Issue</string>\n  </label>\n  <label>\n   <rect>\n    <x>580</x>\n    <y>15</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Act. Qty. per</string>\n  </label>\n  <label>\n   <rect>\n    <x>665</x>\n    <y>15</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>%</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>0</y>\n    <width>75</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Post Date</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>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>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Produced</string>\n  </label>\n  <label>\n   <rect>\n    <x>85</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>Component Item</string>\n  </label>\n  <label>\n   <rect>\n    <x>85</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>665</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Qty. per Var.</string>\n  </label>\n  <label>\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>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Ordered</string>\n  </label>\n  <label>\n   <rect>\n    <x>494</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   <hcenter/>\n   <vcenter/>\n   <string>Proj. Req.</string>\n  </label>\n  <label>\n   <rect>\n    <x>494</x>\n    <y>15</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Proj. Qty. per</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>85</x>\n     <y>15</y>\n     <width>395</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>componentdescrip</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>580</x>\n     <y>15</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_actqtyper</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>494</x>\n     <y>15</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_projqtyper</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>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    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_received</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>665</x>\n     <y>15</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_qtypervarpercent</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>85</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>componentitemnumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>494</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_projreq</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>5</x>\n     <y>0</y>\n     <width>75</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_posted</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>665</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_qtypervar</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>580</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_actiss</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    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_ordered</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  <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 </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
480	ProjectsList	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Projects Detailed List</title>\n <name>ProjectsList</name>\n <description>List of Projects and details</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>projects</mqlgroup>\n  <mqlname>detail</mqlname>\n </querysource>\n <rpthead>\n  <height>55</height>\n  <label>\n   <rect>\n    <x>395</x>\n    <y>5</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>Project List</string>\n  </label>\n </rpthead>\n <section>\n  <name>section</name>\n  <group>\n   <name>project</name>\n   <column>project</column>\n   <head>\n    <height>55</height>\n    <label>\n     <rect>\n      <x>0</x>\n      <y>5</y>\n      <width>105</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <string>Project Number:</string>\n    </label>\n    <field>\n     <rect>\n      <x>115</x>\n      <y>25</y>\n      <width>415</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>detail</query>\n      <column>item</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>115</x>\n      <y>5</y>\n      <width>300</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>name</column>\n     </data>\n    </field>\n    <label>\n     <rect>\n      <x>25</x>\n      <y>25</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>455</x>\n      <y>5</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>Project Type:</string>\n    </label>\n    <field>\n     <rect>\n      <x>540</x>\n      <y>5</y>\n      <width>205</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>bold</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>project_type</column>\n     </data>\n    </field>\n    <field>\n     <rect>\n      <x>635</x>\n      <y>25</y>\n      <width>110</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>bold</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>status</column>\n     </data>\n    </field>\n    <label>\n     <rect>\n      <x>535</x>\n      <y>25</y>\n      <width>95</width>\n      <height>20</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <string>Project Status:</string>\n    </label>\n    <line>\n     <xstart>0</xstart>\n     <ystart>5</ystart>\n     <xend>750</xend>\n     <yend>5</yend>\n     <weight>2</weight>\n    </line>\n    <line>\n     <xstart>0</xstart>\n     <ystart>50</ystart>\n     <xend>750</xend>\n     <yend>50</yend>\n     <weight>2</weight>\n    </line>\n   </head>\n  </group>\n  <group>\n   <name>type</name>\n   <column>section</column>\n   <head>\n    <height>53</height>\n    <label>\n     <rect>\n      <x>395</x>\n      <y>30</y>\n      <width>135</width>\n      <height>15</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <string>Quantity Ordered / Billed</string>\n    </label>\n    <line>\n     <xstart>0</xstart>\n     <ystart>45</ystart>\n     <xend>750</xend>\n     <yend>45</yend>\n     <weight>2</weight>\n    </line>\n    <label>\n     <rect>\n      <x>660</x>\n      <y>30</y>\n      <width>50</width>\n      <height>15</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>normal</weight>\n     </font>\n     <right/>\n     <vcenter/>\n     <string>Value</string>\n    </label>\n    <label>\n     <rect>\n      <x>209</x>\n      <y>30</y>\n      <width>85</width>\n      <height>15</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>normal</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Status</string>\n    </label>\n    <line>\n     <xstart>77</xstart>\n     <ystart>45</ystart>\n     <xend>77</xend>\n     <yend>45</yend>\n     <weight>0</weight>\n    </line>\n    <label>\n     <rect>\n      <x>30</x>\n      <y>30</y>\n      <width>174</width>\n      <height>15</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>normal</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Order Number - Line</string>\n    </label>\n    <label>\n     <rect>\n      <x>0</x>\n      <y>5</y>\n      <width>90</width>\n      <height>16</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Order Type:</string>\n    </label>\n    <field>\n     <rect>\n      <x>90</x>\n      <y>5</y>\n      <width>610</width>\n      <height>15</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>10</size>\n      <weight>bold</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <data>\n      <query>detail</query>\n      <column>section_qtdisplayrole</column>\n     </data>\n    </field>\n    <label>\n     <rect>\n      <x>305</x>\n      <y>30</y>\n      <width>95</width>\n      <height>15</height>\n     </rect>\n     <font>\n      <face>Arial</face>\n      <size>8</size>\n      <weight>normal</weight>\n     </font>\n     <left/>\n     <vcenter/>\n     <string>Item</string>\n    </label>\n   </head>\n   <foot>\n    <height>33</height>\n    <line>\n     <xstart>305</xstart>\n     <ystart>5</ystart>\n     <xend>750</xend>\n     <yend>5</yend>\n     <weight>0</weight>\n    </line>\n   </foot>\n  </group>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>18</height>\n   <field>\n    <rect>\n     <x>305</x>\n     <y>2</y>\n     <width>135</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>item</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>210</x>\n     <y>2</y>\n     <width>85</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>status</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>445</x>\n     <y>2</y>\n     <width>85</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_qty</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>545</x>\n     <y>2</y>\n     <width>165</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_value</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>30</x>\n     <y>2</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>name</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <height>41</height>\n  <label>\n   <rect>\n    <x>610</x>\n    <y>16</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n  <field>\n   <rect>\n    <x>700</x>\n    <y>16</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>16</y>\n    <width>85</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n  <line>\n   <xstart>0</xstart>\n   <ystart>-11</ystart>\n   <xend>750</xend>\n   <yend>-11</yend>\n   <weight>2</weight>\n  </line>\n  <field>\n   <rect>\n    <x>75</x>\n    <y>16</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	List of Projects and details	0	2014-03-20 16:30:39.072368
331	PurchaseOrder	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Purchase Order</title>\n <name>PurchaseOrder</name>\n <description>Selecting an Alt Address on the PO will cause the printed PO to display that address as the Ship To on the printed document.</description>\n <parameter default="999" active="true" listtype="static" type="string" name="pohead_id">\n  <description></description>\n </parameter>\n <watermark>\n  <data>\n   <query>Head</query>\n   <column>title</column>\n  </data>\n  <opacity>25</opacity>\n </watermark>\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>28</topmargin>\n <bottommargin>28</bottommargin>\n <rightmargin>20</rightmargin>\n <leftmargin>20</leftmargin>\n <querysource>\n  <name>Head</name>\n  <sql>SELECT pohead_number,\n       formatDate(pohead_orderdate) AS f_orderdate,\n       pohead_fob,\n       pohead_shipvia,\n       terms_descrip,\n       vend_number,\n       vend_name,\n       warehous_descrip,\n       pohead_agent_username,\n       usr.usr_propername AS username,\n       pohead_comments,\n       text(&lt;? value("title") ?>) AS title\n FROM pohead\n   LEFT OUTER JOIN usr ON (pohead_agent_username = usr_username)\n   LEFT OUTER JOIN terms ON (pohead_terms_id = terms_id)\n   LEFT OUTER JOIN vendinfo ON (pohead_vend_id = vend_id)\n   LEFT OUTER JOIN whsinfo ON (pohead_warehous_id = warehous_id)\n WHERE (pohead_id=&lt;? value("pohead_id") ?>);</sql>\n </querysource>\n <querysource>\n  <name>Detail</name>\n  <sql>SELECT poitem_linenumber,\n       poitem_comments,\n       poitem_linenumber AS f_line,\n       item_number,\n       poitem_vend_item_number, \n       CASE WHEN (LENGTH(TRIM(BOTH '\t' FROM poitem_vend_item_descrip)) &lt;= 0) THEN\n          (item_descrip1 || '' || item_descrip2)\n       ELSE (poitem_vend_item_descrip)\n       END AS itemdescription,\n       formatQty(poitem_qty_ordered) AS f_ordered,\n       CASE WHEN (poitem_vend_uom LIKE '') THEN (uom_name)\n            ELSE (poitem_vend_uom)\n       END AS itemuom,\n       formatPurchPrice(poitem_unitprice) AS f_price,\n       formatExtPrice(poitem_unitprice * poitem_qty_ordered) AS f_extended,\n       formatDate(poitem_duedate) AS f_duedate,\n       characteristicsToString('PI', poitem_id, '=', ', ') AS poitem_characteristics\nFROM poitem\n\tLEFT OUTER JOIN itemsite ON (poitem_itemsite_id = itemsite_id)\n\tLEFT OUTER JOIN (item JOIN uom ON (item_inv_uom_id=uom_id)) ON (itemsite_item_id = item_id)\nWHERE \t(poitem_pohead_id=&lt;? value("pohead_id") ?>) \nORDER BY poitem_linenumber;</sql>\n </querysource>\n <querysource>\n  <name>Foot</name>\n  <sql>SELECT formatExtPrice(subtotal) AS f_subtotal,\n       formatExtPrice(totalfreight) AS f_totalfreight,\n       formatExtPrice(tax) AS f_tax,\n       formatExtPrice(subtotal + totalfreight + tax) AS f_totaldue\nFROM\n( SELECT COALESCE(SUM(poitem_qty_ordered * poitem_unitprice), 0) AS subtotal,\n         COALESCE(SUM(poitem_freight)+pohead_freight,0) AS totalfreight,\n         (SELECT COALESCE(SUM(tax), 0.0)\n          FROM (SELECT ROUND(SUM(taxdetail_tax),2) AS tax\n                FROM tax\n                     JOIN calculateTaxDetailSummary('PO', &lt;? value("pohead_id") ?>, 'T') ON (taxdetail_tax_id=tax_id)\n                GROUP BY tax_id) AS taxdata) AS tax\n  FROM pohead JOIN poitem ON (poitem_pohead_id=pohead_id)\n  WHERE (pohead_id=&lt;? value("pohead_id") ?>)\n  GROUP BY pohead_freight ) AS data;\n</sql>\n </querysource>\n <querysource>\n  <name>Logo</name>\n  <sql>SELECT image_data \nFROM image \nWHERE ((image_name='logo'));</sql>\n </querysource>\n <querysource>\n  <name>Currency</name>\n  <sql>SELECT\n curr_symbol\nFROM\n    pohead,\n    curr_symbol\nWHERE (pohead_id = &lt;? value("pohead_id") ?>) AND\n      pohead_curr_id = curr_id;</sql>\n </querysource>\n <querysource>\n  <name>Address</name>\n  <sql>SELECT\n     warehous_descrip,\n     formatAddr(addr_line1, addr_line2, addr_line3, ( addr_city || '  ' || addr_state || '  ' || addr_postalcode), addr_country) AS warehouse_address\nFROM\n     whsinfo, \n     addr, \n     pohead\nWHERE \n     addr_id = warehous_addr_id\n     and pohead_warehous_id = warehous_id\n     AND pohead_id=&lt;? value("pohead_id") ?> ;</sql>\n </querysource>\n <querysource>\n  <name>ShipToAddress</name>\n  <sql>SELECT pohead_number,\n       formatDate(pohead_orderdate) AS f_orderdate,\n       pohead_fob,\n       pohead_shipvia,\n       terms_descrip,\n       vend_number,\n       vend_name,\n       va.addr_line1 AS vend_address1,\n       va.addr_line2 AS vend_address2,\n       va.addr_line3 AS vend_address3,\n       (va.addr_city || '  '  || va.addr_state || '  ' || va.addr_postalcode) AS vendcitystatezip,\n       formatcntctname(pohead_vend_cntct_id) AS vend_contact,\n       formataddr(pohead_vendaddress1, pohead_vendaddress2, pohead_vendaddress3, (pohead_vendcity || '  '  || pohead_vendstate || '   ' || pohead_vendzipcode), pohead_vendcountry) as vend_address,\n       warehous_descrip,\n       wa.addr_line1 as warehous_addr1,\n       wa.addr_line2 as warehous_addr2,\n       wa.addr_line3 as warehous_addr3,\n       wa.addr_city  as warehous_addr4,\n       wa.addr_postalcode as zip,\n       wa.addr_state,\n       wa.addr_country,\n       pohead_shiptoname AS shipto_name,\n       formatcntctname(pohead_shipto_cntct_id) AS shipto_contact,\n       formataddr(pohead_shiptoaddress1, pohead_shiptoaddress2, pohead_shiptoaddress3, (pohead_shiptocity || ' ' || pohead_shiptostate || ' ' || pohead_shiptozipcode), pohead_shiptocountry) as shipto_address,\n       pohead_agent_username AS username,\n       pohead_comments,\n       text(&lt;? value("title") ?>) AS title\n FROM pohead\n   LEFT OUTER JOIN terms ON (pohead_terms_id = terms_id),\n   vendinfo\n   LEFT OUTER JOIN addr va ON (vend_addr_id=va.addr_id),\n   whsinfo\n   LEFT OUTER JOIN addr wa ON (warehous_addr_id = wa.addr_id)\n WHERE ((pohead_vend_id=vend_id)\n   AND (pohead_warehous_id = warehous_id)\n   AND (pohead_id=&lt;? value("pohead_id") ?>) );</sql>\n </querysource>\n <pghead>\n  <height>376</height>\n  <image>\n   <rect>\n    <x>290</x>\n    <y>10</y>\n    <width>225</width>\n    <height>75</height>\n   </rect>\n   <mode>stretch</mode>\n   <data>\n    <query>Logo</query>\n    <column>image_data</column>\n   </data>\n  </image>\n  <label>\n   <rect>\n    <x>550</x>\n    <y>65</y>\n    <width>70</width>\n    <height>16</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 DATE</string>\n  </label>\n  <line>\n   <xstart>0</xstart>\n   <ystart>130</ystart>\n   <xend>270</xend>\n   <yend>130</yend>\n   <weight>0</weight>\n  </line>\n  <line>\n   <xstart>5</xstart>\n   <ystart>315</ystart>\n   <xend>805</xend>\n   <yend>315</yend>\n   <weight>0</weight>\n  </line>\n  <label>\n   <rect>\n    <x>550</x>\n    <y>45</y>\n    <width>80</width>\n    <height>16</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 NUMBER</string>\n  </label>\n  <line>\n   <xstart>535</xstart>\n   <ystart>130</ystart>\n   <xend>810</xend>\n   <yend>130</yend>\n   <weight>0</weight>\n  </line>\n  <line>\n   <xstart>535</xstart>\n   <ystart>0</ystart>\n   <xend>535</xend>\n   <yend>130</yend>\n   <weight>0</weight>\n  </line>\n  <label>\n   <rect>\n    <x>680</x>\n    <y>325</y>\n    <width>100</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>EXTENDED PRICE</string>\n  </label>\n  <label>\n   <rect>\n    <x>675</x>\n    <y>345</y>\n    <width>100</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>REQ. DATE</string>\n  </label>\n  <label>\n   <rect>\n    <x>232</x>\n    <y>325</y>\n    <width>135</width>\n    <height>16</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>ITEM DESCRIPTION</string>\n  </label>\n  <field>\n   <rect>\n    <x>645</x>\n    <y>60</y>\n    <width>140</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Head</query>\n    <column>f_orderdate</column>\n   </data>\n  </field>\n  <text>\n   <rect>\n    <x>500</x>\n    <y>142</y>\n    <width>300</width>\n    <height>17</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   <vcenter/>\n   <data>\n    <query>ShipToAddress</query>\n    <column>shipto_contact</column>\n   </data>\n  </text>\n  <label>\n   <rect>\n    <x>530</x>\n    <y>325</y>\n    <width>85</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>UNIT PRICE</string>\n  </label>\n  <text>\n   <rect>\n    <x>5</x>\n    <y>25</y>\n    <width>265</width>\n    <height>17</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>Address</query>\n    <column>warehouse_address</column>\n   </data>\n  </text>\n  <field>\n   <rect>\n    <x>5</x>\n    <y>5</y>\n    <width>267</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Address</query>\n    <column>warehous_descrip</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>645</x>\n    <y>40</y>\n    <width>126</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Head</query>\n    <column>pohead_number</column>\n   </data>\n  </field>\n  <line>\n   <xstart>5</xstart>\n   <ystart>360</ystart>\n   <xend>805</xend>\n   <yend>360</yend>\n   <weight>0</weight>\n  </line>\n  <label>\n   <rect>\n    <x>50</x>\n    <y>335</y>\n    <width>80</width>\n    <height>16</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>YOUR ITEM #</string>\n  </label>\n  <text>\n   <rect>\n    <x>75</x>\n    <y>155</y>\n    <width>300</width>\n    <height>17</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   <vcenter/>\n   <data>\n    <query>ShipToAddress</query>\n    <column>vend_contact</column>\n   </data>\n  </text>\n  <line>\n   <xstart>270</xstart>\n   <ystart>0</ystart>\n   <xend>270</xend>\n   <yend>130</yend>\n   <weight>0</weight>\n  </line>\n  <label>\n   <rect>\n    <x>455</x>\n    <y>325</y>\n    <width>85</width>\n    <height>16</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>CURRENCY</string>\n  </label>\n  <label>\n   <rect>\n    <x>610</x>\n    <y>345</y>\n    <width>80</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>UOM</string>\n  </label>\n  <field>\n   <rect>\n    <x>5</x>\n    <y>290</y>\n    <width>187</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>11</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>Head</query>\n    <column>pohead_fob</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>202</x>\n    <y>290</y>\n    <width>252</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>11</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>Head</query>\n    <column>pohead_shipvia</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>290</x>\n    <y>265</y>\n    <width>75</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>SHIP VIA:</string>\n  </label>\n  <label>\n   <rect>\n    <x>520</x>\n    <y>345</y>\n    <width>85</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>QTY. ORDERED</string>\n  </label>\n  <label>\n   <rect>\n    <x>580</x>\n    <y>0</y>\n    <width>252</width>\n    <height>32</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>14</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Purchase Order</string>\n  </label>\n  <label>\n   <rect>\n    <x>455</x>\n    <y>155</y>\n    <width>17</width>\n    <height>16</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <bottom/>\n   <string>TO:</string>\n  </label>\n  <label>\n   <rect>\n    <x>540</x>\n    <y>265</y>\n    <width>37</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>TERMS</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>320</y>\n    <width>37</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>LINE</string>\n  </label>\n  <label>\n   <rect>\n    <x>65</x>\n    <y>265</y>\n    <width>60</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>F.O.B.</string>\n  </label>\n  <field>\n   <rect>\n    <x>655</x>\n    <y>290</y>\n    <width>117</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>11</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>Head</query>\n    <column>username</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>442</x>\n    <y>290</y>\n    <width>202</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>11</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>Head</query>\n    <column>terms_descrip</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>45</x>\n    <y>142</y>\n    <width>17</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <top/>\n   <string>TO:</string>\n  </label>\n  <field>\n   <rect>\n    <x>645</x>\n    <y>85</y>\n    <width>35</width>\n    <height>16</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>Context Query</query>\n    <column>page_number</column>\n   </data>\n  </field>\n  <line>\n   <xstart>5</xstart>\n   <ystart>285</ystart>\n   <xend>805</xend>\n   <yend>285</yend>\n   <weight>0</weight>\n  </line>\n  <label>\n   <rect>\n    <x>50</x>\n    <y>320</y>\n    <width>80</width>\n    <height>16</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>OUR ITEM #</string>\n  </label>\n  <label>\n   <rect>\n    <x>550</x>\n    <y>85</y>\n    <width>35</width>\n    <height>16</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>665</x>\n    <y>265</y>\n    <width>95</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>ORDERED BY</string>\n  </label>\n  <label>\n   <rect>\n    <x>455</x>\n    <y>142</y>\n    <width>37</width>\n    <height>16</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>SHIP</string>\n  </label>\n  <field>\n   <rect>\n    <x>75</x>\n    <y>137</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <data>\n    <query>Head</query>\n    <column>vend_name</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>645</x>\n    <y>107</y>\n    <width>140</width>\n    <height>17</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>550</x>\n    <y>107</y>\n    <width>75</width>\n    <height>16</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>PRINT DATE</string>\n  </label>\n  <text>\n   <rect>\n    <x>500</x>\n    <y>172</y>\n    <width>300</width>\n    <height>17</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   <vcenter/>\n   <data>\n    <query>ShipToAddress</query>\n    <column>shipto_address</column>\n   </data>\n  </text>\n  <text>\n   <rect>\n    <x>75</x>\n    <y>172</y>\n    <width>300</width>\n    <height>17</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   <vcenter/>\n   <data>\n    <query>ShipToAddress</query>\n    <column>vend_address</column>\n   </data>\n  </text>\n  <text>\n   <rect>\n    <x>500</x>\n    <y>157</y>\n    <width>300</width>\n    <height>17</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   <vcenter/>\n   <data>\n    <query>ShipToAddress</query>\n    <column>shipto_name</column>\n   </data>\n  </text>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>Detail</query>\n   </key>\n   <height>107</height>\n   <field>\n    <rect>\n     <x>625</x>\n     <y>25</y>\n     <width>55</width>\n     <height>16</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>Detail</query>\n     <column>itemuom</column>\n    </data>\n   </field>\n   <text>\n    <rect>\n     <x>50</x>\n     <y>65</y>\n     <width>605</width>\n     <height>17</height>\n    </rect>\n    <bottompad>0</bottompad>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>Detail</query>\n     <column>poitem_comments</column>\n    </data>\n   </text>\n   <field>\n    <rect>\n     <x>700</x>\n     <y>25</y>\n     <width>100</width>\n     <height>17</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>Detail</query>\n     <column>f_duedate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>700</x>\n     <y>5</y>\n     <width>92</width>\n     <height>16</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>Detail</query>\n     <column>f_extended</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>50</x>\n     <y>45</y>\n     <width>750</width>\n     <height>17</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>9</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>Detail</query>\n     <column>poitem_characteristics</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>545</x>\n     <y>25</y>\n     <width>75</width>\n     <height>16</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>Detail</query>\n     <column>f_ordered</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>555</x>\n     <y>5</y>\n     <width>75</width>\n     <height>16</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>Detail</query>\n     <column>f_price</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>505</x>\n     <y>5</y>\n     <width>25</width>\n     <height>16</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <right/>\n    <bottom/>\n    <data>\n     <query>Currency</query>\n     <column>curr_symbol</column>\n    </data>\n   </field>\n   <text>\n    <rect>\n     <x>150</x>\n     <y>5</y>\n     <width>350</width>\n     <height>17</height>\n    </rect>\n    <bottompad>0</bottompad>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>Detail</query>\n     <column>itemdescription</column>\n    </data>\n   </text>\n   <field>\n    <rect>\n     <x>50</x>\n     <y>25</y>\n     <width>225</width>\n     <height>17</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>9</size>\n     <weight>normal</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>50</x>\n     <y>5</y>\n     <width>92</width>\n     <height>17</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>Detail</query>\n     <column>item_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>10</x>\n     <y>5</y>\n     <width>36</width>\n     <height>17</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>10</size>\n     <weight>normal</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>Detail</query>\n     <column>f_line</column>\n    </data>\n   </field>\n  </detail>\n </section>\n <pgfoot>\n  <lastpage/>\n  <height>113</height>\n  <field>\n   <rect>\n    <x>670</x>\n    <y>85</y>\n    <width>25</width>\n    <height>16</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <bottom/>\n   <data>\n    <query>Currency</query>\n    <column>curr_symbol</column>\n   </data>\n  </field>\n  <text>\n   <rect>\n    <x>35</x>\n    <y>10</y>\n    <width>530</width>\n    <height>17</height>\n   </rect>\n   <bottompad>14</bottompad>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Head</query>\n    <column>pohead_comments</column>\n   </data>\n  </text>\n  <label>\n   <rect>\n    <x>580</x>\n    <y>12</y>\n    <width>60</width>\n    <height>16</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <bottom/>\n   <string>SUB TOTAL</string>\n  </label>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>55</y>\n    <width>100</width>\n    <height>16</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <bottom/>\n   <data>\n    <query>Foot</query>\n    <column>f_tax</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>85</y>\n    <width>100</width>\n    <height>16</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <bottom/>\n   <data>\n    <query>Foot</query>\n    <column>f_totaldue</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>670</x>\n    <y>12</y>\n    <width>25</width>\n    <height>16</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <bottom/>\n   <data>\n    <query>Currency</query>\n    <column>curr_symbol</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>670</x>\n    <y>55</y>\n    <width>25</width>\n    <height>16</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <bottom/>\n   <data>\n    <query>Currency</query>\n    <column>curr_symbol</column>\n   </data>\n  </field>\n  <line>\n   <xstart>585</xstart>\n   <ystart>75</ystart>\n   <xend>806</xend>\n   <yend>75</yend>\n   <weight>0</weight>\n  </line>\n  <label>\n   <rect>\n    <x>580</x>\n    <y>35</y>\n    <width>60</width>\n    <height>16</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <bottom/>\n   <string>FREIGHT</string>\n  </label>\n  <label>\n   <rect>\n    <x>580</x>\n    <y>55</y>\n    <width>60</width>\n    <height>16</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <bottom/>\n   <string>TAX</string>\n  </label>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>35</y>\n    <width>100</width>\n    <height>16</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <bottom/>\n   <data>\n    <query>Foot</query>\n    <column>f_totalfreight</column>\n   </data>\n  </field>\n  <line>\n   <xstart>10</xstart>\n   <ystart>5</ystart>\n   <xend>805</xend>\n   <yend>5</yend>\n   <weight>0</weight>\n  </line>\n  <field>\n   <rect>\n    <x>705</x>\n    <y>12</y>\n    <width>100</width>\n    <height>16</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <bottom/>\n   <data>\n    <query>Foot</query>\n    <column>f_subtotal</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>580</x>\n    <y>85</y>\n    <width>60</width>\n    <height>16</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <bottom/>\n   <string>TOTAL</string>\n  </label>\n  <field>\n   <rect>\n    <x>670</x>\n    <y>35</y>\n    <width>25</width>\n    <height>16</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <bottom/>\n   <data>\n    <query>Currency</query>\n    <column>curr_symbol</column>\n   </data>\n  </field>\n </pgfoot>\n <pgfoot>\n  <height>57</height>\n  <label>\n   <rect>\n    <x>32</x>\n    <y>37</y>\n    <width>37</width>\n    <height>16</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>12</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <top/>\n   <string></string>\n  </label>\n </pgfoot>\n</report>\n	Selecting an Alt Address on the PO will cause the printed PO to display that address as the Ship To on the printed document.	0	2015-10-01 17:14:33.361434
161	PurchasePriceVariancesByItem	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Purchase Price Variances By Item</title>\n <name>PurchasePriceVariancesByItem</name>\n <description></description>\n <grid>\n  <x>0.05</x>\n  <y>0.05</y>\n </grid>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT item_number, item_descrip1,\n       item_descrip2, uom_name,\n       formatDate(&lt;? value("startDate") ?>, 'Earliest') AS startdate,\n       formatDate(&lt;? value("endDate") ?>, 'Latest') AS enddate,\n       &lt;? if exists("warehous_id") ?>\n         (SELECT warehous_code FROM whsinfo WHERE warehous_id=&lt;? value("warehous_id") ?>)\n       &lt;? else ?>\n         text('All Sites')\n       &lt;? endif ?>\n       AS warehouse,\n       &lt;? if exists("agentUsername") ?>\n       TEXT(&lt;? value("agentUsername" ?>)\n       &lt;? else ?>\n       TEXT('All Agents')\n       &lt;? endif ?>\n       AS agentUsername\n  FROM item JOIN uom ON (item_inv_uom_id=uom_id)\n WHERE (item_id=&lt;? value("item_id") ?>);</sql>\n </querysource>\n <querysource loadFromDb="true">\n  <name>detail</name>\n  <mqlgroup>poPriceVariances</mqlgroup>\n  <mqlname>detail</mqlname>\n </querysource>\n <rpthead>\n  <height>236</height>\n  <field>\n   <rect>\n    <x>95</x>\n    <y>135</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>warehouse</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>60</x>\n    <y>200</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Vendor</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</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>P/O #</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>135</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>300</x>\n    <y>215</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>Vendor Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>155</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>Purch. Agent:</string>\n  </label>\n  <label>\n   <rect>\n    <x>443</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  <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>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>Item:</string>\n  </label>\n  <field>\n   <rect>\n    <x>95</x>\n    <y>155</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>agentUsername</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>575</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Received</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>item_number</column>\n   </data>\n  </field>\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>item_descrip1</column>\n   </data>\n  </field>\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>Qty.</string>\n  </label>\n  <label>\n   <rect>\n    <x>215</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>Dist. Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>655</x>\n    <y>200</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   <hcenter/>\n   <vcenter/>\n   <string>Variance</string>\n  </label>\n  <label>\n   <rect>\n    <x>270</x>\n    <y>5</y>\n    <width>475</width>\n    <height>40</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Purchase Price Variances By Item</string>\n  </label>\n  <field>\n   <rect>\n    <x>95</x>\n    <y>103</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>252</x>\n    <y>65</y>\n    <width>50</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>UOM:</string>\n  </label>\n  <label>\n   <rect>\n    <x>655</x>\n    <y>215</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   <hcenter/>\n   <vcenter/>\n   <string>%</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>230</ystart>\n   <xend>745</xend>\n   <yend>230</yend>\n   <weight>2</weight>\n  </line>\n  <field>\n   <rect>\n    <x>310</x>\n    <y>65</y>\n    <width>100</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>uom_name</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>300</x>\n    <y>200</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>Vendor Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>443</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  <label>\n   <rect>\n    <x>568</x>\n    <y>215</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   <hcenter/>\n   <vcenter/>\n   <string>Vouchered</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>655</x>\n    <y>20</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   <hcenter/>\n   <vcenter/>\n   <string>%</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>5</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>P/O #</string>\n  </label>\n  <label>\n   <rect>\n    <x>300</x>\n    <y>20</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>Vendor Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>655</x>\n    <y>5</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   <hcenter/>\n   <vcenter/>\n   <string>Variance</string>\n  </label>\n  <label>\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   <hcenter/>\n   <vcenter/>\n   <string>Received</string>\n  </label>\n  <label>\n   <rect>\n    <x>60</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</string>\n  </label>\n  <label>\n   <rect>\n    <x>215</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>Dist Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>300</x>\n    <y>5</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>Vendor Item Number</string>\n  </label>\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>Qty.</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>568</x>\n    <y>19.5</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   <hcenter/>\n   <vcenter/>\n   <string>Vouchered</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>36</height>\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>recv_order_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>665</x>\n     <y>15</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_varprcnt</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>665</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_variance</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>60</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   <line>\n    <xstart>5</xstart>\n    <ystart>30</ystart>\n    <xend>745</xend>\n    <yend>30</yend>\n    <weight>0</weight>\n   </line>\n   <field>\n    <rect>\n     <x>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_recv_value</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>215</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_date</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>300</x>\n     <y>0</y>\n     <width>150</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>itemnumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>300</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>itemdescrip</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_qty</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>575</x>\n     <y>15</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_voucher_value</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  <label>\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n  <field>\n   <rect>\n    <x>103</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
162	PurchasePriceVariancesByVendor	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Purchase Price Variances By Vendor</title>\n <name>PurchasePriceVariancesByVendor</name>\n <description></description>\n <grid>\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("warehous_id") ?>\n         (SELECT warehous_code FROM whsinfo WHERE warehous_id=&lt;? value("warehous_id") ?>)\n       &lt;? else ?>\n         text('All Sites')\n       &lt;? endif ?>\n       AS warehouse,\n       &lt;? if exists("agentUsername") ?>\n       TEXT(&lt;? value("agentUsername" ?>)\n       &lt;? else ?>\n       TEXT('All Agents')\n       &lt;? endif ?>\n       AS agentUsername;</sql>\n </querysource>\n <querysource loadFromDb="true">\n  <name>detail</name>\n  <mqlgroup>poPriceVariances</mqlgroup>\n  <mqlname>detail</mqlname>\n </querysource>\n <rpthead>\n  <height>236</height>\n  <label>\n   <rect>\n    <x>300</x>\n    <y>200</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>Vendor Item Number</string>\n  </label>\n  <field>\n   <rect>\n    <x>550</x>\n    <y>64.8725</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>270</x>\n    <y>5</y>\n    <width>475</width>\n    <height>40</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>18</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Purchase Price Variances By Vendor</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  <label>\n   <rect>\n    <x>568</x>\n    <y>215</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   <hcenter/>\n   <vcenter/>\n   <string>Vouchered</string>\n  </label>\n  <field>\n   <rect>\n    <x>94.254</x>\n    <y>64.8725</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>warehouse</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>4.25396</x>\n    <y>64.8725</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>443</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  <label>\n   <rect>\n    <x>5</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>P/O #</string>\n  </label>\n  <label>\n   <rect>\n    <x>655</x>\n    <y>215</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   <hcenter/>\n   <vcenter/>\n   <string>%</string>\n  </label>\n  <label>\n   <rect>\n    <x>300</x>\n    <y>215</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>Vendor Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>575</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Received</string>\n  </label>\n  <field>\n   <rect>\n    <x>95.746</x>\n    <y>84.8725</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>agentUsername</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>215</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>Dist. Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>490</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Qty.</string>\n  </label>\n  <label>\n   <rect>\n    <x>443</x>\n    <y>64.8725</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>4.25396</x>\n    <y>84.8725</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>Purch. Agent:</string>\n  </label>\n  <line>\n   <xstart>5</xstart>\n   <ystart>230</ystart>\n   <xend>745</xend>\n   <yend>230</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>68.5</x>\n    <y>200</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>Vendor</string>\n  </label>\n  <label>\n   <rect>\n    <x>656</x>\n    <y>200</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   <hcenter/>\n   <vcenter/>\n   <string>Variance</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>5</x>\n    <y>5</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>P/O #</string>\n  </label>\n  <label>\n   <rect>\n    <x>655</x>\n    <y>20</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   <hcenter/>\n   <vcenter/>\n   <string>%</string>\n  </label>\n  <label>\n   <rect>\n    <x>300</x>\n    <y>5</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>Vendor Item Number</string>\n  </label>\n  <label>\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   <hcenter/>\n   <vcenter/>\n   <string>Received</string>\n  </label>\n  <label>\n   <rect>\n    <x>215</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>Dist. Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>568</x>\n    <y>19.9</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   <hcenter/>\n   <vcenter/>\n   <string>Vouchered</string>\n  </label>\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>Qty.</string>\n  </label>\n  <label>\n   <rect>\n    <x>300</x>\n    <y>20</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>Vendor 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>62.4769</x>\n    <y>4.2543</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>Vendor Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>651.846</x>\n    <y>5.00033</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   <hcenter/>\n   <vcenter/>\n   <string>Variance</string>\n  </label>\n  <label>\n   <rect>\n    <x>62.4769</x>\n    <y>18.2543</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>Vendor Name</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>36</height>\n   <field>\n    <rect>\n     <x>665</x>\n     <y>15</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_varprcnt</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>6.49</x>\n     <y>-1.88608e-20</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>recv_order_number</column>\n    </data>\n   </field>\n   <line>\n    <xstart>5</xstart>\n    <ystart>30</ystart>\n    <xend>745</xend>\n    <yend>30</yend>\n    <weight>0</weight>\n   </line>\n   <field>\n    <rect>\n     <x>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_qty</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>300</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>itemdescrip</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>575</x>\n     <y>15</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_voucher_value</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>215</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_date</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>300</x>\n     <y>0</y>\n     <width>150</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>itemnumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>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_recv_value</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>69.9</x>\n     <y>0</y>\n     <width>143</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>665</x>\n     <y>-0.442</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_variance</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>103</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>Context Query</query>\n    <column>report_date</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Report Date:</string>\n  </label>\n </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
458	QOH	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Quantities on Hand</title>\n <name>QOH</name>\n <description></description>\n <grid>\n  <snap/>\n  <show/>\n  <x>0.05</x>\n  <y>0.05</y>\n </grid>\n <size>Letter</size>\n <portrait/>\n <topmargin>50</topmargin>\n <bottommargin>50</bottommargin>\n <rightmargin>50</rightmargin>\n <leftmargin>50</leftmargin>\n <querysource>\n  <name>head</name>\n  <sql>SELECT &lt;? if exists("onlyShowPositive") ?>\n         text('Only Showing Positive Quantities')\n       &lt;? elseif exists("onlyShowNegative") ?>\n         text('Only Showing Negative Quantities')\n       &lt;? else ?>\n         text('Showing All Quantities')\n       &lt;? endif ?>\n       AS showquantities,\n       &lt;? if exists("showValue") ?>\n         text('Unit Cost') AS lbl_unitcost,\n         text('Value') AS lbl_value,\n         text('NN Value') AS lbl_nnvalue,\n         text('Cost Method') AS lbl_costmethod,\n       &lt;? else ?>\n         text('') AS lbl_unitcost,\n         text('') AS lbl_value,\n         text('') AS lbl_nnvalue,\n         text('') AS lbl_costmethod,\n       &lt;? endif ?>\n       &lt;? if exists("showValue") ?>\n         &lt;? if exists("useActualCosts") ?>\n           text('Showing Actual Costs')\n         &lt;? elseif exists("useStandardCosts") ?>\n           text('Showing Standard Costs')\n         &lt;? else ?>\n           text('Showing Posted Costs')\n         &lt;? endif ?>\n       &lt;? else ?>\n         text('')\n       &lt;? endif ?>\n       AS showvalues;\n</sql>\n </querysource>\n <querysource loadFromDb="true">\n  <name>detail</name>\n  <mqlgroup>qoh</mqlgroup>\n  <mqlname>detail</mqlname>\n </querysource>\n <rpthead>\n  <height>234</height>\n  <label>\n   <rect>\n    <x>5</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>Site</string>\n  </label>\n  <field>\n   <rect>\n    <x>590</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>lbl_value</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>509</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>lbl_unitcost</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>360</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>QOH</string>\n  </label>\n  <field>\n   <rect>\n    <x>185</x>\n    <y>43</y>\n    <width>300</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>showvalues</column>\n   </data>\n  </field>\n  <line>\n   <xstart>8</xstart>\n   <ystart>231.167</ystart>\n   <xend>748</xend>\n   <yend>231.167</yend>\n   <weight>2</weight>\n  </line>\n  <label>\n   <rect>\n    <x>430</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>Non-Netable</string>\n  </label>\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>Reorder Lvl.</string>\n  </label>\n  <label>\n   <rect>\n    <x>104</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  <field>\n   <rect>\n    <x>670</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>lbl_nnvalue</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>215</y>\n    <width>90</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Default Location</string>\n  </label>\n  <field>\n   <rect>\n    <x>10</x>\n    <y>43</y>\n    <width>300</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>showquantities</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>670</x>\n    <y>215</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>lbl_costmethod</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>104</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  <text>\n   <rect>\n    <x>10</x>\n    <y>58</y>\n    <width>725</width>\n    <height>15</height>\n   </rect>\n   <bottompad>12</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>Parameter Query</query>\n    <column>filter</column>\n   </data>\n  </text>\n  <label>\n   <rect>\n    <x>505</x>\n    <y>8</y>\n    <width>240</width>\n    <height>35</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>Quantity On Hand</string>\n  </label>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>36</height>\n  <field>\n   <rect>\n    <x>590</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   <data>\n    <query>head</query>\n    <column>lbl_value</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>360</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>QOH</string>\n  </label>\n  <field>\n   <rect>\n    <x>670</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   <data>\n    <query>head</query>\n    <column>lbl_nnvalue</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>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>lbl_unitcost</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>104</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>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>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Site</string>\n  </label>\n  <label>\n   <rect>\n    <x>104</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   <left/>\n   <vcenter/>\n   <string>Item Number</string>\n  </label>\n  <field>\n   <rect>\n    <x>670</x>\n    <y>15</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>lbl_costmethod</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>265</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Reorder Lvl.</string>\n  </label>\n  <label>\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>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Non-Netable</string>\n  </label>\n  <label>\n   <rect>\n    <x>10</x>\n    <y>15</y>\n    <width>90</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Default Location</string>\n  </label>\n  <line>\n   <xstart>10</xstart>\n   <ystart>33.3333</ystart>\n   <xend>750</xend>\n   <yend>33.3333</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>51</height>\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    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_reorderlevel</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>104</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>104</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>5</x>\n     <y>0</y>\n     <width>95</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>warehous_code</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>10</x>\n     <y>15</y>\n     <width>90</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>defaultlocation</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>585</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_value</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>345</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   <field>\n    <rect>\n     <x>104</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>665</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_nonnetvalue</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>580</x>\n     <y>15</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    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_costmethod</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>505</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_cost</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>425</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_nonnetqoh</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>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  <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  <field>\n   <rect>\n    <x>425</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>detail</query>\n    <column>nonnetqoh</column>\n   </data>\n   <format builtin="true">qty</format>\n   <tracktotal/>\n  </field>\n  <field>\n   <rect>\n    <x>585</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>detail</query>\n    <column>f_value</column>\n   </data>\n   <format builtin="true">money</format>\n   <tracktotal/>\n  </field>\n  <field>\n   <rect>\n    <x>665</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>detail</query>\n    <column>nonnetvalue</column>\n   </data>\n   <format builtin="true">money</format>\n   <tracktotal/>\n  </field>\n  <field>\n   <rect>\n    <x>345</x>\n    <y>0</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <data>\n    <query>detail</query>\n    <column>qoh</column>\n   </data>\n   <format builtin="true">qty</format>\n   <tracktotal/>\n  </field>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>0</y>\n    <width>40</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>bold</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Totals</string>\n  </label>\n </rptfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
424	ShipmentsByShipment	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Shipments By Shipment</title>\n <name>ShipmentsByShipment</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 shiphead_number AS f_shipnumber,\n       shiphead_tracknum AS f_tracknum,\n       formatMoney(shiphead_freight) AS freight,\n       ordernumber AS f_sonumber,\n       formatDate(orderdate) AS f_orderdate,\n       custponumber AS f_ponumber,\n       cust_name AS f_custname,\n       cntct_phone AS f_custphone\n  FROM custinfo JOIN cntct ON (cust_cntct_id=cntct_id), (SELECT shiphead_number,\n                     shiphead_tracknum,\n                     shiphead_freight,\n                     cohead_number AS ordernumber,\n                     cohead_cust_id AS order_cust_id,\n                     cohead_orderdate AS orderdate,\n                     cohead_custponumber AS custponumber\n                FROM cohead JOIN shiphead ON (shiphead_order_id=cohead_id AND shiphead_order_type='SO')\n               WHERE(shiphead_id=&lt;? value("shiphead_id") ?>)\n              UNION\n              SELECT shiphead_number,\n                     shiphead_tracknum,\n                     shiphead_freight,\n                     tohead_number AS ordernumber,\n                     NULL AS order_cust_id,\n                     tohead_orderdate AS orderdate,\n                     NULL AS custponumber\n                FROM tohead JOIN shiphead ON (shiphead_order_id=tohead_id AND shiphead_order_type='TO')\n               WHERE(shiphead_id=&lt;? value("shiphead_id") ?>) \n             ) AS taborder\n WHERE(order_cust_id=cust_id);\n</sql>\n </querysource>\n <querysource loadFromDb="true" >\n  <name>detail</name>\n  <mqlgroup>shipments</mqlgroup>\n  <mqlname>detail</mqlname>\n </querysource>\n <rpthead>\n  <height>221</height>\n  <label>\n   <rect>\n    <x>15</x>\n    <y>155</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 Number:</string>\n  </label>\n  <label>\n   <rect>\n    <x>105</x>\n    <y>185</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>Ship Date</string>\n  </label>\n  <label>\n   <rect>\n    <x>440</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  <field>\n   <rect>\n    <x>140</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>f_orderdate</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>155</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_ponumber</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>240</x>\n    <y>200</y>\n    <width>105</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>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>Shipments By Shipment</string>\n  </label>\n  <label>\n   <rect>\n    <x>600</x>\n    <y>185</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>Shipped</string>\n  </label>\n  <label>\n   <rect>\n    <x>520</x>\n    <y>185</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>Ordered</string>\n  </label>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>135</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_custphone</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>114</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_custname</column>\n   </data>\n  </field>\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>Order #:</string>\n  </label>\n  <label>\n   <rect>\n    <x>240</x>\n    <y>185</y>\n    <width>105</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>114</y>\n    <width>125</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Customer Name:</string>\n  </label>\n  <field>\n   <rect>\n    <x>140</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>f_sonumber</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>185</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>#</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>5</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>Order Date:</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</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>Shipment #</string>\n  </label>\n  <label>\n   <rect>\n    <x>15</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>Customer Phone:</string>\n  </label>\n  <field>\n   <rect>\n    <x>140</x>\n    <y>49</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_shipnumber</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>49</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>Shipment #:</string>\n  </label>\n  <field>\n   <rect>\n    <x>540</x>\n    <y>129</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_tracknum</column>\n   </data>\n  </field>\n  <field>\n   <rect>\n    <x>540</x>\n    <y>149</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_freight</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>410</x>\n    <y>129</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>Tracking Number:</string>\n  </label>\n  <label>\n   <rect>\n    <x>410</x>\n    <y>149</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>Freight:</string>\n  </label>\n </rpthead>\n <pghead>\n  <firstpage/>\n  <height>5</height>\n </pghead>\n <pghead>\n  <height>41</height>\n  <label>\n   <rect>\n    <x>140</x>\n    <y>5</y>\n    <width>105</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>500</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>Shipped</string>\n  </label>\n  <label>\n   <rect>\n    <x>419</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>Ordered</string>\n  </label>\n  <label>\n   <rect>\n    <x>140</x>\n    <y>20</y>\n    <width>105</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>85</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>#</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</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>Ship Date</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>285</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>UOM</string>\n  </label>\n  <label>\n   <rect>\n    <x>340</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>UOM</string>\n  </label>\n </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>38</height>\n   <field>\n    <rect>\n     <x>240</x>\n     <y>15</y>\n     <width>480</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_description</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>185</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>linenumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>520</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_qtyord</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>105</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_shipdate</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>5</x>\n     <y>0</y>\n     <width>100</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <right/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>shiphead_number</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>f_qtyshipped</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>240</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>detail</query>\n     <column>item_number</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>440</x>\n     <y>0</y>\n     <width>50</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>warehous_code</column>\n    </data>\n   </field>\n   <line>\n    <xstart>5</xstart>\n    <ystart>33</ystart>\n    <xend>745</xend>\n    <yend>33</yend>\n    <weight>0</weight>\n   </line>\n  </detail>\n </section>\n <pgfoot>\n  <height>15</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</report>\n		0	2015-10-01 17:14:33.361434
163	RejectedMaterialByVendor	\N	<!DOCTYPE openRPTDef>\n<report>\n <title>Rejected Material By Vendor</title>\n <name>RejectedMaterialByVendor</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, vend_name,\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       &lt;? if exists(&quot;agentUsername&quot;) ?>\n       TEXT(&lt;? value(&quot;agentUsername&quot; ?>)\n       &lt;? else ?>\n       TEXT('All Agents')\n       &lt;? endif ?>\n       AS agentUsername,\n       formatDate(&lt;? value(&quot;startDate&quot;) ?>, 'Earliest') AS startdate,\n       formatDate(&lt;? value(&quot;endDate&quot;) ?>, 'Latest') AS enddate\n  FROM vendinfo\n WHERE (vend_id=&lt;? value(&quot;vend_id&quot;) ?>);</sql>\n </querysource>\n <querysource>\n  <name>detail</name>\n  <sql>SELECT poreject_id, poreject_ponumber, vend_name,\n       formatDate(poreject_date) as f_date,\n       poreject_vend_item_number as f_itemnum,\n       poreject_vend_item_descrip as f_itemdescrip,\n       formatQty(poreject_qty) as f_qty,\n       rjctcode_code as f_rejectcode\nFROM poreject, vendinfo, itemsite, rjctcode\nWHERE ( (poreject_posted)\n AND (poreject_vend_id=vend_id)\n AND (poreject_rjctcode_id=rjctcode_id)\n AND (poreject_itemsite_id=itemsite_id)\n AND (vend_id=&lt;? value(&quot;vend_id&quot;) ?>)\n AND (date(poreject_date) BETWEEN &lt;? value(&quot;startDate&quot;) ?> AND &lt;? value(&quot;endDate&quot;) ?>)\n&lt;? if exists(&quot;warehous_id&quot;) ?>\n AND (itemsite_warehous_id=&lt;? value(&quot;warehous_id&quot;) ?>)\n&lt;? endif ?>\n&lt;? if exists(&quot;agentUsername&quot;) ?>\n AND (poreject_agent_username=&lt;? value(&quot;agentUsername&quot;) ?>)\n&lt;? endif ?>\n )\nORDER BY poreject_date DESC;</sql>\n </querysource>\n <rpthead>\n  <height>236</height>\n  <label>\n   <rect>\n    <x>300</x>\n    <y>215</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>Vendor Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>155</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>Purch. Agent:</string>\n  </label>\n  <field>\n   <rect>\n    <x>95</x>\n    <y>135</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>warehouse</column>\n   </data>\n  </field>\n  <label>\n   <rect>\n    <x>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  <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>Rejected Material By Vendor</string>\n  </label>\n  <label>\n   <rect>\n    <x>215</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Date</string>\n  </label>\n  <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>580</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Reject Code</string>\n  </label>\n  <label>\n   <rect>\n    <x>442</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  <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>5</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>P/O #</string>\n  </label>\n  <label>\n   <rect>\n    <x>492</x>\n    <y>200</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Qty.</string>\n  </label>\n  <label>\n   <rect>\n    <x>60</x>\n    <y>200</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <string>Vendor</string>\n  </label>\n  <label>\n   <rect>\n    <x>300</x>\n    <y>200</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>Vendor Item Number</string>\n  </label>\n  <label>\n   <rect>\n    <x>442</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  <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>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  <label>\n   <rect>\n    <x>5</x>\n    <y>135</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  <field>\n   <rect>\n    <x>95</x>\n    <y>155</y>\n    <width>300</width>\n    <height>20</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>10</size>\n    <weight>bold</weight>\n   </font>\n   <left/>\n   <vcenter/>\n   <data>\n    <query>head</query>\n    <column>agentUsername</column>\n   </data>\n  </field>\n  <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 </rpthead>\n <pghead>\n  <firstpage/>\n  <height>6</height>\n </pghead>\n <pghead>\n  <height>41</height>\n  <label>\n   <rect>\n    <x>5</x>\n    <y>5</y>\n    <width>50</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>P/O #</string>\n  </label>\n  <label>\n   <rect>\n    <x>492</x>\n    <y>5</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Qty.</string>\n  </label>\n  <label>\n   <rect>\n    <x>300</x>\n    <y>5</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>Vendor Item Number</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>580</x>\n    <y>5</y>\n    <width>80</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <hcenter/>\n   <vcenter/>\n   <string>Reject Code</string>\n  </label>\n  <label>\n   <rect>\n    <x>60</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</string>\n  </label>\n  <label>\n   <rect>\n    <x>300</x>\n    <y>20</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>Vendor Description</string>\n  </label>\n  <label>\n   <rect>\n    <x>215</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 </pghead>\n <section>\n  <name>detail</name>\n  <detail>\n   <key>\n    <query>detail</query>\n   </key>\n   <height>36</height>\n   <field>\n    <rect>\n     <x>580</x>\n     <y>0</y>\n     <width>80</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <hcenter/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_rejectcode</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>492</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_qty</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>300</x>\n     <y>0</y>\n     <width>150</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>f_itemnum</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>60</x>\n     <y>0</y>\n     <width>150</width>\n     <height>15</height>\n    </rect>\n    <font>\n     <face>Arial</face>\n     <size>8</size>\n     <weight>bold</weight>\n    </font>\n    <left/>\n    <vcenter/>\n    <data>\n     <query>detail</query>\n     <column>vend_name</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>5</x>\n     <y>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>poreject_ponumber</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>300</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>f_itemdescrip</column>\n    </data>\n   </field>\n   <field>\n    <rect>\n     <x>215</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_date</column>\n    </data>\n   </field>\n   <line>\n    <xstart>5</xstart>\n    <ystart>30</ystart>\n    <xend>745</xend>\n    <yend>30</yend>\n    <weight>0</weight>\n   </line>\n  </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  <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  <label>\n   <rect>\n    <x>600</x>\n    <y>0</y>\n    <width>100</width>\n    <height>15</height>\n   </rect>\n   <font>\n    <face>Arial</face>\n    <size>8</size>\n    <weight>normal</weight>\n   </font>\n   <right/>\n   <vcenter/>\n   <string>Page:</string>\n  </label>\n </pgfoot>\n</report>\n		0	2015-10-01 17:14:33.361434
