<!DOCTYPE openRPTDef>
<report>
 <title>A/P Applications</title>
 <name>APApplications</name>
 <description></description>
 <grid>
  <snap/>
  <show/>
  <x>0.05</x>
  <y>0.05</y>
 </grid>
 <size>Letter</size>
 <portrait/>
 <topmargin>50</topmargin>
 <bottommargin>50</bottommargin>
 <rightmargin>50</rightmargin>
 <leftmargin>50</leftmargin>
 <querysource>
  <name>head</name>
  <sql>SELECT formatDate(&lt;? value("startDate") ?>, 'Earliest') AS startdate,
       formatDate(&lt;? value("endDate")   ?>, 'Latest')   AS enddate,
       &lt;? if exists("showChecks") ?>
         &lt;? if exists("showCreditMemos") ?>
           'Show Checks and Credit Memos'
         &lt;? else ?>
           'Show Checks'
         &lt;? endif ?>
       &lt;? elseif exists("showCreditMemos") ?>
          'Show Credit Memos'
       &lt;? else ?>
         ''
       &lt;? endif ?> AS f_show,
       &lt;? if exists("vend_id") ?>
         'Vendor:' AS f_label, vend_number AS f_value
       &lt;? elseif exists("vendtype_id") ?>
         'Vendor Type:' AS f_label, vendtype_code AS f_value
       &lt;? elseif exists("vendtype_pattern") ?>
         'Vendor Type matches:' AS f_label,
       &lt;? value("vendtype_pattern") ?> AS f_value
       &lt;? else ?>
         'Vendors:' AS f_label, 'All' AS f_value
       &lt;? endif ?>
&lt;? if exists("vend_id") ?>
  FROM vendinfo
  WHERE vend_id=&lt;? value("vend_id") ?>
&lt;? elseif exists("vendtype_id") ?>
  FROM vendtype
  WHERE vendtype_id=&lt;? value("vendtype_id")
