Examples of JRExpression


Examples of net.sf.jasperreports.engine.JRExpression

    sb.append("        switch (id)\n");
    sb.append("        {\n");

    if (expressionsList != null && !expressionsList.isEmpty())
    {
      JRExpression expression = null;
      for (Iterator it = expressionsList.iterator(); it.hasNext();)
      {
        expression = (JRExpression)it.next();
       
        sb.append("            case ");
        sb.append(sourceTask.getExpressionId(expression));
        sb.append(" :\n");
        sb.append("            {\n");
        sb.append("                value = (");
        sb.append(expression.getValueClassName());
        sb.append(")(");
        sb.append(this.generateExpression(expression, evaluationType));
        sb.append(");\n");
        sb.append("                break;\n");
        sb.append("            }\n");
View Full Code Here

Examples of net.sf.jasperreports.engine.JRExpression

     
      if (expressions != null)
      {
        for(Iterator it = expressions.iterator(); it.hasNext();)
        {
          JRExpression expression = (JRExpression)it.next();
          interpreter.eval("bshEvaluator.evaluateOld(" + expression.getId() + ")");
        }
      }
    }
    catch(TargetError te)
    {
View Full Code Here

Examples of net.sf.jasperreports.engine.JRExpression

      {
        JRCompilationUnit unit = units[i];
        JavaScriptCompileData compileData = new JavaScriptCompileData();
        for (Iterator it = unit.getExpressions().iterator(); it.hasNext();)
        {
          JRExpression expr = (JRExpression) it.next();
          int id = unit.getCompileTask().getExpressionId(expr).intValue();
          JavaScriptCompileData.Expression jsExpr =
            JavaScriptEvaluator.createJSExpression(expr);
         
          //compile the default expression to catch syntax errors
View Full Code Here

Examples of net.sf.jasperreports.engine.JRExpression

    collectStyles(report.getStyles());
  }

  protected void loadReportTemplateStyles(JRReportTemplate template, Set loadedLocations)
  {
    JRExpression sourceExpression = template.getSourceExpression();
    if (sourceExpression != null)
    {
      String location = JRExpressionUtil.getSimpleExpressionText(sourceExpression);
      if (location == null)
      {
        log.warn("Template source expression " + sourceExpression.getText()
            + "cannot be evaluated; some styles might remain unresolved.");
      }
      else
      {
        HashSet parentLocations = new HashSet();
View Full Code Here

Examples of net.sf.jasperreports.engine.JRExpression

    }
  }

  protected void verify(JRVerifier verifier, SpiderPlot spiderPlot)
  {
    JRExpression maxValueExpression = spiderPlot.getMaxValueExpression();
    if (maxValueExpression != null)
    {
      String valueClass = maxValueExpression.getValueClassName();
      if (valueClass == null)
      {
        verifier.addBrokenRule("No value class for spider plot max value expression",
            maxValueExpression);
      }
View Full Code Here

Examples of net.sf.jasperreports.engine.JRExpression

    if (type == null)
    {
      verifier.addBrokenRule("No barcode type set", barcode);
    }
   
    JRExpression codeExpression = barcode.getCodeExpression();
    if (codeExpression == null)
    {
      verifier.addBrokenRule("Barcode expression is null", barcode);
    }
    else
    {
      String valueClass = codeExpression.getValueClassName();
      if (valueClass == null)
      {
        verifier.addBrokenRule("Barcode expression value class not set", codeExpression);
      }
      else if (!"java.lang.String".equals(valueClass))
      {
        verifier.addBrokenRule("Class " + valueClass
            + " not supported for barcode expression. Use java.lang.String instead.",
            codeExpression);
      }
    }
   
    JRExpression applicationIdentifierExpression =
      barcode.getApplicationIdentifierExpression();
    if (applicationIdentifierExpression != null)
    {
      String valueClass = applicationIdentifierExpression.getValueClassName();
      if (valueClass == null)
      {
        verifier.addBrokenRule("Barcode application identifier expression value class not set",
            applicationIdentifierExpression);
      }
View Full Code Here

Examples of net.sf.jasperreports.engine.JRExpression

   
    //FIXME avoid this
    List expressions = JRExpressionCollector.collectExpressions(filler.getJasperReport(), crosstab);
    for (Iterator iter = expressions.iterator(); iter.hasNext();)
    {
      JRExpression expression = (JRExpression) iter.next();
      JRExpressionChunk[] chunks = expression.getChunks();
      if (chunks != null)
      {
        for (int i = 0; i < chunks.length; i++)
        {
          JRExpressionChunk chunk = chunks[i];
View Full Code Here

Examples of net.sf.jasperreports.engine.JRExpression

  private BucketDefinition createServiceBucket(JRCrosstabGroup group, byte evaluation) throws JRException
  {
    JRCrosstabBucket bucket = group.getBucket();

    Comparator comparator = null;
    JRExpression comparatorExpression = bucket.getComparatorExpression();
    if (comparatorExpression != null)
    {
      comparator = (Comparator) evaluateExpression(comparatorExpression, evaluation);
    }
View Full Code Here

Examples of net.sf.jasperreports.engine.JRExpression

    {
      printParameters = new JRPrintHyperlinkParameters();
      for (int i = 0; i < hyperlinkParameters.length; i++)
      {
        JRHyperlinkParameter hyperlinkParameter = hyperlinkParameters[i];
        JRExpression valueExpression = hyperlinkParameter.getValueExpression();
        Class valueClass;
        Object value;
        if (valueExpression == null)
        {
          value = null;
          valueClass = Object.class;
        }
        else
        {
          value = expressionEvaluator.evaluate(valueExpression, evaluationType);
          valueClass = valueExpression.getValueClass();
        }
       
        JRPrintHyperlinkParameter printParam = new JRPrintHyperlinkParameter(hyperlinkParameter.getName(), valueClass.getName(), value);
        printParameters.addParameter(printParam);
      }
View Full Code Here

Examples of net.sf.jasperreports.engine.JRExpression

  }

 
  protected void evaluateIncrementWhenExpression(JRCalculator calculator) throws JRExpressionEvalException
  {
    JRExpression incrementWhenExpression = getIncrementWhenExpression();
    if (incrementWhenExpression == null)
    {
      increment = true;
    }
    else
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.