<?xml version="1.0" encoding="utf-8"?>
<Templates xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://gpsgate.com/xml/">
  <Template>
    <Object>
      <TemplateGuid>e3a8e5c6-5f66-4c15-a98a-ea7cccd9715f</TemplateGuid>
      <TemplateVersion>418</TemplateVersion>
      <ObjectType>GpsGate.Reporting.v3.QueryWriter</ObjectType>
      <ObjectData>
        <Query>
          <Name>EventProvider01</Name>
          <QueryText>SELECT data_time_stamp_start AS 'SamplingStart', data_time_stamp_end AS 'SamplingEnd', int_01 AS 'UserID', int_02 AS 'EventRuleID', txt_01 AS 'RuleName', txt_02 AS 'EventArgument', dbl_01 AS 'DistanceGps', dbl_02 AS 'DistanceOdo', dbl_03 AS 'DistanceTrimStart', txt_03 AS 'StartAddress', txt_04 AS 'StopAddress', txt_06 AS 'EventArgument01', txt_07 AS 'EventArgument02', txt_08 AS 'EventArgument03', txt_09 AS 'EventArgument04', txt_10 AS 'EventArgument05', txt_11 AS 'EventArgument06', txt_12 AS 'EventArgument07', txt_13 AS 'EventArgument08', txt_14 AS 'EventArgument09', txt_15 AS 'EventArgument10', txt_16 AS 'EventArgument11', txt_17 AS 'EventArgument12', txt_18 AS 'EventArgument13', txt_19 AS 'EventArgument14', txt_20 AS 'EventArgument15', txt_21 AS 'EventArgument16', txt_22 AS 'EventArgument17', txt_23 AS 'EventArgument18', txt_24 AS 'EventArgument19', txt_25 AS 'EventArgument20', txt_05 AS 'EventState' FROM reportv3_data_store LEFT JOIN reportv3_data_store_ext01 ON reportv3_data_store.report_data_store_id = reportv3_data_store_ext01.report_data_store_id WHERE report_data_provider_id = 2 AND application_id = [ApplicationID] AND data_time_stamp_end &gt;= [PeriodStart] AND data_time_stamp_start &lt;= [PeriodEnd]</QueryText>
          <IsInternal>False</IsInternal>
          <Type>GpsGate.Reporting.v3.ProviderQuery</Type>
          <Parameters>
            <Parameter>
              <type_name>GpsGate.Reporting.v3.QueryReportSqlParameter</type_name>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <param_name>ApplicationID</param_name>
              <multi>False</multi>
              <value_field>ApplicationID</value_field>
              <label_field>Name</label_field>
              <user_def_value>Applications</user_def_value>
              <data_type>System.Int32</data_type>
              <default_value></default_value>
            </Parameter>
            <Parameter>
              <type_name>GpsGate.Reporting.v3.PeriodReportSqlParameter</type_name>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <param_name>Period</param_name>
              <multi>False</multi>
              <data_type>System.DateTime</data_type>
              <default_value>-1</default_value>
            </Parameter>
          </Parameters>
        </Query>
      </ObjectData>
    </Object>
    <Object ReadOnly="True">
      <TemplateGuid>9a2af788-c680-4aa9-868a-494c092defd1</TemplateGuid>
      <TemplateVersion>104</TemplateVersion>
      <ObjectType>GpsGate.Reporting.v3.Provider.Event.EventRuleReportDataProvider</ObjectType>
      <ObjectData>
        <ReportDataProvider>
          <Name>EventProvider01</Name>
          <Description></Description>
          <Type>GpsGate.Reporting.v3.Provider.Event.EventRuleReportDataProvider</Type>
          <Resolutions>
            <Resolution>
              <type_name>GpsGate.Reporting.v3.Provider.Event.EventRuleResolution</type_name>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <res_data_field>EventRule</res_data_field>
              <res_data_field_type>GpsGate.Online.Event.EventExpressionEvaluator</res_data_field_type>
              <res_cust_data></res_cust_data>
            </Resolution>
          </Resolutions>
          <Columns>
            <Column>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <type_name>GpsGate.Reporting.v3.Provider.MinColumn</type_name>
              <col_name>SamplingStart</col_name>
              <col_description></col_description>
              <col_data_field>UTC</col_data_field>
              <col_data_field_type>System.DateTime</col_data_field_type>
              <col_data_store_slot>data_time_stamp_start</col_data_store_slot>
              <col_data_store_table>reportv3_data_store</col_data_store_table>
            </Column>
            <Column>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <type_name>GpsGate.Reporting.v3.Provider.MaxColumn</type_name>
              <col_name>SamplingEnd</col_name>
              <col_description></col_description>
              <col_data_field>UTC</col_data_field>
              <col_data_field_type>System.DateTime</col_data_field_type>
              <col_data_store_slot>data_time_stamp_end</col_data_store_slot>
              <col_data_store_table>reportv3_data_store</col_data_store_table>
            </Column>
            <Column>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <type_name>GpsGate.Reporting.v3.Provider.ValueColumn</type_name>
              <col_name>UserID</col_name>
              <col_description></col_description>
              <col_custom_data>Last</col_custom_data>
              <col_data_field>UserID</col_data_field>
              <col_data_field_type>System.Int32</col_data_field_type>
              <col_data_store_slot>int_01</col_data_store_slot>
              <col_data_store_table>reportv3_data_store</col_data_store_table>
            </Column>
            <Column>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <type_name>GpsGate.Reporting.v3.Provider.ValueColumn</type_name>
              <col_name>EventRuleID</col_name>
              <col_description></col_description>
              <col_custom_data>Last</col_custom_data>
              <col_data_field>EventRuleID</col_data_field>
              <col_data_field_type>System.Int32</col_data_field_type>
              <col_data_store_slot>int_02</col_data_store_slot>
              <col_data_store_table>reportv3_data_store</col_data_store_table>
            </Column>
            <Column>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <type_name>GpsGate.Reporting.v3.Provider.ValueColumn</type_name>
              <col_name>RuleName</col_name>
              <col_description></col_description>
              <col_custom_data>Last</col_custom_data>
              <col_data_field>EventRuleName</col_data_field>
              <col_data_field_type>System.String</col_data_field_type>
              <col_data_store_slot>txt_01</col_data_store_slot>
              <col_data_store_table>reportv3_data_store</col_data_store_table>
            </Column>
            <Column>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <type_name>GpsGate.Reporting.v3.Provider.ValueColumn</type_name>
              <col_name>EventArgument</col_name>
              <col_description></col_description>
              <col_custom_data>Last</col_custom_data>
              <col_data_field>EventArgument</col_data_field>
              <col_data_field_type>System.String</col_data_field_type>
              <col_data_store_slot>txt_02</col_data_store_slot>
              <col_data_store_table>reportv3_data_store</col_data_store_table>
            </Column>
            <Column>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <type_name>GpsGate.Reporting.v3.Provider.GpsDistanceColumn</type_name>
              <col_name>DistanceGps</col_name>
              <col_description></col_description>
              <col_custom_data></col_custom_data>
              <col_data_field>TrackPoint</col_data_field>
              <col_data_field_type>Franson.Geo.TrackPoint</col_data_field_type>
              <col_data_store_slot>dbl_01</col_data_store_slot>
              <col_data_store_table>reportv3_data_store</col_data_store_table>
            </Column>
            <Column>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <type_name>GpsGate.Reporting.v3.Provider.OdometerColumn</type_name>
              <col_name>DistanceOdo</col_name>
              <col_description></col_description>
              <col_custom_data></col_custom_data>
              <col_data_field>OdometerAcc</col_data_field>
              <col_data_field_type>System.Double</col_data_field_type>
              <col_data_store_slot>dbl_02</col_data_store_slot>
              <col_data_store_table>reportv3_data_store</col_data_store_table>
            </Column>
            <Column>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <type_name>GpsGate.Reporting.v3.Provider.DistanceTrimStartColumn</type_name>
              <col_name>DistanceTrimStart</col_name>
              <col_description></col_description>
              <col_custom_data></col_custom_data>
              <col_data_field>TrackPoint</col_data_field>
              <col_data_field_type>Franson.Geo.TrackPoint</col_data_field_type>
              <col_data_store_slot>dbl_03</col_data_store_slot>
              <col_data_store_table>reportv3_data_store</col_data_store_table>
            </Column>
            <Column>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <type_name>GpsGate.Reporting.v3.Provider.GeocoderColumn</type_name>
              <col_name>StartAddress</col_name>
              <col_description></col_description>
              <col_custom_data>Start</col_custom_data>
              <col_data_field>Address</col_data_field>
              <col_data_field_type>Franson.Geo.Location</col_data_field_type>
              <col_data_store_slot>txt_03</col_data_store_slot>
              <col_data_store_table>reportv3_data_store</col_data_store_table>
            </Column>
            <Column>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <type_name>GpsGate.Reporting.v3.Provider.GeocoderColumn</type_name>
              <col_name>StopAddress</col_name>
              <col_description></col_description>
              <col_custom_data>Stop</col_custom_data>
              <col_data_field>Address</col_data_field>
              <col_data_field_type>Franson.Geo.Location</col_data_field_type>
              <col_data_store_slot>txt_04</col_data_store_slot>
              <col_data_store_table>reportv3_data_store</col_data_store_table>
            </Column>
            <Column>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <type_name>GpsGate.Reporting.v3.Provider.ValueColumn</type_name>
              <col_name>EventArgument01</col_name>
              <col_description></col_description>
              <col_custom_data>Last</col_custom_data>
              <col_data_field>EventArgument1</col_data_field>
              <col_data_field_type>System.String</col_data_field_type>
              <col_data_store_slot>txt_06</col_data_store_slot>
              <col_data_store_table>reportv3_data_store_ext01</col_data_store_table>
            </Column>
            <Column>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <type_name>GpsGate.Reporting.v3.Provider.ValueColumn</type_name>
              <col_name>EventArgument02</col_name>
              <col_description></col_description>
              <col_custom_data>Last</col_custom_data>
              <col_data_field>EventArgument2</col_data_field>
              <col_data_field_type>System.String</col_data_field_type>
              <col_data_store_slot>txt_07</col_data_store_slot>
              <col_data_store_table>reportv3_data_store_ext01</col_data_store_table>
            </Column>
            <Column>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <type_name>GpsGate.Reporting.v3.Provider.ValueColumn</type_name>
              <col_name>EventArgument03</col_name>
              <col_description></col_description>
              <col_custom_data>Last</col_custom_data>
              <col_data_field>EventArgument3</col_data_field>
              <col_data_field_type>System.String</col_data_field_type>
              <col_data_store_slot>txt_08</col_data_store_slot>
              <col_data_store_table>reportv3_data_store_ext01</col_data_store_table>
            </Column>
            <Column>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <type_name>GpsGate.Reporting.v3.Provider.ValueColumn</type_name>
              <col_name>EventArgument04</col_name>
              <col_description></col_description>
              <col_custom_data>Last</col_custom_data>
              <col_data_field>EventArgument4</col_data_field>
              <col_data_field_type>System.String</col_data_field_type>
              <col_data_store_slot>txt_09</col_data_store_slot>
              <col_data_store_table>reportv3_data_store_ext01</col_data_store_table>
            </Column>
            <Column>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <type_name>GpsGate.Reporting.v3.Provider.ValueColumn</type_name>
              <col_name>EventArgument05</col_name>
              <col_description></col_description>
              <col_custom_data>Last</col_custom_data>
              <col_data_field>EventArgument5</col_data_field>
              <col_data_field_type>System.String</col_data_field_type>
              <col_data_store_slot>txt_10</col_data_store_slot>
              <col_data_store_table>reportv3_data_store_ext01</col_data_store_table>
            </Column>
            <Column>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <type_name>GpsGate.Reporting.v3.Provider.ValueColumn</type_name>
              <col_name>EventArgument06</col_name>
              <col_description></col_description>
              <col_custom_data>Last</col_custom_data>
              <col_data_field>EventArgument6</col_data_field>
              <col_data_field_type>System.String</col_data_field_type>
              <col_data_store_slot>txt_11</col_data_store_slot>
              <col_data_store_table>reportv3_data_store_ext01</col_data_store_table>
            </Column>
            <Column>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <type_name>GpsGate.Reporting.v3.Provider.ValueColumn</type_name>
              <col_name>EventArgument07</col_name>
              <col_description></col_description>
              <col_custom_data>Last</col_custom_data>
              <col_data_field>EventArgument7</col_data_field>
              <col_data_field_type>System.String</col_data_field_type>
              <col_data_store_slot>txt_12</col_data_store_slot>
              <col_data_store_table>reportv3_data_store_ext01</col_data_store_table>
            </Column>
            <Column>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <type_name>GpsGate.Reporting.v3.Provider.ValueColumn</type_name>
              <col_name>EventArgument08</col_name>
              <col_description></col_description>
              <col_custom_data>Last</col_custom_data>
              <col_data_field>EventArgument8</col_data_field>
              <col_data_field_type>System.String</col_data_field_type>
              <col_data_store_slot>txt_13</col_data_store_slot>
              <col_data_store_table>reportv3_data_store_ext01</col_data_store_table>
            </Column>
            <Column>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <type_name>GpsGate.Reporting.v3.Provider.ValueColumn</type_name>
              <col_name>EventArgument09</col_name>
              <col_description></col_description>
              <col_custom_data>Last</col_custom_data>
              <col_data_field>EventArgument9</col_data_field>
              <col_data_field_type>System.String</col_data_field_type>
              <col_data_store_slot>txt_14</col_data_store_slot>
              <col_data_store_table>reportv3_data_store_ext01</col_data_store_table>
            </Column>
            <Column>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <type_name>GpsGate.Reporting.v3.Provider.ValueColumn</type_name>
              <col_name>EventArgument10</col_name>
              <col_description></col_description>
              <col_custom_data>Last</col_custom_data>
              <col_data_field>EventArgument10</col_data_field>
              <col_data_field_type>System.String</col_data_field_type>
              <col_data_store_slot>txt_15</col_data_store_slot>
              <col_data_store_table>reportv3_data_store_ext01</col_data_store_table>
            </Column>
            <Column>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <type_name>GpsGate.Reporting.v3.Provider.ValueColumn</type_name>
              <col_name>EventArgument11</col_name>
              <col_description></col_description>
              <col_custom_data>Last</col_custom_data>
              <col_data_field>EventArgument11</col_data_field>
              <col_data_field_type>System.String</col_data_field_type>
              <col_data_store_slot>txt_16</col_data_store_slot>
              <col_data_store_table>reportv3_data_store_ext01</col_data_store_table>
            </Column>
            <Column>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <type_name>GpsGate.Reporting.v3.Provider.ValueColumn</type_name>
              <col_name>EventArgument12</col_name>
              <col_description></col_description>
              <col_custom_data>Last</col_custom_data>
              <col_data_field>EventArgument12</col_data_field>
              <col_data_field_type>System.String</col_data_field_type>
              <col_data_store_slot>txt_17</col_data_store_slot>
              <col_data_store_table>reportv3_data_store_ext01</col_data_store_table>
            </Column>
            <Column>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <type_name>GpsGate.Reporting.v3.Provider.ValueColumn</type_name>
              <col_name>EventArgument13</col_name>
              <col_description></col_description>
              <col_custom_data>Last</col_custom_data>
              <col_data_field>EventArgument13</col_data_field>
              <col_data_field_type>System.String</col_data_field_type>
              <col_data_store_slot>txt_18</col_data_store_slot>
              <col_data_store_table>reportv3_data_store_ext01</col_data_store_table>
            </Column>
            <Column>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <type_name>GpsGate.Reporting.v3.Provider.ValueColumn</type_name>
              <col_name>EventArgument14</col_name>
              <col_description></col_description>
              <col_custom_data>Last</col_custom_data>
              <col_data_field>EventArgument14</col_data_field>
              <col_data_field_type>System.String</col_data_field_type>
              <col_data_store_slot>txt_19</col_data_store_slot>
              <col_data_store_table>reportv3_data_store_ext01</col_data_store_table>
            </Column>
            <Column>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <type_name>GpsGate.Reporting.v3.Provider.ValueColumn</type_name>
              <col_name>EventArgument15</col_name>
              <col_description></col_description>
              <col_custom_data>Last</col_custom_data>
              <col_data_field>EventArgument15</col_data_field>
              <col_data_field_type>System.String</col_data_field_type>
              <col_data_store_slot>txt_20</col_data_store_slot>
              <col_data_store_table>reportv3_data_store_ext01</col_data_store_table>
            </Column>
            <Column>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <type_name>GpsGate.Reporting.v3.Provider.ValueColumn</type_name>
              <col_name>EventArgument16</col_name>
              <col_description></col_description>
              <col_custom_data>Last</col_custom_data>
              <col_data_field>EventArgument16</col_data_field>
              <col_data_field_type>System.String</col_data_field_type>
              <col_data_store_slot>txt_21</col_data_store_slot>
              <col_data_store_table>reportv3_data_store_ext01</col_data_store_table>
            </Column>
            <Column>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <type_name>GpsGate.Reporting.v3.Provider.ValueColumn</type_name>
              <col_name>EventArgument17</col_name>
              <col_description></col_description>
              <col_custom_data>Last</col_custom_data>
              <col_data_field>EventArgument17</col_data_field>
              <col_data_field_type>System.String</col_data_field_type>
              <col_data_store_slot>txt_22</col_data_store_slot>
              <col_data_store_table>reportv3_data_store_ext01</col_data_store_table>
            </Column>
            <Column>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <type_name>GpsGate.Reporting.v3.Provider.ValueColumn</type_name>
              <col_name>EventArgument18</col_name>
              <col_description></col_description>
              <col_custom_data>Last</col_custom_data>
              <col_data_field>EventArgument18</col_data_field>
              <col_data_field_type>System.String</col_data_field_type>
              <col_data_store_slot>txt_23</col_data_store_slot>
              <col_data_store_table>reportv3_data_store_ext01</col_data_store_table>
            </Column>
            <Column>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <type_name>GpsGate.Reporting.v3.Provider.ValueColumn</type_name>
              <col_name>EventArgument19</col_name>
              <col_description></col_description>
              <col_custom_data>Last</col_custom_data>
              <col_data_field>EventArgument19</col_data_field>
              <col_data_field_type>System.String</col_data_field_type>
              <col_data_store_slot>txt_24</col_data_store_slot>
              <col_data_store_table>reportv3_data_store_ext01</col_data_store_table>
            </Column>
            <Column>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <type_name>GpsGate.Reporting.v3.Provider.ValueColumn</type_name>
              <col_name>EventArgument20</col_name>
              <col_description></col_description>
              <col_custom_data>Last</col_custom_data>
              <col_data_field>EventArgument20</col_data_field>
              <col_data_field_type>System.String</col_data_field_type>
              <col_data_store_slot>txt_25</col_data_store_slot>
              <col_data_store_table>reportv3_data_store_ext01</col_data_store_table>
            </Column>
            <Column>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <type_name>GpsGate.Reporting.v3.Provider.ValueColumn</type_name>
              <col_name>EventState</col_name>
              <col_description></col_description>
              <col_custom_data>Last</col_custom_data>
              <col_data_field>EventState</col_data_field>
              <col_data_field_type>System.String</col_data_field_type>
              <col_data_store_slot>txt_05</col_data_store_slot>
              <col_data_store_table>reportv3_data_store</col_data_store_table>
            </Column>
          </Columns>
        </ReportDataProvider>
      </ObjectData>
    </Object>
  </Template>
  <Template>
    <Object>
      <TemplateGuid>0955df12-722e-4503-a337-628df3e448fb</TemplateGuid>
      <TemplateVersion>1</TemplateVersion>
      <ObjectType>GpsGate.Reporting.v3.ReportDefinitionWriter</ObjectType>
      <ObjectData>
        <ReportDefinition>
          <Name>FU1009 Fuel Refilled detailed (Tag)</Name>
          <ScopeID>2075b132-6410-48f8-a2fd-8f1a69488b05</ScopeID>
          <Description>Detailed Event Rule - Fuel Refilled, per Tag</Description>
          <AppTemplate>00000000-0000-0000-0000-000000000000</AppTemplate>
          <Query>e302d4fc-e678-40f0-8905-4a6a1f22832b</Query>
          <TableDefinition defaultStyles="false">
            <pageDefinition>
              <pageFormat>Auto</pageFormat>
              <columnWidths>
                <double>0</double>
                <double>0</double>
                <double>0</double>
                <double>0</double>
                <double>0</double>
                <double>0</double>
                <double>0</double>
                <double>0</double>
                <double>0</double>
                <double>0</double>
                <double>0</double>
              </columnWidths>
            </pageDefinition>
            <Columns />
            <Regions>
              <Region repeatHeader="false" pageBreak="false" expression="" level="0" sortExpression="[SamplingStart]" sortDirection="ASC">
                <Header kind="h">
                  <RegionRow id="h_0_0" VisibilityExpression="true">
                    <Column expression="Period start: " visibilityExpression="" action="" id="h_0_0_0" cspan="1" unit="SHORT_DATE" escape="true">
                      <Layout style="font-size:10pt;font-family:Arial, Helvetica, sans-serif;padding:4px 0px 4px 0px" />
                    </Column>
                    <Column expression="[PeriodStart]" visibilityExpression="" action="" id="h_0_0_1" cspan="9" unit="LONG_DATE" escape="true">
                      <Layout style="font-size:10pt;font-weight:bold;font-family:Arial, Helvetica, sans-serif;padding:4px 0px 4px 9px" />
                    </Column>
                  </RegionRow>
                  <RegionRow id="h_0_1" VisibilityExpression="true">
                    <Column expression="Period end: " visibilityExpression="" action="" id="h_0_1_0" cspan="1" unit="" escape="true">
                      <Layout style="font-size:10pt;font-family:Arial, Helvetica, sans-serif;padding:4px 0px 4px 0px" />
                    </Column>
                    <Column expression="[PeriodEnd]" visibilityExpression="" action="" id="h_0_1_1" cspan="9" unit="LONG_DATE" escape="true">
                      <Layout style="font-size:10pt;font-weight:bold;font-family:Arial, Helvetica, sans-serif;padding:4px 0px 4px 9px" />
                    </Column>
                  </RegionRow>
                  <RegionRow id="h_0_2" VisibilityExpression="true">
                    <Column expression="Total refills:" visibilityExpression="" action="" id="h_0_2_0" cspan="1" unit="" escape="true">
                      <Layout style="font-size:10pt;font-family:Arial, Helvetica, sans-serif;padding:4px 0px 4px 0px" />
                    </Column>
                    <Column expression="$count([Username])" visibilityExpression="" action="" id="h_0_2_1" cspan="9" unit="" escape="true">
                      <Layout style="font-size:10pt;font-weight:bold;font-family:Arial, Helvetica, sans-serif;padding:4px 0px 4px 9px" />
                    </Column>
                  </RegionRow>
                  <RegionRow id="h_0_3" VisibilityExpression="true">
                    <Column expression="Total vehicles:" visibilityExpression="" action="" id="h_0_3_0" cspan="1" unit="" escape="true">
                      <Layout style="font-size:10pt;font-family:Arial, Helvetica, sans-serif;padding:4px 0px 4px 0px" />
                    </Column>
                    <Column expression="$countunique([Username])" visibilityExpression="" action="" id="h_0_3_1" cspan="9" unit="" escape="true">
                      <Layout style="font-size:10pt;font-weight:bold;font-family:Arial, Helvetica, sans-serif;padding:4px 0px 4px 9px" />
                    </Column>
                  </RegionRow>
                </Header>
                <Item kind="i">
                  <RegionRow id="i_0_0" VisibilityExpression="true">
                    <Column expression="[SamplingStart]" visibilityExpression="" action="{&quot;name&quot;:&quot;Draw Track&quot;,&quot;action&quot;:&quot;drawTrack&quot;,&quot;trigger&quot;:&quot;onclick&quot;,&quot;params&quot;:[&quot;[UserID]&quot;,&quot;[SamplingStart]&quot;,&quot;[SamplingEnd]&quot;]}" id="i_0_0_0" cspan="1" unit="SHORT_DATE" escape="true">
                      <Layout style="font-size:10pt;font-family:Arial, Helvetica, sans-serif;border:solid #DDDDDD;border-width:0px 0px 1px 0px;padding:9px 9px 9px 9px" />
                    </Column>
                    <Column expression="[SamplingStart]" visibilityExpression="" action="" id="i_0_0_1" cspan="1" unit="SHORT_TIME" escape="true">
                      <Layout style="font-size:10pt;font-family:Arial, Helvetica, sans-serif;border:solid #DDDDDD;border-width:0px 0px 1px 0px;padding:9px 9px 9px 9px" />
                    </Column>
                    <Column expression="[StartAddress]" visibilityExpression="" action="{&quot;name&quot;:&quot;Show Marker&quot;,&quot;action&quot;:&quot;showMarker&quot;,&quot;trigger&quot;:&quot;onclick&quot;,&quot;params&quot;:[&quot;[UserID]&quot;,&quot;[SamplingStart]&quot;]}" id="i_0_0_2" cspan="1" unit="FULL_DATE_TIME" escape="true">
                      <Layout style="font-size:10pt;font-family:Arial, Helvetica, sans-serif;border:solid #DDDDDD;border-width:0px 0px 1px 0px;padding:9px 9px 9px 9px" />
                    </Column>
                    <Column expression="[EventArgument]" visibilityExpression="$Math.Eval('$EventArgumentName(0, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="i_0_0_3" cspan="1" unit="SIGNAL_FUEL_LEVEL" escape="true">
                      <Layout style="font-size:10pt;font-family:Arial, Helvetica, sans-serif;border:solid #DDDDDD;border-width:0px 0px 1px 0px;padding:9px 9px 9px 9px" />
                    </Column>
                    <Column expression="[EventArgument01]" visibilityExpression="$Math.Eval('$EventArgumentName(1, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="i_0_0_4" cspan="1" unit="SIGNAL_FUEL_LEVEL" escape="true">
                      <Layout style="font-size:10pt;font-family:Arial, Helvetica, sans-serif;border:solid #DDDDDD;border-width:0px 0px 1px 0px;padding:9px 9px 9px 9px" />
                    </Column>
                    <Column expression="[EventArgument02]" visibilityExpression="$Math.Eval('$EventArgumentName(2, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="i_0_0_5" cspan="1" unit="SIGNAL_FUEL_LEVEL" escape="true">
                      <Layout style="font-size:10pt;font-family:Arial, Helvetica, sans-serif;border:solid #DDDDDD;border-width:0px 0px 1px 0px;padding:9px 9px 9px 9px" />
                    </Column>
                    <Column expression="[EventArgument03]" visibilityExpression="$Math.Eval('$EventArgumentName(3, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="i_0_0_6" cspan="1" unit="" escape="true">
                      <Layout style="font-size:10pt;font-family:Arial, Helvetica, sans-serif;border:solid #DDDDDD;border-width:0px 0px 1px 0px;padding:9px 9px 9px 9px" />
                    </Column>
                    <Column expression="[EventArgument04]" visibilityExpression="$Math.Eval('$EventArgumentName(4, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="i_0_0_7" cspan="1" unit="" escape="true">
                      <Layout style="font-size:10pt;font-family:Arial, Helvetica, sans-serif;border:solid #DDDDDD;border-width:0px 0px 1px 0px;padding:9px 9px 9px 9px" />
                    </Column>
                    <Column expression="[EventArgument05]" visibilityExpression="$Math.Eval('$EventArgumentName(5, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="i_0_0_8" cspan="1" unit="" escape="true">
                      <Layout style="font-size:10pt;font-family:Arial, Helvetica, sans-serif;border:solid #DDDDDD;border-width:0px 0px 1px 0px;padding:9px 9px 9px 9px" />
                    </Column>
                    <Column expression="[EventArgument06]" visibilityExpression="$Math.Eval('$EventArgumentName(6, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="i_0_0_9" cspan="1" unit="" escape="true">
                      <Layout style="font-size:10pt;font-family:Arial, Helvetica, sans-serif;border:solid #DDDDDD;border-width:0px 0px 1px 0px;padding:9px 9px 9px 9px" />
                    </Column>
                  </RegionRow>
                </Item>
                <Footer kind="f">
                  <RegionRow id="f_0_0" VisibilityExpression="true">
                    <Column expression="" visibilityExpression="" action="" id="f_0_0_0" cspan="1" escape="true">
                      <Layout style="" />
                    </Column>
                    <Column expression="" visibilityExpression="" action="" id="f_0_0_1" cspan="1" unit="" escape="true">
                      <Layout style="" />
                    </Column>
                    <Column expression="" visibilityExpression="" action="" id="f_0_0_2" cspan="1" escape="true">
                      <Layout style="" />
                    </Column>
                    <Column expression="" visibilityExpression="$Math.Eval('$EventArgumentName(0, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="f_0_0_3" cspan="1" unit="" escape="true">
                      <Layout style="width:0%" />
                    </Column>
                    <Column expression="" visibilityExpression="$Math.Eval('$EventArgumentName(1, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="f_0_0_4" cspan="1" unit="" escape="true">
                      <Layout style="width:0%" />
                    </Column>
                    <Column expression="" visibilityExpression="$Math.Eval('$EventArgumentName(2, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="f_0_0_5" cspan="1" unit="" escape="true">
                      <Layout style="width:0%" />
                    </Column>
                    <Column expression="" visibilityExpression="$Math.Eval('$EventArgumentName(3, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="f_0_0_6" cspan="1" unit="" escape="true">
                      <Layout style="width:0%" />
                    </Column>
                    <Column expression="" visibilityExpression="$Math.Eval('$EventArgumentName(4, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="f_0_0_7" cspan="1" unit="" escape="true">
                      <Layout style="width:0%" />
                    </Column>
                    <Column expression="" visibilityExpression="$Math.Eval('$EventArgumentName(5, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="f_0_0_8" cspan="1" unit="" escape="true">
                      <Layout style="width:0%" />
                    </Column>
                    <Column expression="" visibilityExpression="$Math.Eval('$EventArgumentName(6, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="f_0_0_9" cspan="1" unit="" escape="true">
                      <Layout style="width:0%" />
                    </Column>
                  </RegionRow>
                </Footer>
              </Region>
              <Region repeatHeader="false" pageBreak="false" expression="[Username]" level="1" sortExpression="[SamplingStart]" sortDirection="ASC">
                <Header kind="h">
                  <RegionRow id="h_1_0" VisibilityExpression="true">
                    <Column expression="[Name]" visibilityExpression="" action="" id="h_1_0_0" cspan="10" unit="" escape="true">
                      <Layout style="font-size:16pt;font-family:Arial, Helvetica, sans-serif;padding:16px 0px 16px 0px" />
                    </Column>
                  </RegionRow>
                  <RegionRow id="h_1_1" VisibilityExpression="true">
                    <Column expression="Start Date" visibilityExpression="" action="" id="h_1_1_0" cspan="1" unit="" escape="true">
                      <Layout style="font-size:8pt;color:#7D7D7D;background-color:#F8F8F8;font-weight:bold;font-family:Arial, Helvetica, sans-serif;border:solid #7D7D7D;border-width:0px 0px 1px 0px;padding:9px 9px 9px 9px" />
                    </Column>
                    <Column expression="Start Time" visibilityExpression="" action="" id="h_1_1_1" cspan="1" unit="" escape="true">
                      <Layout style="font-size:8pt;color:#7D7D7D;background-color:#F8F8F8;font-weight:bold;font-family:Arial, Helvetica, sans-serif;border:solid #7D7D7D;border-width:0px 0px 1px 0px;padding:9px 9px 9px 9px" />
                    </Column>
                    <Column expression="Address" visibilityExpression="" action="" id="h_1_1_2" cspan="1" unit="" escape="true">
                      <Layout style="font-size:8pt;color:#7D7D7D;background-color:#F8F8F8;font-weight:bold;font-family:Arial, Helvetica, sans-serif;border:solid #7D7D7D;border-width:0px 0px 1px 0px;padding:9px 9px 9px 9px" />
                    </Column>
                    <Column expression="$EventArgumentName(0, [EventRuleID])" visibilityExpression="$Math.Eval('$EventArgumentName(0, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="h_1_1_3" cspan="1" unit="" escape="true">
                      <Layout style="font-size:8pt;color:#7D7D7D;background-color:#F8F8F8;font-weight:bold;font-family:Arial, Helvetica, sans-serif;border:solid #7D7D7D;border-width:0px 0px 1px 0px;padding:9px 9px 9px 9px" />
                    </Column>
                    <Column expression="$EventArgumentName(1, [EventRuleID])" visibilityExpression="$Math.Eval('$EventArgumentName(1, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="h_1_1_4" cspan="1" unit="" escape="true">
                      <Layout style="font-size:8pt;color:#7D7D7D;background-color:#F8F8F8;font-weight:bold;font-family:Arial, Helvetica, sans-serif;border:solid #7D7D7D;border-width:0px 0px 1px 0px;padding:9px 9px 9px 9px" />
                    </Column>
                    <Column expression="$EventArgumentName(2, [EventRuleID])" visibilityExpression="$Math.Eval('$EventArgumentName(2, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="h_1_1_5" cspan="1" unit="" escape="true">
                      <Layout style="font-size:8pt;color:#7D7D7D;background-color:#F8F8F8;font-weight:bold;font-family:Arial, Helvetica, sans-serif;border:solid #7D7D7D;border-width:0px 0px 1px 0px;padding:9px 9px 9px 9px" />
                    </Column>
                    <Column expression="$EventArgumentName(3, [EventRuleID])" visibilityExpression="$Math.Eval('$EventArgumentName(3, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="h_1_1_6" cspan="1" unit="" escape="true">
                      <Layout style="font-size:8pt;color:#7D7D7D;background-color:#F8F8F8;font-weight:bold;font-family:Arial, Helvetica, sans-serif;border:solid #7D7D7D;border-width:0px 0px 1px 0px;padding:9px 9px 9px 9px" />
                    </Column>
                    <Column expression="$EventArgumentName(4, [EventRuleID])" visibilityExpression="$Math.Eval('$EventArgumentName(4, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="h_1_1_7" cspan="1" unit="" escape="true">
                      <Layout style="font-size:8pt;color:#7D7D7D;background-color:#F8F8F8;font-weight:bold;font-family:Arial, Helvetica, sans-serif;border:solid #7D7D7D;border-width:0px 0px 1px 0px;padding:9px 9px 9px 9px" />
                    </Column>
                    <Column expression="$EventArgumentName(5, [EventRuleID])" visibilityExpression="$Math.Eval('$EventArgumentName(5, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="h_1_1_8" cspan="1" unit="" escape="true">
                      <Layout style="font-size:8pt;color:#7D7D7D;background-color:#F8F8F8;font-weight:bold;font-family:Arial, Helvetica, sans-serif;border:solid #7D7D7D;border-width:0px 0px 1px 0px;padding:9px 9px 9px 9px" />
                    </Column>
                    <Column expression="$EventArgumentName(6, [EventRuleID])" visibilityExpression="$Math.Eval('$EventArgumentName(6, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="h_1_1_9" cspan="1" unit="" escape="true">
                      <Layout style="font-size:8pt;color:#7D7D7D;background-color:#F8F8F8;font-weight:bold;font-family:Arial, Helvetica, sans-serif;border:solid #7D7D7D;border-width:0px 0px 1px 0px;padding:9px 9px 9px 9px" />
                    </Column>
                  </RegionRow>
                </Header>
                <Item kind="i" />
                <Footer kind="f">
                  <RegionRow id="f_1_0" VisibilityExpression="true">
                    <Column expression="" visibilityExpression="" action="" id="f_1_0_0" cspan="1" unit="" escape="true">
                      <Layout style="font-size:10pt;font-weight:bold;font-family:Arial, Helvetica, sans-serif;border:solid #7D7D7D;border-width:1px 0px 0px 0px;padding:9px 9px 9px 9px" />
                    </Column>
                    <Column expression="" visibilityExpression="" action="" id="f_1_0_1" cspan="1" unit="" escape="true">
                      <Layout style="font-size:10pt;font-weight:bold;font-family:Arial, Helvetica, sans-serif;border:solid #7D7D7D;border-width:1px 0px 0px 0px;padding:9px 9px 9px 9px" />
                    </Column>
                    <Column expression="" visibilityExpression="" action="" id="f_1_0_2" cspan="1" unit="" escape="true">
                      <Layout style="font-size:10pt;font-weight:bold;font-family:Arial, Helvetica, sans-serif;border:solid #7D7D7D;border-width:1px 0px 0px 0px;padding:9px 9px 9px 9px" />
                    </Column>
                    <Column expression="" visibilityExpression="$Math.Eval('$EventArgumentName(0, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="f_1_0_3" cspan="1" unit="" escape="true">
                      <Layout style="font-size:10pt;font-weight:bold;font-family:Arial, Helvetica, sans-serif;border:solid #7D7D7D;border-width:1px 0px 0px 0px;padding:9px 9px 9px 9px" />
                    </Column>
                    <Column expression="" visibilityExpression="$Math.Eval('$EventArgumentName(1, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="f_1_0_4" cspan="1" unit="" escape="true">
                      <Layout style="font-size:10pt;font-weight:bold;font-family:Arial, Helvetica, sans-serif;border:solid #7D7D7D;border-width:1px 0px 0px 0px;padding:9px 9px 9px 9px" />
                    </Column>
                    <Column expression="Total: $sum([EventArgument02])" visibilityExpression="$Math.Eval('$EventArgumentName(2, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="f_1_0_5" cspan="1" unit="SIGNAL_FUEL_LEVEL" escape="true">
                      <Layout style="font-size:10pt;font-weight:bold;font-family:Arial, Helvetica, sans-serif;border:solid #7D7D7D;border-width:1px 0px 0px 0px;padding:9px 9px 9px 9px" />
                    </Column>
                    <Column expression="" visibilityExpression="$Math.Eval('$EventArgumentName(3, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="f_1_0_6" cspan="1" unit="" escape="true">
                      <Layout style="font-size:10pt;font-weight:bold;font-family:Arial, Helvetica, sans-serif;border:solid #7D7D7D;border-width:1px 0px 0px 0px;padding:9px 9px 9px 9px" />
                    </Column>
                    <Column expression="" visibilityExpression="$Math.Eval('$EventArgumentName(4, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="f_1_0_7" cspan="1" unit="" escape="true">
                      <Layout style="font-size:10pt;font-weight:bold;font-family:Arial, Helvetica, sans-serif;border:solid #7D7D7D;border-width:1px 0px 0px 0px;padding:9px 9px 9px 9px" />
                    </Column>
                    <Column expression="" visibilityExpression="$Math.Eval('$EventArgumentName(5, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="f_1_0_8" cspan="1" unit="" escape="true">
                      <Layout style="font-size:10pt;font-weight:bold;font-family:Arial, Helvetica, sans-serif;border:solid #7D7D7D;border-width:1px 0px 0px 0px;padding:9px 9px 9px 9px" />
                    </Column>
                    <Column expression="" visibilityExpression="$Math.Eval('$EventArgumentName(6, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="f_1_0_9" cspan="1" unit="" escape="true">
                      <Layout style="font-size:10pt;font-weight:bold;font-family:Arial, Helvetica, sans-serif;border:solid #7D7D7D;border-width:1px 0px 0px 0px;padding:9px 9px 9px 9px" />
                    </Column>
                  </RegionRow>
                  <RegionRow id="f_1_1" VisibilityExpression="true">
                    <Column expression="" visibilityExpression="" action="" id="f_1_1_0" cspan="1" unit="" escape="true">
                      <Layout style="border:solid #DDDDDD;border-width:2px 0px 0px 0px;padding:16px 0px 0px 0px" />
                    </Column>
                    <Column expression="" visibilityExpression="" action="" id="f_1_1_1" cspan="1" unit="" escape="true">
                      <Layout style="border:solid #DDDDDD;border-width:2px 0px 0px 0px;padding:16px 0px 0px 0px" />
                    </Column>
                    <Column expression="" visibilityExpression="" action="" id="f_1_1_2" cspan="1" unit="" escape="true">
                      <Layout style="border:solid #DDDDDD;border-width:2px 0px 0px 0px;padding:16px 0px 0px 0px" />
                    </Column>
                    <Column expression="" visibilityExpression="$Math.Eval('$EventArgumentName(0, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="f_1_1_3" cspan="1" unit="" escape="true">
                      <Layout style="border:solid #DDDDDD;border-width:2px 0px 0px 0px;padding:16px 0px 0px 0px" />
                    </Column>
                    <Column expression="" visibilityExpression="$Math.Eval('$EventArgumentName(1, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="f_1_1_4" cspan="1" unit="" escape="true">
                      <Layout style="border:solid #DDDDDD;border-width:2px 0px 0px 0px;padding:16px 0px 0px 0px" />
                    </Column>
                    <Column expression="" visibilityExpression="$Math.Eval('$EventArgumentName(2, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="f_1_1_5" cspan="1" unit="" escape="true">
                      <Layout style="border:solid #DDDDDD;border-width:2px 0px 0px 0px;padding:16px 0px 0px 0px" />
                    </Column>
                    <Column expression="" visibilityExpression="$Math.Eval('$EventArgumentName(3, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="f_1_1_6" cspan="1" unit="" escape="true">
                      <Layout style="border:solid #DDDDDD;border-width:2px 0px 0px 0px;padding:16px 0px 0px 0px" />
                    </Column>
                    <Column expression="" visibilityExpression="$Math.Eval('$EventArgumentName(4, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="f_1_1_7" cspan="1" unit="" escape="true">
                      <Layout style="border:solid #DDDDDD;border-width:2px 0px 0px 0px;padding:16px 0px 0px 0px" />
                    </Column>
                    <Column expression="" visibilityExpression="$Math.Eval('$EventArgumentName(5, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="f_1_1_8" cspan="1" unit="" escape="true">
                      <Layout style="border:solid #DDDDDD;border-width:2px 0px 0px 0px;padding:16px 0px 0px 0px" />
                    </Column>
                    <Column expression="" visibilityExpression="$Math.Eval('$EventArgumentName(6, [EventRuleID])' == '' ? 'False' : 'True')" action="" id="f_1_1_9" cspan="1" unit="" escape="true">
                      <Layout style="border:solid #DDDDDD;border-width:2px 0px 0px 0px;padding:16px 0px 0px 0px" />
                    </Column>
                  </RegionRow>
                </Footer>
              </Region>
            </Regions>
          </TableDefinition>
        </ReportDefinition>
      </ObjectData>
    </Object>
    <Object>
      <TemplateGuid>e302d4fc-e678-40f0-8905-4a6a1f22832b</TemplateGuid>
      <TemplateVersion>19</TemplateVersion>
      <ObjectType>GpsGate.Reporting.v3.QueryWriter</ObjectType>
      <ObjectData>
        <Query>
          <Name>QEventReport</Name>
          <ScopeID>2075b132-6410-48f8-a2fd-8f1a69488b05</ScopeID>
          <QueryText>SELECT 
	[ApplicationID] AS ApplicationID,
	Users.Name,
	Users.Username,
	EventProvider01.SamplingStart,
	EventProvider01.SamplingEnd,
	TIME_TO_SEC(TIMEDIFF(EventProvider01.SamplingEnd,  EventProvider01.SamplingStart)) AS Duration,
	EventProvider01.EventRuleID,
	EventProvider01.RuleName,
	EventProvider01.EventArgument,
	EventProvider01.EventArgument01,
	EventProvider01.EventArgument02,
	EventProvider01.EventArgument03,
	EventProvider01.EventArgument04,
	EventProvider01.EventArgument05,
	EventProvider01.EventArgument06,
	EventProvider01.EventArgument07,
	EventProvider01.EventArgument08,
	EventProvider01.EventArgument09,
	EventProvider01.EventArgument10,
  EventProvider01.EventArgument11,
  EventProvider01.EventArgument12,
  EventProvider01.EventArgument13,
  EventProvider01.EventArgument14,
  EventProvider01.EventArgument15,
  EventProvider01.EventArgument16,
  EventProvider01.EventArgument17,
  EventProvider01.EventArgument18,
  EventProvider01.EventArgument19,
  EventProvider01.EventArgument20,
	EventProvider01.DistanceGps,
	EventProvider01.DistanceOdo,
	EventProvider01.StartAddress,
	EventProvider01.StopAddress,
	EventProvider01.EventState,
	EventProvider01.UserID
