Package net.sf.jasperreports.engine

Examples of net.sf.jasperreports.engine.JasperReport


    }
  }

  private void buildRel(HttpServletResponse resp, List<?> listDTO, Report tRep) throws IOException {
   
    JasperReport report = JasperService.loadReport(JasperService.class.getResource("/peJasper/"
        + tRep.getReportName()).getPath());
   
    JRBeanCollectionDataSource beanDS = new JRBeanCollectionDataSource(listDTO);
    Map<String, String> param = new HashMap<String, String>();
   
View Full Code Here


    public static JasperReport loadReport(Report report) {
      logger.info( "Carregando arquivo de relatorio <.jrxml>" );
      JasperDesign jasperDesign;
      try {
        jasperDesign = JRXmlLoader.load(JasperService.class.getResourceAsStream("/peJasper/" + report.getReportName()));
        JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
        return jasperReport;
      }catch (JRException e) {
        e.printStackTrace();
        logger.error( "<ERRO JasperReports>: Nao foi possivel carregar arquivo de relatorio <.jrxml>" , e );
        return null;
View Full Code Here

  public static JasperReport loadReport( String pathReport ){
   
    logger.info( "Carregando arquivo de relatorio <.jasper>" );
    try {

      JasperReport report = (JasperReport)JRLoader.loadObject( pathReport );
      logger.info( "Arquivo de relatorio <.jasper> carregado com sucesso" );
      return report;
     
    } catch (JRException e) {
      e.printStackTrace();
View Full Code Here

           
      // path absoluto do relatorio PPA
      final String pathRelPPA = context.getRealPath( JasperService.PATH_RELATORIO + "/relatorioPPALinhaAcao.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( Boolean.valueOf( possuiGerente ).booleanValue() );
      this.redirectDefaultErrorIfNull(request, response, relatorioDS);
     
View Full Code Here

      // path absoluto do relatorio PPA
      final String pathRelPPA = context.getRealPath( JasperService.PATH_RELATORIO + "/relatorioPPAFuncao.jasper" );
      final String pathRelPPASub = context.getRealPath( JasperService.PATH_RELATORIO + "/relatorioPPAFuncaoSub.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);
     
      TreeSet<FuncaoAreaAreBean> 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 + "/relatorioPPAOrgaoUnidade.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

    try {               
      tmpFile = File.createTempFile(fileName, "." + outputType, dir);
      out = new FileOutputStream(tmpFile);
      StringBufferInputStream sbis=new StringBufferInputStream(templateStr);
      logger.debug("compiling report");
      JasperReport report  = JasperCompileManager.compileReport(sbis);
      //report.setProperty("", )
      logger.debug("filling report");
      JasperPrint jasperPrint = JasperFillManager.fillReport(report, parameters, datasource);
      JRExporter exporter=null;
      if(outputType.equalsIgnoreCase("PDF")){
View Full Code Here

   * @param locale
   * @throws ExportException
   */
  public void run(InputStream in, OutputStream out, String outputType, JRDataSource dataSource, Locale locale) throws ExportException {
   
    JasperReport jasperReport;
    JasperPrint jasperPrint;
    JRExporter exporter;
   
    logger.debug("IN");
   
View Full Code Here

    byte[] bytes;
    List bufferedImages;
    try {
      bytes = new byte[0];
      String message = "<IMAGES>";
      JasperReport report = (JasperReport)getParameter(JRImageExporterParameter.JASPER_REPORT);
      JasperPrint jasperPrint = (JasperPrint)getParameter(JRExporterParameter.JASPER_PRINT);
     
      bufferedImages = generateReportImages(report, jasperPrint);
      Iterator iterImgs = bufferedImages.iterator();
      int count = 1;
View Full Code Here

    byte[] bytes;
    List bufferedImages;
   
    try {
      bytes = new byte[0];
      JasperReport report = (JasperReport)getParameter(JRImageExporterParameter.JASPER_REPORT);
      JasperPrint jasperPrint = (JasperPrint)getParameter(JRExporterParameter.JASPER_PRINT);
      bufferedImages = generateReportImages(report, jasperPrint);
     
      // calculate dimension of the final page
      Iterator iterImgs = bufferedImages.iterator();
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.