&lt;? endif ?>
;</sql>
 </querysource>
 <querysource loadFromDb="true">
  <name>detail</name>
  <mqlgroup>apApplications</mqlgroup>
  <mqlname>detail</mqlname>
 </querysource>
 <rpthead>
  <height>146</height>
  <line>
   <xstart>5</xstart>
   <ystart>140</ystart>
   <xend>745</xend>
   <yend>140</yend>
   <weight>2</weight>
  </line>
  <field>
   <rect>
    <x>565</x>
    <y>63</y>
    <width>100</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>bold</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>head</query>
    <column>startdate</column>
   </data>
  </field>
  <label>
   <rect>
    <x>100</x>
    <y>125</y>
    <width>100</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>Vendor Name</string>
  </label>
  <label>
   <rect>
    <x>270</x>
    <y>5</y>
    <width>475</width>
    <height>40</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>18</size>
    <weight>bold</weight>
   </font>
   <right/>
   <vcenter/>
   <string>A/P Applications</string>
  </label>
  <field>
   <rect>
    <x>565</x>
    <y>83</y>
    <width>100</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>bold</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>head</query>
    <column>enddate</column>
   </data>
  </field>
  <label>
   <rect>
    <x>462</x>
    <y>63</y>
    <width>100</width>
    <height>18</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <string>Start Date:</string>
  </label>
  <label>
   <rect>
    <x>291</x>
    <y>125</y>
    <width>159</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>Source Document</string>
  </label>
  <label>
   <rect>
    <x>700</x>
    <y>125</y>
    <width>45</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>Currency</string>
  </label>
  <field>
   <rect>
    <x>10</x>
    <y>63</y>
    <width>139</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <data>
    <query>head</query>
    <column>f_label</column>
   </data>
  </field>
  <field>
   <rect>
    <x>159</x>
    <y>83</y>
    <width>350</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>bold</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>head</query>
    <column>f_show</column>
   </data>
  </field>
  <label>
   <rect>
    <x>630</x>
    <y>125</y>
    <width>55</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>Amount</string>
  </label>
  <label>
   <rect>
    <x>465</x>
    <y>125</y>
    <width>141</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>Apply To Document</string>
  </label>
  <label>
   <rect>
    <x>200</x>
    <y>125</y>
    <width>80</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>Date</string>
  </label>
  <label>
   <rect>
    <x>5</x>
    <y>125</y>
    <width>80</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>Vendor #</string>
  </label>
  <field>
   <rect>
    <x>157</x>
    <y>63</y>
    <width>300</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>bold</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>head</query>
    <column>f_value</column>
   </data>
  </field>
  <label>
   <rect>
    <x>462</x>
    <y>83</y>
    <width>100</width>
    <height>18</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <string>End Date:</string>
  </label>
 </rpthead>
 <pghead>
  <firstpage/>
  <height>6</height>
 </pghead>
 <pghead>
  <height>26</height>
  <label>
   <rect>
    <x>5</x>
    <y>5</y>
    <width>80</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>Vendor #</string>
  </label>
  <label>
   <rect>
    <x>100</x>
    <y>5</y>
    <width>100</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>Vendor Name</string>
  </label>
  <label>
   <rect>
    <x>462</x>
    <y>5</y>
    <width>150</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>Apply To Document</string>
  </label>
  <label>
   <rect>
    <x>635</x>
    <y>5</y>
    <width>55</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>Amount</string>
  </label>
  <label>
   <rect>
    <x>291</x>
    <y>5</y>
    <width>164</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>Source Document</string>
  </label>
  <label>
   <rect>
    <x>200</x>
    <y>5</y>
    <width>80</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>Date</string>
  </label>
  <label>
   <rect>
    <x>705</x>
    <y>5</y>
    <width>45</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>Currency</string>
  </label>
  <line>
   <xstart>5</xstart>
   <ystart>20</ystart>
   <xend>745</xend>
   <yend>20</yend>
   <weight>2</weight>
  </line>
 </pghead>
 <section>
  <name>detail</name>
  <detail>
   <key>
    <query>detail</query>
   </key>
   <height>16</height>
   <field>
    <rect>
     <x>5</x>
     <y>0</y>
     <width>80</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>8</size>
     <weight>bold</weight>
    </font>
    <left/>
    <vcenter/>
    <data>
     <query>detail</query>
     <column>vend_number</column>
    </data>
   </field>
   <field>
    <rect>
     <x>620</x>
     <y>0</y>
     <width>65</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>8</size>
     <weight>bold</weight>
    </font>
    <right/>
    <vcenter/>
    <data>
     <query>detail</query>
     <column>f_amount</column>
    </data>
   </field>
   <field>
    <rect>
     <x>200</x>
     <y>0</y>
     <width>81</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>8</size>
     <weight>bold</weight>
    </font>
    <hcenter/>
    <vcenter/>
    <data>
     <query>detail</query>
     <column>f_postdate</column>
    </data>
   </field>
   <field>
    <rect>
     <x>500</x>
     <y>0</y>
     <width>110</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>8</size>
     <weight>bold</weight>
    </font>
    <hcenter/>
    <vcenter/>
    <data>
     <query>detail</query>
     <column>apapply_target_docnumber</column>
    </data>
   </field>
   <field>
    <rect>
     <x>700</x>
     <y>0</y>
     <width>45</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>8</size>
     <weight>bold</weight>
    </font>
    <hcenter/>
    <vcenter/>
    <data>
     <query>detail</query>
     <column>currAbbr</column>
    </data>
   </field>
   <field>
    <rect>
     <x>340</x>
     <y>0</y>
     <width>110</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>8</size>
     <weight>bold</weight>
    </font>
    <hcenter/>
    <vcenter/>
    <data>
     <query>detail</query>
     <column>apapply_source_docnumber</column>
    </data>
   </field>
   <field>
    <rect>
     <x>90</x>
     <y>0</y>
     <width>115</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>8</size>
     <weight>bold</weight>
    </font>
    <left/>
    <vcenter/>
    <data>
     <query>detail</query>
     <column>vend_name</column>
    </data>
   </field>
   <field>
    <rect>
     <x>291</x>
     <y>0</y>
     <width>40</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>8</size>
     <weight>normal</weight>
    </font>
    <right/>
    <vcenter/>
    <data>
     <query>detail</query>
     <column>apapply_source_doctype_qtdisplayrole</column>
    </data>
   </field>
   <field>
    <rect>
     <x>460</x>
     <y>0</y>
     <width>40</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>8</size>
     <weight>normal</weight>
    </font>
    <right/>
    <vcenter/>
    <data>
     <query>detail</query>
     <column>apapply_target_doctype_qtdisplayrole</column>
    </data>
   </field>
  </detail>
 </section>
 <pgfoot>
  <height>16</height>
  <label>
   <rect>
    <x>600</x>
    <y>0</y>
    <width>100</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <string>Page:</string>
  </label>
  <field>
   <rect>
    <x>104</x>
    <y>0</y>
    <width>100</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>bold</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>Context Query</query>
    <column>report_date</column>
   </data>
  </field>
  <label>
   <rect>
    <x>0</x>
    <y>0</y>
    <width>100</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <string>Report Date:</string>
  </label>
  <field>
   <rect>
    <x>705</x>
    <y>0</y>
    <width>40</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>bold</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>Context Query</query>
    <column>page_number</column>
   </data>
  </field>
 </pgfoot>
 <rptfoot>
  <height>16</height>
  <field>
   <rect>
    <x>585</x>
    <y>0</y>
    <width>100</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>bold</weight>
   </font>
   <right/>
   <vcenter/>
   <data>
    <query>detail</query>
    <column>base_applied</column>
   </data>
   <format builtin="true">money</format>
   <tracktotal/>
  </field>
  <label>
   <rect>
    <x>430</x>
    <y>0</y>
    <width>150</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <string>Total Applications (base):</string>
  </label>
 </rptfoot>
</report>
