Package net.sf.jasperreports.engine

Examples of net.sf.jasperreports.engine.JRTemplate


    {
      //already loaded
      return;
    }
   
    JRTemplate template;
    try
    {
      template = JRXmlTemplateLoader.load(location);
    }
    catch (Exception e)
    {
      log.warn("Could not load template from location " + location
          + "; some styles might remain unresolved.");
      return;
    }
   
    JRTemplateReference[] includedTemplates = template.getIncludedTemplates();
    if (includedTemplates != null)
    {
      for (int i = 0; i < includedTemplates.length; i++)
      {
        JRTemplateReference reference = includedTemplates[i];
        loadTemplateStyles(reference.getLocation(), loadedLocations, parentLocations);
      }
    }
   
    collectStyles(template.getStyles());
  }
View Full Code Here


    return parent.getSourceExpression();
  }

  public JRTemplate evaluate() throws JRException
  {
    JRTemplate template;
    JRExpression sourceExpression = getSourceExpression();
    Object source = filler.evaluateExpression(sourceExpression, JRExpression.EVALUATION_DEFAULT);
    if (source == null)
    {
      template = null;
View Full Code Here

    return template;
  }

  protected static JRTemplate loadTemplate(Object source, Class sourceType, JRFillContext fillContext) throws JRException
  {
    JRTemplate template;
    if (fillContext.hasLoadedTemplate(source))
    {
      template = fillContext.getLoadedTemplate(source);
    }
    else
View Full Code Here

    if (reportTemplates != null)
    {
      for (JRFillReportTemplate reportTemplate : reportTemplates)
      {
        JRTemplate template = reportTemplate.evaluate();
        if (template != null)
        {
          templates.add(template);
        }
      }
View Full Code Here

        }
       
        if (loadedLocations.add(location))
        {
          //template not yet loaded
          JRTemplate includedTemplate = JRFillReportTemplate.loadTemplate(
              location, String.class, fillContext);
          collectStyles(includedTemplate, externalStyles,
              loadedLocations, templateParentLocations);
         
        }
View Full Code Here

TOP

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

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.