ecar.util.jasper
Class JasperService

java.lang.Object
  extended by ecar.util.jasper.JasperService

public class JasperService
extends java.lang.Object

Classe utilitaria para geracao de relatorio

Author:
gabrielsolana

Field Summary
private static org.apache.log4j.Logger logger
           
static java.lang.String PATH_RELATORIO
           
 
Constructor Summary
JasperService()
           
 
Method Summary
static void addRelatorio(net.sf.jasperreports.engine.JasperPrint relatorioOrigem, net.sf.jasperreports.engine.JasperPrint relatorioDestino, java.io.ByteArrayOutputStream out)
          Adiciona o relatorioOrigem ao relatorioDestino
static net.sf.jasperreports.engine.JasperPrint fillReport(net.sf.jasperreports.engine.JasperReport relatorio, java.util.Map parametros)
          Gera uma pre-impressao Jasper do objeto relatorio.
static net.sf.jasperreports.engine.JasperPrint fillReport(net.sf.jasperreports.engine.JasperReport relatorio, java.util.Map parametros, net.sf.jasperreports.engine.data.JRBeanCollectionDataSource beanDS)
          Gera uma pre-impressao Jasper do objeto relatorio.
static byte[] geraRelatorioPDF(net.sf.jasperreports.engine.JasperPrint impressaoJasper)
           
static byte[] geraRelatorioPDF(net.sf.jasperreports.engine.JasperReport relatorio, java.util.Map parametros, net.sf.jasperreports.engine.data.JRBeanCollectionDataSource beanDS)
           
static java.lang.Integer getNumberOfPages(net.sf.jasperreports.engine.JasperPrint relatorio)
           
static net.sf.jasperreports.engine.JasperReport loadReport(java.lang.String pathReport)
          Carrega o arquivo .jasper ( Relatorio compilado )
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static org.apache.log4j.Logger logger

PATH_RELATORIO

public static java.lang.String PATH_RELATORIO
Constructor Detail

JasperService

public JasperService()
Method Detail

loadReport

public static net.sf.jasperreports.engine.JasperReport loadReport(java.lang.String pathReport)
Carrega o arquivo .jasper ( Relatorio compilado )

Parameters:
path - ( URL absoluta ) do arquivo .jasper
Returns:
objeto que representa o relatorio JasperReport, se erro retorna

fillReport

public static net.sf.jasperreports.engine.JasperPrint fillReport(net.sf.jasperreports.engine.JasperReport relatorio,
                                                                 java.util.Map parametros,
                                                                 net.sf.jasperreports.engine.data.JRBeanCollectionDataSource beanDS)
Gera uma pre-impressao Jasper do objeto relatorio.

Parameters:
relatorio - objeto Jasper
parametros - do relatorio
beanDS - data Source do relatorio
Returns:
objeto pre-impressao Jasper

fillReport

public static net.sf.jasperreports.engine.JasperPrint fillReport(net.sf.jasperreports.engine.JasperReport relatorio,
                                                                 java.util.Map parametros)
Gera uma pre-impressao Jasper do objeto relatorio.

Parameters:
relatorio - objeto Jasper
parametros - do relatorio
beanDS - data Source do relatorio
Returns:
objeto pre-impressao Jasper

getNumberOfPages

public static java.lang.Integer getNumberOfPages(net.sf.jasperreports.engine.JasperPrint relatorio)

addRelatorio

public static void addRelatorio(net.sf.jasperreports.engine.JasperPrint relatorioOrigem,
                                net.sf.jasperreports.engine.JasperPrint relatorioDestino,
                                java.io.ByteArrayOutputStream out)
Adiciona o relatorioOrigem ao relatorioDestino

Parameters:
relatorioOrigem - impressao Jasper que deve ser copiado
relatorioDestino - impressao Jasper Destino, � aqui que vai ser adicionado o outro relatorio

geraRelatorioPDF

public static byte[] geraRelatorioPDF(net.sf.jasperreports.engine.JasperPrint impressaoJasper)

geraRelatorioPDF

public static byte[] geraRelatorioPDF(net.sf.jasperreports.engine.JasperReport relatorio,
                                      java.util.Map parametros,
                                      net.sf.jasperreports.engine.data.JRBeanCollectionDataSource beanDS)


Copyright © 2007, PRODEPA - Processamento de Dados do Pará