FROM EventProvider01
	JOIN Users ON Users.UserID = EventProvider01.UserID
WHERE
	EventProvider01.EventState != 'Off' 
	AND EventProvider01.UserID IN (SELECT TagUsers.UserID FROM TagUsers WHERE TagUsers.TagID IN [Tag])
	AND EventProvider01.EventRuleID IN [EventRule]
	AND EventProvider01.SamplingStart &gt;= [PeriodStart] 
	AND EventProvider01.SamplingStart &lt;= [PeriodEnd]</QueryText>
          <QueryTextAlt1>SELECT 
	[ApplicationID] AS ApplicationID,
	Users.Name,
	Users.Username,
	EventProvider01.SamplingStart,
	EventProvider01.SamplingEnd,
	DATEDIFF(SECOND, EventProvider01.SamplingStart,  EventProvider01.SamplingEnd) AS Duration,
	EventProvider01.EventRuleID,
	EventProvider01.RuleName,
	EventProvider01.EventArgument,
	EventProvider01.EventArgument01,
	EventProvider01.EventArgument02,
	EventProvider01.EventArgument03,
	EventProvider01.EventArgument04,
	EventProvider01.EventArgument05,
	EventProvider01.EventArgument06,
	EventProvider01.EventArgument07,
	EventProvider01.EventArgument08,
	EventProvider01.EventArgument09,
	EventProvider01.EventArgument10,
  EventProvider01.EventArgument11,
  EventProvider01.EventArgument12,
  EventProvider01.EventArgument13,
  EventProvider01.EventArgument14,
  EventProvider01.EventArgument15,
  EventProvider01.EventArgument16,
  EventProvider01.EventArgument17,
  EventProvider01.EventArgument18,
  EventProvider01.EventArgument19,
  EventProvider01.EventArgument20,
	EventProvider01.DistanceGps,
	EventProvider01.DistanceOdo,
	EventProvider01.StartAddress,
	EventProvider01.StopAddress,
	EventProvider01.EventState,
	EventProvider01.UserID
