<?xml version="1.0" encoding="UTF-8"?>

<report-form xmlns="http://www.davinti.com.br/vitruvio/form" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.davinti.com.br/vitruvio/form/report https://bitbucket.org/davinTI/vitruvio-xds/raw/master/vitruvio-report-form.xsd">
   <form formKey="formDadosRelatorio" width="100%" spacing="true" margin="true">
      <name>Teste2</name>
      <components>
         
            <VerticalLayout width="100%" margin="true" spacing="true">   
              <Panel width="100%" margin="true" caption="Parâmetros: ">
              
              <VerticalLayout width="100%"> 
                 <HorizontalLayout width="100%" spacing="true">
                
                    <DateField align="TOP_LEFT" resolution="DAY" id="ParDataIni" caption="Data Inicial:" expandRatio="0.5" required="true" width="90%" type="date"/>
                    <DateField align="TOP_LEFT" resolution="DAY" id="ParDataFim" caption="Data Final:" expandRatio="0.5" required="true" width="90%" type="date"/>
                
                    <OptionGroup id="ParTipoFrota" required="true" disposition="vertical" align="TOP_LEFT" caption=" Tipo de frota:" expandRatio="0.5" width="100%" type="string">
                      <entry value="Frota" key="F"/>
                      <entry value="Terceiro" key="T"/>
                      <entry value="Ambos" key="A"/>
                    </OptionGroup>
                    
                    <OptionGroup id="ParCaminhaoCarreta" required="true" disposition="vertical" align="TOP_LEFT" caption=" Tipo de transporte:" expandRatio="0.5" width="100%" type="string">
                      <entry value="Caminhão" key="C"/>
                      <entry value="Carreta" key="T"/>
                      <entry value="Ambos" key="A"/>
                    </OptionGroup>
                 
                    <DBTwinColSelect visible="true" width="100%" multivalue="true" id="ParClientes" align="TOP_LEFT" searchCaption=":" expandRatio="1" caption="Cliente:" allowFilter="true" type="string">
                        <datasource>
                          <freeQuery connection-key="vitruvio"><![CDATA[Select nome from clientes order by nome asc]]></freeQuery>
                        </datasource>
                        <key-field><![CDATA[NOME]]></key-field>
                        <caption-field><![CDATA[NOME]]></caption-field>
                    </DBTwinColSelect>
                 </HorizontalLayout>
             
                 <HorizontalLayout width="100%" spacing="true" visible="true">
                      <DBTwinColSelect width="100%" multivalue="true" caption="Placa (Cavalo):" id="ParPlaca" allowFilter="true" type="string">
                        <datasource>
                          <freeQuery connection-key="vitruvio"><![CDATA[Select placa from veiculo]]></freeQuery>
                        </datasource>
                        <key-field><![CDATA[PLACA]]></key-field>
                        <caption-field><![CDATA[PLACA]]></caption-field>
                      </DBTwinColSelect>
                      
                     <DBTwinColSelect width="100%" multivalue="true" caption="Placa Carreta:" id="ParPlacaCarreta" allowFilter="true" type="string">
                        <datasource>
                          <freeQuery connection-key="vitruvio"><![CDATA[Select placa_carreta from veiculo where placa_carreta is not null]]></freeQuery>
                        </datasource>
                        <key-field><![CDATA[PLACA_CARRETA]]></key-field>
                        <caption-field><![CDATA[PLACA_CARRETA]]></caption-field>
                      </DBTwinColSelect>
                      
                      <DBTwinColSelect width="100%" multivalue="true" id="ParFuncionario" caption="Motorista:" allowFilter="true" type="string">
                        <datasource>
                          <freeQuery connection-key="vitruvio"><![CDATA[Select nome from funcionario order by nome asc]]></freeQuery>
                        </datasource>
                        <key-field><![CDATA[NOME]]></key-field>
                        <caption-field><![CDATA[NOME]]></caption-field>
                      </DBTwinColSelect>
                    </HorizontalLayout>
                    
                 </VerticalLayout>
               </Panel>    
              
            </VerticalLayout>
         
      </components>
   </form>
</report-form>
