Package ar.com.fdvs.dj.domain

Examples of ar.com.fdvs.dj.domain.DynamicJasperDesign


   * @deprecated use the overloaded version that needs a parameters Map
   */
  public static JasperReport generateJasperReport(DynamicReport dr, LayoutManager layoutManager) throws JRException {
    log.info("generating JasperReport");
    JasperReport jr = null;
      DynamicJasperDesign jd = generateJasperDesign(dr);
      registerEntities(jd, dr);
      layoutManager.applyLayout(jd, dr);
            JRProperties.setProperty(JRProperties.COMPILER_CLASS, "ar.com.fdvs.dj.util.DJJRJdtCompiler");
            jr = JasperCompileManager.compileReport(jd);
    return jr;
View Full Code Here


      if (generatedParams == null)
        generatedParams = new HashMap();

      compileOrLoadSubreports(dr, generatedParams);

      DynamicJasperDesign jd = generateJasperDesign(dr);
      registerEntities(jd, dr);
     
      registerParams(jd, generatedParams); //if we have parameters from the outside, we register them     
     
      layoutManager.applyLayout(jd, dr);
      JRProperties.setProperty(JRProperties.COMPILER_CLASS, "ar.com.fdvs.dj.util.DJJRJdtCompiler");
      jr = JasperCompileManager.compileReport(jd);
      generatedParams.putAll(jd.getParametersWithValues());
    return jr;
  }
View Full Code Here

  }


  protected static DynamicJasperDesign generateJasperDesign(DynamicReport dr) throws CoreException {
    DynamicJasperDesign jd = null;
    try {
      if (dr.getTemplateFileName() != null) {
        log.info("loading template file: "+dr.getTemplateFileName());
        log.info("Attemping to find the file directly in the file system...");
        File file = new File(dr.getTemplateFileName());
        if (file.exists()){
          JasperDesign jdesign = JRXmlLoader.load(file);
          jd = DJJRDesignHelper.downCast(jdesign,dr);
        } else {
          log.info("Not found: Attemping to find the file in the classpath...");
          URL url = DynamicJasperHelper.class.getClassLoader().getResource(dr.getTemplateFileName());
          JasperDesign jdesign = JRXmlLoader.load(url.openStream());
          jd = DJJRDesignHelper.downCast(jdesign,dr);
        }
        DJJRDesignHelper.populateReportOptionsFromDesign(jd,dr);

      } else {
        //Create new JasperDesign from the scratch
        jd = DJJRDesignHelper.getNewDesign(dr);
      }
      jd.setScriptletClass(DJDefaultScriptlet.class.getName()); //XXX this is new, for testing
      registerParameters(jd,dr);
    } catch (JRException e) {
      throw new CoreException(e.getMessage(),e);
    } catch (IOException e) {
      throw new CoreException(e.getMessage(),e);
View Full Code Here

        _parameters = new HashMap();

      visitSubreports(dr, _parameters);
      compileOrLoadSubreports(dr, _parameters);

      DynamicJasperDesign jd = generateJasperDesign(dr);
      Map params = new HashMap();
      if (!_parameters.isEmpty()){
        registerParams(jd,_parameters);
        params.putAll(_parameters);
      }
      registerEntities(jd, dr);
      layoutManager.applyLayout(jd, dr);
      JRProperties.setProperty(JRCompiler.COMPILER_PREFIX, DJCompilerFactory.getCompilerClassName());
      JasperReport jr = JasperCompileManager.compileReport(jd);
      params.putAll(jd.getParametersWithValues());
      jp = JasperFillManager.fillReport(jr, params, con);

      return jp;
    }
View Full Code Here

        _parameters = new HashMap();

      visitSubreports(dr, _parameters);
      compileOrLoadSubreports(dr, _parameters);

      DynamicJasperDesign jd = generateJasperDesign(dr);
      Map params = new HashMap();
      if (!_parameters.isEmpty()){
        registerParams(jd,_parameters);
        params.putAll(_parameters);
      }
      registerEntities(jd, dr);
      layoutManager.applyLayout(jd, dr);
//      JRProperties.setProperty(JRProperties.COMPILER_CLASS, DJCompilerFactory.getCompilerClassName());
      JRProperties.setProperty(JRCompiler.COMPILER_PREFIX, DJCompilerFactory.getCompilerClassName());
      JasperReport jr = JasperCompileManager.compileReport(jd);
      params.putAll(jd.getParametersWithValues());
      jp = JasperFillManager.fillReport(jr, params);

      return jp;
    }
