Package net.sf.jasperreports.engine

Examples of net.sf.jasperreports.engine.JasperReport


   */
  public void run(String templateContent, File reportFile, String outputType, Connection conn, Locale locale) throws Exception {
   
    InputStream is = new ByteArrayInputStream( templateContent.getBytes("ISO-8859-1") );
   
    JasperReport report  = JasperCompileManager.compileReport(is);

    HashMap params = new HashMap();
    if (locale == null) {
      logger.warn("Input locale is null!!!");
    } else {
View Full Code Here


   
    private void printReport(String resourcefile, TicketInfo ticket, Object ticketext) {
       
        try {    
        
            JasperReport jr;
          
            InputStream in = getClass().getResourceAsStream(resourcefile + ".ser");
            if (in == null) {     
                // read and compile the report
                JasperDesign jd = JRXmlLoader.load(getClass().getResourceAsStream(resourcefile + ".jrxml"));           
View Full Code Here

        try {
            String datasourceName = delegator.getEntityHelperName(info);
            InputStream is = context.getResourceAsStream(page);
            Map parameters = UtilHttp.getParameterMap(request);

            JasperReport report = JasperCompileManager.compileReport(is);

            response.setContentType("text/xml");

            PipedOutputStream fillToPrintOutputStream = new PipedOutputStream();
            PipedInputStream fillToPrintInputStream = new PipedInputStream(fillToPrintOutputStream);
View Full Code Here

        if (delegator == null) {
            throw new ViewHandlerException("The delegator object was null, how did that happen?");
        }

        try {
            JasperReport report = (JasperReport) jasperReportsCompiledCache.get(page);
            if (report == null) {
                synchronized (this) {
                    report = (JasperReport) jasperReportsCompiledCache.get(page);
                    if (report == null) {
                        InputStream is = context.getResourceAsStream(page);
View Full Code Here

        if (delegator == null) {
            throw new ViewHandlerException("The delegator object was null, how did that happen?");
        }

        try {
            JasperReport report = (JasperReport) jasperReportsCompiledCache.get(page);
            if (report == null) {
                synchronized (this) {
                    report = (JasperReport) jasperReportsCompiledCache.get(page);
                    if (report == null) {
                        InputStream is = context.getResourceAsStream(page);
View Full Code Here

        if (delegator == null) {
            throw new ViewHandlerException("The delegator object was null, how did that happen?");
        }

        try {
            JasperReport report = (JasperReport) jasperReportsCompiledCache.get(page);
            if (report == null) {
                synchronized (this) {
                    report = (JasperReport) jasperReportsCompiledCache.get(page);
                    if (report == null) {
                        InputStream is = context.getResourceAsStream(page);
View Full Code Here

           
      // path absoluto do relatorio PPA
      final String pathRelPPA = context.getRealPath( JasperService.PATH_RELATORIO + "/relatorioPPAPrograma.jasper" );
      final String pathRelPPACapa = context.getRealPath( JasperService.PATH_RELATORIO + "/relatorioPPA_Demonstrativos_capa.jasper" );         

      JasperReport relatorioJasper = JasperService.loadReport( pathRelPPA );
      JasperReport relatorioCapaJasper = JasperService.loadReport( pathRelPPACapa )
      this.redirectDefaultErrorIfNull(request, response, relatorioJasper);
     
      ArrayList<PPA_ProgramaBean> relatorioDS = service.generatePPA();
      this.redirectDefaultErrorIfNull(request, response, relatorioDS);
     
View Full Code Here

      final String pathRelIndicadorPPA = context.getRealPath( JasperService.PATH_RELATORIO + "/relatorioPPA_projetoLei_tabela_indic.jasper" );
      final String pathRelAcaoPPA = context.getRealPath( JasperService.PATH_RELATORIO + "/relatorioPPA_projetoLei_acao.jasper" );
      final String pathRelProdutoPPA = context.getRealPath( JasperService.PATH_RELATORIO + "/relatorioPPA_projetoLei_tabela_produto.jasper" );
      final String pathRelPPACapa = context.getRealPath( JasperService.PATH_RELATORIO + "/relatorioPPA_projetoLei_capa.jasper" );
     
      JasperReport relatorioProjetoLei = JasperService.loadReport( pathRelPPA );
      JasperReport relatorioCapa = JasperService.loadReport( pathRelPPACapa );
     
      //printParam( tipoParametro, listaProgramas, orgao, listaCriteriosCom, listaCriteriosSem, data,pagina,titulo);
     
      ArrayList<RelatorioPPABean> relatorioDS = service.generatePPA( tipoParametro, listaProgramas, orgao, listaCriteriosCom, listaCriteriosSem);
      JRBeanCollectionDataSource ds = new JRBeanCollectionDataSource(relatorioDS);
View Full Code Here

     
      // path absoluto do relatorio PPA
      final String pathRelPPA = context.getRealPath( JasperService.PATH_RELATORIO + "/relatorioPPALinhaAcaoPrograma.jasper" );
      final String pathRelPPACapa = context.getRealPath( JasperService.PATH_RELATORIO + "/relatorioPPA_Demonstrativos_capa.jasper" );     

      JasperReport relatorioJasper = JasperService.loadReport( pathRelPPA );
      JasperReport relatorioCapaJasper = JasperService.loadReport( pathRelPPACapa );       
      this.redirectDefaultErrorIfNull(request, response, relatorioJasper);
     
      ArrayList<PPA_LinhaAcaoBean> relatorioDS = service.generatePPA();
      this.redirectDefaultErrorIfNull(request, response, relatorioDS);
     
View Full Code Here

     
      // path absoluto do relatorio PPA
      final String pathRelPPA = context.getRealPath( JasperService.PATH_RELATORIO + "/relatorioPPAOrgao.jasper" );
      final String pathRelPPACapa = context.getRealPath( JasperService.PATH_RELATORIO + "/relatorioPPA_Demonstrativos_capa.jasper" );       

      JasperReport relatorioJasper = JasperService.loadReport( pathRelPPA );
      JasperReport relatorioCapaJasper = JasperService.loadReport( pathRelPPACapa );       
      this.redirectDefaultErrorIfNull(request, response, relatorioJasper);
     
      ArrayList<PPA_OrgaoBean> relatorioDS = service.generatePPA();
      this.redirectDefaultErrorIfNull(request, response, relatorioDS);
     
View Full Code Here

TOP

Related Classes of net.sf.jasperreports.engine.JasperReport

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.