<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE lire:report-spec PUBLIC
  "-//LogReport.ORG//DTD Lire Report Specification Markup Language V2.0//EN"
  "http://www.logreport.org/LRSML/2.0/lrsml.dtd">
<lire:report-spec xmlns:lire="http://www.logreport.org/LRSML/"
 superservice="dialup" id="cost-by-period" charttype="bars">

 <lire:title>Cost By Period Dialup Report</lire:title>
 <lire:description>
  <para>This report lists the total cost by period.</para>
 </lire:description>

 <lire:param-spec>
  <lire:param name="period" type="duration" default="1d">
   <lire:description>
    <para>This parameter controls the time period over which the
     total cost is aggregated.
    </para>
   </lire:description>
  </lire:param>
 </lire:param-spec>

 <lire:display-spec>
  <lire:title>Cost By $period Period</lire:title>
 </lire:display-spec>

 <lire:filter-spec>
  <!-- inbound connections do not cost anything -->
  <lire:eq arg1="$direction" arg2="outbound"/>
 </lire:filter-spec>

 <lire:report-calc-spec>
  <lire:group sort="-cost_period">
   <lire:field name="cost_currency"/>
   <lire:timegroup period="$period" label="Period">
    <lire:sum name="cost_period" field="cost" label="Costs"/>
    <lire:sum name="cost_period_ratio" ratio="group" field="cost" label="% Total for Currency"/>
   </lire:timegroup>
  </lire:group>
 </lire:report-calc-spec>

</lire:report-spec>