View Full Code Here

        generatedParams = new HashMap();

      visitSubreports(dr, generatedParams);
      compileOrLoadSubreports(dr, generatedParams);

      DynamicJasperDesign jd = generateJasperDesign(dr);
      registerEntities(jd, dr);

      registerParams(jd, generatedParams); //if we have parameters from the outside, we register them

      layoutManager.applyLayout(jd, dr);
      JRProperties.setProperty(JRCompiler.COMPILER_PREFIX, "ar.com.fdvs.dj.util.DJJRJdtCompiler");
      jr = JasperCompileManager.compileReport(jd);
      generatedParams.putAll(jd.getParametersWithValues());
    return jr;
  }
View Full Code Here

  }


  protected static DynamicJasperDesign generateJasperDesign(DynamicReport dr) throws CoreException {
    DynamicJasperDesign jd = null;
    try {
      if (dr.getTemplateFileName() != null) {
        log.info("loading template file: "+dr.getTemplateFileName());
        log.info("Attemping to find the file directly in the file system...");
        File file = new File(dr.getTemplateFileName());
        if (file.exists()){
          JasperDesign jdesign = JRXmlLoader.load(file);
          jd = DJJRDesignHelper.downCast(jdesign,dr);
        } else {
          log.info("Not found: Attemping to find the file in the classpath...");
          URL url = DynamicJasperHelper.class.getClassLoader().getResource(dr.getTemplateFileName());
          JasperDesign jdesign = JRXmlLoader.load(url.openStream());
          jd = DJJRDesignHelper.downCast(jdesign,dr);
        }
        DJJRDesignHelper.populateReportOptionsFromDesign(jd,dr);

      } else {
        //Create new JasperDesign from the scratch
        jd = DJJRDesignHelper.getNewDesign(dr);
      }
      jd.setScriptletClass(DJDefaultScriptlet.class.getName()); //XXX this is new, for testing
      registerParameters(jd,dr);
    } catch (JRException e) {
      throw new CoreException(e.getMessage(),e);
    } catch (IOException e) {
      throw new CoreException(e.getMessage(),e);
View Full Code Here

        _parameters = new HashMap();

      visitSubreports(dr, _parameters);
      compileOrLoadSubreports(dr, _parameters);

      DynamicJasperDesign jd = generateJasperDesign(dr);
      Map params = new HashMap();
      if (!_parameters.isEmpty()){
        registerParams(jd,_parameters);
        params.putAll(_parameters);
      }
      registerEntities(jd, dr, layoutManager);
      layoutManager.applyLayout(jd, dr);
      JRProperties.setProperty(JRCompiler.COMPILER_PREFIX, DJCompilerFactory.getCompilerClassName());
      JasperReport jr = JasperCompileManager.compileReport(jd);
      params.putAll(jd.getParametersWithValues());
      jp = JasperFillManager.fillReport(jr, params, con);

      return jp;
    }
View Full Code Here

        _parameters = new HashMap();

      visitSubreports(dr, _parameters);
      compileOrLoadSubreports(dr, _parameters);

      DynamicJasperDesign jd = generateJasperDesign(dr);
      Map params = new HashMap();
      if (!_parameters.isEmpty()){
        registerParams(jd,_parameters);
        params.putAll(_parameters);
      }
      registerEntities(jd, dr, layoutManager);
      layoutManager.applyLayout(jd, dr);
//      JRProperties.setProperty(JRProperties.COMPILER_CLASS, DJCompilerFactory.getCompilerClassName());
      JRProperties.setProperty(JRCompiler.COMPILER_PREFIX, DJCompilerFactory.getCompilerClassName());
      JasperReport jr = JasperCompileManager.compileReport(jd);
      params.putAll(jd.getParametersWithValues());
      jp = JasperFillManager.fillReport(jr, params);

      return jp;
    }
View Full Code Here

        generatedParams = new HashMap();

      visitSubreports(dr, generatedParams);
      compileOrLoadSubreports(dr, generatedParams);

      DynamicJasperDesign jd = generateJasperDesign(dr);
      registerEntities(jd, dr, layoutManager);

      registerParams(jd, generatedParams); //if we have parameters from the outside, we register them

      layoutManager.applyLayout(jd, dr);
      JRProperties.setProperty(JRCompiler.COMPILER_PREFIX, "ar.com.fdvs.dj.util.DJJRJdtCompiler");
      jr = JasperCompileManager.compileReport(jd);
      generatedParams.putAll(jd.getParametersWithValues());
    return jr;
  }
View Full Code Here

TOP

Related Classes of ar.com.fdvs.dj.domain.DynamicJasperDesign

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.