diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioGratuidade.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioGratuidade.java index 9aa456219..dd03c0a06 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioGratuidade.java +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioGratuidade.java @@ -200,7 +200,7 @@ public class RelatorioGratuidade extends Relatorio { sql.append(" AND des.parada_id = :destino_id "); } if(!categoria.isEmpty()){ - sql.append(" AND c.categoria_id in(:categoria_id) "); + sql.append(" AND c.categoria_id = :categoria_id "); } if(orgaoConcedenteId != null){ sql.append(" AND r.orgaoconcedente_id = :orgao_concedente_id "); diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioGratuidade.jasper b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioGratuidade.jasper index 6592be383..d89865aed 100644 Binary files a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioGratuidade.jasper and b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioGratuidade.jasper differ diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioGratuidade.jrxml b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioGratuidade.jrxml index c769dec69..f5860768e 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioGratuidade.jrxml +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/templates/RelatorioGratuidade.jrxml @@ -1,8 +1,8 @@ - - - + + + @@ -69,79 +69,107 @@ - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + - + + + - + + + - + + + - + + + - + + + - + + + - + + + @@ -155,58 +183,78 @@ - + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + @@ -277,182 +325,182 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioGratuidadeController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioGratuidadeController.java index 7d41a95a0..e4b7fdec0 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioGratuidadeController.java +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioGratuidadeController.java @@ -144,12 +144,8 @@ public class RelatorioGratuidadeController extends MyGenericForwardComposer { if(cmbDestino.getSelectedIndex() != -1){ parametros.put("destino", ((Parada) cmbDestino.getSelectedItem().getValue()).getParadaId()); } - if(listSelectedTipoGratuidade.size() > 0){ - String categoriaId = ""; - for (Categoria categoria : listSelectedTipoGratuidade) { - categoriaId = categoria.getCategoriaId() + ","; - } - parametros.put("categoria", categoriaId.substring(0, categoriaId.length()-1)); + if(cmbTipoGratuidade.getSelectedIndex() != -1){ + parametros.put("categoria", ((Categoria) cmbTipoGratuidade.getSelectedItem().getValue()).getCategoriaId()); } if (cmbOrgaoConcedente.getSelectedItem() != null) { OrgaoConcedente orgaoConcedente = (OrgaoConcedente) cmbOrgaoConcedente.getSelectedItem().getValue();