<!DOCTYPE openRPTDef>
<report>
 <title>Warehouse Location Master List</title>
 <name>WarehouseLocationMasterList</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 || ' ' || location_name) AS whs_bin,
       warehous_code,
       formatLocationName(location_id) AS locationname,
       location_descrip,
       formatBoolYN(location_netable) AS f_netable,
       formatBoolYN(location_restrict) AS f_restrict,
       item_number,
       (item_descrip1 || ' ' || item_descrip2) AS itemdesc
  FROM location LEFT OUTER JOIN
       (SELECT locitem_location_id,
               item_number,
               item_descrip1,
               item_descrip2
          FROM locitem, item
         WHERE locitem_item_id=item_id) AS itemlocation
       ON (locitem_location_id=location_id and location_restrict=true), whsinfo
 WHERE ((location_warehous_id=warehous_id)
&lt;? if exists("warehous_id") ?>
   AND (warehous_id=&lt;? value("warehous_id") ?>)
&lt;? endif ?>
) ORDER BY warehous_code, location_name;</sql>
 </querysource>
 <querysource>
  <name>head</name>
  <sql>SELECT &lt;? if exists("warehous_id") ?>
         text('Warehouse:') AS f_text,
         ( SELECT warehous_code
             FROM whsinfo
            WHERE (warehous_id=&lt;? value("warehous_id") ?>) ) AS f_value
       &lt;? else ?>
         text('') AS f_text,
         text('') AS f_value
       &lt;? endif ?></sql>
 </querysource>
 <rpthead>
  <height>102</height>
  <label>
   <rect>
    <x>5</x>
    <y>85</y>
    <width>50</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>Whs.</string>
  </label>
  <field>
   <rect>
    <x>30</x>
    <y>50</y>
    <width>100</width>
    <height>20</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <right/>
   <vcenter/>
   <data>
    <query>head</query>
    <column>f_text</column>
   </data>
  </field>
  <label>
   <rect>
    <x>290</x>
    <y>85</y>
    <width>100</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>Restricted Item</string>
  </label>
  <label>
   <rect>
    <x>55</x>
    <y>85</y>
    <width>100</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>Location</string>
  </label>
  <label>
   <rect>
    <x>395</x>
    <y>85</y>
    <width>75</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>Description:</string>
  </label>
  <label>
   <rect>
    <x>215</x>
    <y>85</y>
    <width>70</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>Restricted</string>
  </label>
  <label>
   <rect>
    <x>295</x>
    <y>10</y>
    <width>450</width>
    <height>38</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>18</size>
    <weight>bold</weight>
   </font>
   <right/>
   <vcenter/>
   <string>Warehouse Location Master List</string>
  </label>
  <field>
   <rect>
    <x>140</x>
    <y>50</y>
    <width>175</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>
  <line>
   <xstart>5</xstart>
   <ystart>100</ystart>
   <xend>745</xend>
   <yend>100</yend>
   <weight>2</weight>
  </line>
  <label>
   <rect>
    <x>170</x>
    <y>85</y>
    <width>50</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>Netable</string>
  </label>
 </rpthead>
 <pghead>
  <firstpage/>
  <height>6</height>
 </pghead>
 <pghead>
  <height>21</height>
  <label>
   <rect>
    <x>290</x>
    <y>0</y>
    <width>100</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>Restricted Item</string>
  </label>
  <label>
   <rect>
    <x>170</x>
    <y>0</y>
    <width>50</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>Netable</string>
  </label>
  <line>
   <xstart>5</xstart>
   <ystart>15</ystart>
   <xend>745</xend>
   <yend>15</yend>
   <weight>2</weight>
  </line>
  <label>
   <rect>
    <x>215</x>
    <y>0</y>
    <width>70</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>Restricted</string>
  </label>
  <label>
   <rect>
    <x>395</x>
    <y>0</y>
    <width>75</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>Description:</string>
  </label>
  <label>
   <rect>
    <x>55</x>
    <y>0</y>
    <width>100</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <left/>
   <vcenter/>
   <string>Location</string>
  </label>
  <label>
   <rect>
    <x>5</x>
    <y>0</y>
    <width>50</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>8</size>
    <weight>normal</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>Whs.</string>
  </label>
 </pghead>
 <section>
  <name>detail</name>
  <group>
   <name>detail</name>
   <column>locationname</column>
   <head>
    <height>21</height>
    <field>
     <rect>
      <x>225</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>f_restrict</column>
     </data>
    </field>
    <field>
     <rect>
      <x>5</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>
    <text>
     <rect>
      <x>395</x>
      <y>5</y>
      <width>350</width>
      <height>15</height>
     </rect>
     <bottompad>0</bottompad>
     <font>
      <face>Arial</face>
      <size>8</size>
      <weight>bold</weight>
     </font>
     <left/>
     <top/>
     <data>
      <query>detail</query>
      <column>location_descrip</column>
     </data>
    </text>
    <line>
     <xstart>5</xstart>
     <ystart>0</ystart>
     <xend>745</xend>
     <yend>0</yend>
     <weight>0</weight>
    </line>
    <field>
     <rect>
      <x>55</x>
      <y>5</y>
      <width>114</width>
      <height>15</height>
     </rect>
     <font>
      <face>Arial</face>
      <size>8</size>
      <weight>bold</weight>
     </font>
     <hcenter/>
     <vcenter/>
     <data>
      <query>detail</query>
      <column>locationname</column>
     </data>
    </field>
    <field>
     <rect>
      <x>170</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>f_netable</column>
     </data>
    </field>
   </head>
  </group>
  <detail>
   <key>
    <query>detail</query>
   </key>
   <height>18</height>
   <field>
    <rect>
     <x>290</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>detail</query>
     <column>item_number</column>
    </data>
   </field>
   <field>
    <rect>
     <x>395</x>
     <y>0</y>
     <width>350</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>8</size>
     <weight>bold</weight>
    </font>
    <left/>
    <vcenter/>
    <data>
     <query>detail</query>
     <column>itemdesc</column>
    </data>
   </field>
  </detail>
 </section>
 <pgfoot>
  <height>18</height>
  <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>
  <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>
  <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>
  <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>