FROM EventProvider01
	JOIN Users ON Users.UserID = EventProvider01.UserID
WHERE 
	EventProvider01.EventState != 'Off' 
	AND EventProvider01.UserID IN (SELECT TagUsers.UserID FROM TagUsers WHERE TagUsers.TagID IN [Tag])
	AND EventProvider01.EventRuleID IN [EventRule]
	AND EventProvider01.SamplingStart &gt;= [PeriodStart] 
	AND EventProvider01.SamplingStart &lt;= [PeriodEnd]</QueryTextAlt1>
          <IsInternal>False</IsInternal>
          <Type>GpsGate.Reporting.v3.UserQuery</Type>
          <Parameters>
            <Parameter>
              <type_name>GpsGate.Reporting.v3.QueryReportSqlParameter</type_name>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <param_name>ApplicationID</param_name>
              <multi>False</multi>
              <value_field>ApplicationID</value_field>
              <label_field>Name</label_field>
              <user_def_value>Applications</user_def_value>
              <data_type>System.Int32</data_type>
              <default_value></default_value>
            </Parameter>
            <Parameter>
              <type_name>GpsGate.Reporting.v3.PeriodReportSqlParameter</type_name>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <param_name>Period</param_name>
              <multi>False</multi>
              <data_type>System.DateTime</data_type>
              <default_value>-1</default_value>
            </Parameter>
            <Parameter>
              <type_name>GpsGate.Reporting.v3.QueryReportSqlParameter</type_name>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <param_name>EventRule</param_name>
              <multi>True</multi>
              <value_field>EventRuleID</value_field>
              <label_field>Name</label_field>
              <user_def_value>EventRules</user_def_value>
              <data_type>System.Int32</data_type>
              <default_value></default_value>
            </Parameter>
            <Parameter>
              <type_name>GpsGate.Reporting.v3.QueryReportSqlParameter</type_name>
              <assembly_name>GpsGate.Reporting.v3</assembly_name>
              <param_name>Tag</param_name>
              <multi>True</multi>
              <value_field>TagID</value_field>
              <label_field>Name</label_field>
              <user_def_value>Tags</user_def_value>
              <data_type>System.Int32</data_type>
              <default_value></default_value>
            </Parameter>
          </Parameters>
        </Query>
      </ObjectData>
    </Object>
  </Template>
</Templates>