marcus 2013-07-22 21:48:24 +00:00
parent 0754041c22
commit c9f2cb6f48
3 changed files with 5 additions and 6 deletions

View File

@ -3,10 +3,10 @@
<property name="ireport.zoom" value="1.0"/> <property name="ireport.zoom" value="1.0"/>
<property name="ireport.x" value="0"/> <property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/> <property name="ireport.y" value="0"/>
<parameter name="DATA_INICIO" class="java.lang.String"> <parameter name="DATA_INICIO" class="java.util.Date">
<defaultValueExpression><![CDATA[]]></defaultValueExpression> <defaultValueExpression><![CDATA[]]></defaultValueExpression>
</parameter> </parameter>
<parameter name="DATA_FINAL" class="java.lang.String"> <parameter name="DATA_FINAL" class="java.util.Date">
<defaultValueExpression><![CDATA[]]></defaultValueExpression> <defaultValueExpression><![CDATA[]]></defaultValueExpression>
</parameter> </parameter>
<parameter name="EMPRESA_ID" class="java.lang.String"> <parameter name="EMPRESA_ID" class="java.lang.String">
@ -113,7 +113,7 @@
<textField> <textField>
<reportElement uuid="16e1afb9-2daf-47fd-bd15-f22e00d67c79" x="0" y="45" width="392" height="13"/> <reportElement uuid="16e1afb9-2daf-47fd-bd15-f22e00d67c79" x="0" y="45" width="392" height="13"/>
<textElement markup="none"/> <textElement markup="none"/>
<textFieldExpression><![CDATA["Período: De " + $P{DATA_INICIO} + " a " + $P{DATA_FINAL}]]></textFieldExpression> <textFieldExpression><![CDATA["Período: De " + new SimpleDateFormat("dd/MM/yyyy ").format($P{DATA_INICIO}) + " a " + new SimpleDateFormat("dd/MM/yyyy ").format($P{DATA_FINAL})]]></textFieldExpression>
</textField> </textField>
<textField> <textField>
<reportElement uuid="f892d882-409f-4f4f-b0d2-1628abb65e6f" x="402" y="9" width="151" height="13"/> <reportElement uuid="f892d882-409f-4f4f-b0d2-1628abb65e6f" x="402" y="9" width="151" height="13"/>

View File

@ -231,10 +231,9 @@ public class RelatorioPassageirosViajarController extends MyGenericForwardCompos
private void executarRelatorio() throws Exception { private void executarRelatorio() throws Exception {
Map<String, Object> parametros = new HashMap<String, Object>(); Map<String, Object> parametros = new HashMap<String, Object>();
SimpleDateFormat fd = new SimpleDateFormat("dd/MM/yyyy");
parametros.put("DATA_INICIO", fd.format(datInicial.getValue())); parametros.put("DATA_INICIO", datInicial.getValue());
parametros.put("DATA_FINAL", fd.format(datFinal.getValue())); parametros.put("DATA_FINAL", datFinal.getValue());
String passagemAberta = ""; String passagemAberta = "";
if (chkPassageiroAberto.isChecked()) { if (chkPassageiroAberto.isChecked()) {
passagemAberta = "9"; passagemAberta = "9";