<!DOCTYPE openRPTDef>
<report>
 <title>Warehouse Master List</title>
 <name>WarehouseMasterList</name>
 <description></description>
 <size>Letter</size>
 <portrait/>
 <topmargin>50</topmargin>
 <bottommargin>50</bottommargin>
 <rightmargin>50</rightmargin>
 <leftmargin>50</leftmargin>
 <querysource>
  <name>detail</name>
  <sql>SELECT warehous_code,
       formatBoolYN(warehous_active) AS f_active,
       warehous_descrip,
       addr_line1 AS warehous_addr1,
       addr_line2 AS warehous_addr2,
       addr_line3 AS warehous_addr3,
       (addr_city || ',' || addr_state || ' ' || addr_postalcode) AS warehous_addr4,
       warehous_fob,
       warehous_bol_prefix,
       warehous_bol_number,
       formatBoolYN(warehous_shipping) AS f_shipping,
       warehous_counttag_prefix,
       warehous_counttag_number,
       formatBoolYN(warehous_useslips) as f_useslips
  FROM site() JOIN addr ON (addr_id=warehous_addr_id)
LEFT OUTER JOIN sitetype ON (sitetype_id=warehous_sitetype_id) 
WHERE ((TRUE)
&lt;? if not exists("showInactive") ?>
  AND (warehous_active) 
&lt;? endif ?>
) ORDER BY warehous_code;</sql>
 </querysource>
 <querysource>
  <name>head</name>
  <sql>SELECT &lt;? if exists("showInactive") ?>
         text('Showing Active and Inactive Warehouses')
       &lt;? else ?>
         text('Showing Active Warehouses')
       &lt;? endif ?>
       AS f_show;</sql>
 </querysource>
 <rpthead>
  <height>61</height>
  <line>
   <xstart>5</xstart>
   <ystart>55</ystart>
   <xend>745</xend>
   <yend>55</yend>
   <weight>2</weight>
  </line>
  <field>
   <rect>
    <x>10</x>
    <y>40</y>
    <width>450</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>bold</weight>
   </font>
   <left/>
   <vcenter/>
   <data>
    <query>head</query>
    <column>f_show</column>
   </data>
  </field>
  <label>
   <rect>
    <x>295</x>
    <y>10</y>
    <width>450</width>
    <height>37</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>18</size>
    <weight>bold</weight>
   </font>
   <right/>
   <vcenter/>
   <string>Warehouse Master List</string>
  </label>
 </rpthead>
 <section>
  <name>detail</name>
  <detail>
   <key>
    <query>detail</query>
   </key>
   <height>151</height>
   <field>
    <rect>
     <x>615</x>
     <y>110</y>
     <width>75</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>8</size>
     <weight>bold</weight>
    </font>
    <hcenter/>
    <vcenter/>
    <data>
     <query>detail</query>
     <column>f_shipping</column>
    </data>
   </field>
   <line>
    <xstart>5</xstart>
    <ystart>145</ystart>
    <xend>745</xend>
    <yend>145</yend>
    <weight>0</weight>
   </line>
   <field>
    <rect>
     <x>120</x>
     <y>5</y>
     <width>50</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>8</size>
     <weight>bold</weight>
    </font>
    <hcenter/>
    <vcenter/>
    <data>
     <query>detail</query>
     <column>warehous_code</column>
    </data>
   </field>
   <field>
    <rect>
     <x>295</x>
     <y>90</y>
     <width>450</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>8</size>
     <weight>bold</weight>
    </font>
    <left/>
    <vcenter/>
    <data>
     <query>detail</query>
     <column>warehous_fob</column>
    </data>
   </field>
   <field>
    <rect>
     <x>350</x>
     <y>110</y>
     <width>100</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>8</size>
     <weight>bold</weight>
    </font>
    <left/>
    <vcenter/>
    <data>
     <query>detail</query>
     <column>warehous_bol_number</column>
    </data>
   </field>
   <field>
    <rect>
     <x>120</x>
     <y>25</y>
     <width>50</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>8</size>
     <weight>bold</weight>
    </font>
    <hcenter/>
    <vcenter/>
    <data>
     <query>detail</query>
     <column>f_active</column>
    </data>
   </field>
   <field>
    <rect>
     <x>295</x>
     <y>5</y>
     <width>450</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>8</size>
     <weight>bold</weight>
    </font>
    <left/>
    <vcenter/>
    <data>
     <query>detail</query>
     <column>warehous_descrip</column>
    </data>
   </field>
   <field>
    <rect>
     <x>295</x>
     <y>110</y>
     <width>50</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>8</size>
     <weight>bold</weight>
    </font>
    <right/>
    <vcenter/>
    <data>
     <query>detail</query>
     <column>warehous_bol_prefix</column>
    </data>
   </field>
   <label>
    <rect>
     <x>457</x>
     <y>125</y>
     <width>150</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>8</size>
     <weight>normal</weight>
    </font>
    <right/>
    <vcenter/>
    <string>Force the use of Count Slips:</string>
   </label>
   <label>
    <rect>
     <x>180</x>
     <y>110</y>
     <width>110</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>8</size>
     <weight>normal</weight>
    </font>
    <right/>
    <vcenter/>
    <string>Next Bill of Lading #:</string>
   </label>
   <field>
    <rect>
     <x>295</x>
     <y>125</y>
     <width>50</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>8</size>
     <weight>bold</weight>
    </font>
    <right/>
    <vcenter/>
    <data>
     <query>detail</query>
     <column>warehous_counttag_prefix</column>
    </data>
   </field>
   <label>
    <rect>
     <x>180</x>
     <y>125</y>
     <width>110</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>8</size>
     <weight>normal</weight>
    </font>
    <right/>
    <vcenter/>
    <string>Next Count Tag #:</string>
   </label>
   <field>
    <rect>
     <x>295</x>
     <y>70</y>
     <width>450</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>8</size>
     <weight>bold</weight>
    </font>
    <left/>
    <vcenter/>
    <data>
     <query>detail</query>
     <column>warehous_addr4</column>
    </data>
   </field>
   <label>
    <rect>
     <x>215</x>
     <y>5</y>
     <width>75</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>8</size>
     <weight>normal</weight>
    </font>
    <right/>
    <vcenter/>
    <string>Description:</string>
   </label>
   <line>
    <xstart>350</xstart>
    <ystart>140</ystart>
    <xend>450</xend>
    <yend>140</yend>
    <weight>0</weight>
   </line>
   <label>
    <rect>
     <x>65</x>
     <y>25</y>
     <width>50</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>8</size>
     <weight>normal</weight>
    </font>
    <right/>
    <vcenter/>
    <string>Active:</string>
   </label>
   <line>
    <xstart>295</xstart>
    <ystart>125</ystart>
    <xend>345</xend>
    <yend>125</yend>
    <weight>0</weight>
   </line>
   <label>
    <rect>
     <x>202</x>
     <y>90</y>
     <width>85</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>8</size>
     <weight>normal</weight>
    </font>
    <right/>
    <vcenter/>
    <string>Default F.O.B.:</string>
   </label>
   <label>
    <rect>
     <x>215</x>
     <y>25</y>
     <width>75</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>8</size>
     <weight>normal</weight>
    </font>
    <right/>
    <vcenter/>
    <string>Address:</string>
   </label>
   <field>
    <rect>
     <x>350</x>
     <y>125</y>
     <width>100</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>8</size>
     <weight>bold</weight>
    </font>
    <left/>
    <vcenter/>
    <data>
     <query>detail</query>
     <column>warehous_counttag_number</column>
    </data>
   </field>
   <line>
    <xstart>350</xstart>
    <ystart>125</ystart>
    <xend>450</xend>
    <yend>125</yend>
    <weight>0</weight>
   </line>
   <field>
    <rect>
     <x>295</x>
     <y>25</y>
     <width>450</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>8</size>
     <weight>bold</weight>
    </font>
    <left/>
    <vcenter/>
    <data>
     <query>detail</query>
     <column>warehous_addr1</column>
    </data>
   </field>
   <label>
    <rect>
     <x>65</x>
     <y>5</y>
     <width>50</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>8</size>
     <weight>normal</weight>
    </font>
    <right/>
    <vcenter/>
    <string>Code:</string>
   </label>
   <field>
    <rect>
     <x>615</x>
     <y>125</y>
     <width>75</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>8</size>
     <weight>bold</weight>
    </font>
    <hcenter/>
    <vcenter/>
    <data>
     <query>detail</query>
     <column>f_useslips</column>
    </data>
   </field>
   <field>
    <rect>
     <x>295</x>
     <y>55</y>
     <width>450</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>8</size>
     <weight>bold</weight>
    </font>
    <left/>
    <vcenter/>
    <data>
     <query>detail</query>
     <column>warehous_addr3</column>
    </data>
   </field>
   <label>
    <rect>
     <x>507</x>
     <y>110</y>
     <width>100</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>8</size>
     <weight>normal</weight>
    </font>
    <right/>
    <vcenter/>
    <string>Shipping Whs.:</string>
   </label>
   <field>
    <rect>
     <x>295</x>
     <y>40</y>
     <width>450</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>8</size>
     <weight>bold</weight>
    </font>
    <left/>
    <vcenter/>
    <data>
     <query>detail</query>
     <column>warehous_addr2</column>
    </data>
   </field>
   <line>
    <xstart>295</xstart>
    <ystart>140</ystart>
    <xend>345</xend>
    <yend>140</yend>
    <weight>0</weight>
   </line>
  </detail>
 </section>
 <pgfoot>
  <height>16</height>
  <label>
   <rect>
    <x>615</x>
    <y>0</y>
    <width>85</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <string>Page:</string>
  </label>
  <label>
   <rect>
    <x>5</x>
    <y>0</y>
    <width>85</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>
  <field>
   <rect>
    <x>95</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>
 </pgfoot>
</report>
