<!DOCTYPE openRPTDef>
<report>
 <title>Currency Exchange Rates</title>
 <name>CurrencyConversionList</name>
 <description></description>
 <size>Letter</size>
 <portrait/>
 <topmargin>100</topmargin>
 <bottommargin>100</bottommargin>
 <rightmargin>100</rightmargin>
 <leftmargin>100</leftmargin>
 <querysource loadFromDb="true" >
  <name>exchangeRates</name>
  <mqlgroup>currencyConversions</mqlgroup>
  <mqlname>detail</mqlname>
 </querysource>
 <querysource>
  <name>baseCurrency</name>
  <sql>SELECT
	curr_name,
	currConcat(curr_id) AS currConcat
FROM curr_symbol
WHERE curr_base = TRUE;</sql>
 </querysource>
 <querysource>
  <name>knownCurrencies</name>
  <sql>SELECT
	curr_name,
	currConcat(curr_id) AS currConcat,
	curr_base
FROM curr_symbol
WHERE curr_base = FALSE
ORDER BY currConcat;</sql>
 </querysource>
 <rpthead>
  <height>113</height>
  <label>
   <rect>
    <x>35</x>
    <y>0</y>
    <width>575</width>
    <height>41</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>18</size>
    <weight>bold</weight>
   </font>
   <hcenter/>
   <vcenter/>
   <string>Currency Exchange Rates</string>
  </label>
  <field>
   <rect>
    <x>0</x>
    <y>60</y>
    <width>151</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <left/>
   <top/>
   <data>
    <query>baseCurrency</query>
    <column>curr_name</column>
   </data>
  </field>
  <label>
   <rect>
    <x>0</x>
    <y>40</y>
    <width>140</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>bold</weight>
   </font>
   <left/>
   <top/>
   <string>Base Currency:</string>
  </label>
  <label>
   <rect>
    <x>0</x>
    <y>90</y>
    <width>140</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>bold</weight>
   </font>
   <left/>
   <top/>
   <string>Foreign Currencies:</string>
  </label>
  <field>
   <rect>
    <x>150</x>
    <y>60</y>
    <width>116</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <left/>
   <top/>
   <data>
    <query>baseCurrency</query>
    <column>currConcat</column>
   </data>
  </field>
 </rpthead>
 <section>
  <name>Known Currencies</name>
  <group>
   <name>Known</name>
   <column>curr_base</column>
   <foot>
    <height>61</height>
    <label>
     <rect>
      <x>250</x>
      <y>30</y>
      <width>37</width>
      <height>15</height>
     </rect>
     <font>
      <face>Arial</face>
      <size>10</size>
      <weight>bold</weight>
     </font>
     <left/>
     <top/>
     <string>Start</string>
    </label>
    <label>
     <rect>
      <x>350</x>
      <y>30</y>
      <width>37</width>
      <height>15</height>
     </rect>
     <font>
      <face>Arial</face>
      <size>10</size>
      <weight>bold</weight>
     </font>
     <left/>
     <top/>
     <string>End</string>
    </label>
    <label>
     <rect>
      <x>0</x>
      <y>30</y>
      <width>80</width>
      <height>15</height>
     </rect>
     <font>
      <face>Arial</face>
      <size>10</size>
      <weight>bold</weight>
     </font>
     <left/>
     <top/>
     <string>Currency</string>
    </label>
    <label>
     <rect>
      <x>100</x>
      <y>30</y>
      <width>110</width>
      <height>15</height>
     </rect>
     <font>
      <face>Arial</face>
      <size>10</size>
      <weight>bold</weight>
     </font>
     <left/>
     <top/>
     <string>Exchange Rate</string>
    </label>
    <line>
     <xstart>0</xstart>
     <ystart>50</ystart>
     <xend>407</xend>
     <yend>50</yend>
     <weight>2</weight>
    </line>
   </foot>
  </group>
  <detail>
   <key>
    <query>knownCurrencies</query>
   </key>
   <height>21</height>
   <field>
    <rect>
     <x>150</x>
     <y>0</y>
     <width>126</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>10</size>
     <weight>normal</weight>
    </font>
    <left/>
    <top/>
    <data>
     <query>knownCurrencies</query>
     <column>currConcat</column>
    </data>
   </field>
   <field>
    <rect>
     <x>0</x>
     <y>0</y>
     <width>150</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>10</size>
     <weight>normal</weight>
    </font>
    <left/>
    <top/>
    <data>
     <query>knownCurrencies</query>
     <column>curr_name</column>
    </data>
   </field>
  </detail>
 </section>
 <section>
  <name>Exchange Rates</name>
  <group>
   <name>By Currency</name>
   <column>currConcat</column>
   <foot>
    <height>21</height>
    <line>
     <xstart>409</xstart>
     <ystart>10</ystart>
     <xend>5</xend>
     <yend>10</yend>
     <weight>0</weight>
    </line>
   </foot>
  </group>
  <detail>
   <key>
    <query>exchangeRates</query>
   </key>
   <height>21</height>
   <field>
    <rect>
     <x>0</x>
     <y>0</y>
     <width>96</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>10</size>
     <weight>normal</weight>
    </font>
    <left/>
    <top/>
    <data>
     <query>exchangeRates</query>
     <column>f_curr</column>
    </data>
   </field>
   <field>
    <rect>
     <x>330</x>
     <y>0</y>
     <width>80</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>10</size>
     <weight>normal</weight>
    </font>
    <left/>
    <top/>
    <data>
     <query>exchangeRates</query>
     <column>curr_expires</column>
    </data>
   </field>
   <field>
    <rect>
     <x>90</x>
     <y>0</y>
     <width>120</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>10</size>
     <weight>normal</weight>
    </font>
    <right/>
    <top/>
    <data>
     <query>exchangeRates</query>
     <column>rate</column>
    </data>
   </field>
   <field>
    <rect>
     <x>230</x>
     <y>0</y>
     <width>90</width>
     <height>15</height>
    </rect>
    <font>
     <face>Arial</face>
     <size>10</size>
     <weight>normal</weight>
    </font>
    <left/>
    <top/>
    <data>
     <query>exchangeRates</query>
     <column>curr_effective</column>
    </data>
   </field>
  </detail>
 </section>
 <pgfoot>
  <height>31</height>
  <field>
   <rect>
    <x>100</x>
    <y>10</y>
    <width>120</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <left/>
   <top/>
   <data>
    <query>Context Query</query>
    <column>report_date</column>
   </data>
  </field>
  <label>
   <rect>
    <x>20</x>
    <y>10</y>
    <width>80</width>
    <height>15</height>
   </rect>
   <font>
    <face>Arial</face>
    <size>10</size>
    <weight>normal</weight>
   </font>
   <left/>
   <top/>
   <string>Report Date:</string>
  </label>
 </pgfoot>
</report>
