Package net.sf.jasperreports.engine

Examples of net.sf.jasperreports.engine.JRRuntimeException


    if (customizerClass != null && customizerClass.length() > 0) {
      try {
        Class myClass = JRClassLoader.loadClassForName(customizerClass);
        chartCustomizer = (ChartCustomizer) myClass.newInstance();
      } catch (Exception e) {
        throw new JRRuntimeException("Could not create chart customizer instance.", e);
      }

      if (chartCustomizer instanceof AbstractChartCustomizer)
      {
        ((AbstractChartCustomizer) chartCustomizer).init(fillContext.getFiller(), getDataset());
View Full Code Here


      {
        footerFrame.addElementGroup((JRElementGroup) childClone);
      }
      else
      {
        throw new JRRuntimeException("Uknown child type "
            + childClone.getClass().getName());
      }
    }
   
    groupFooter.addElement(footerFrame);
View Full Code Here

          }
        }
      }
      else
      {
        throw new JRRuntimeException("Unknown JRChild type " + child.getClass().getName());
      }
    }
   
    return frame;
  }
View Full Code Here

   */
  public static synchronized void setSystemExtensionsRegistry(ExtensionsRegistry extensionsRegistry)
  {
    if (extensionsRegistry == null)
    {
      throw new JRRuntimeException("Cannot set a null extensions registry.");
    }
   
    systemRegistry = extensionsRegistry;
  }
View Full Code Here

    {
      jfreeChart = theme.createChart(chartContext);
    }
    catch (JRException e)
    {
      throw new JRRuntimeException(e);
    }
   
    Rectangle2D rectangle = new Rectangle2D.Double(0, 0, chart.getWidth(), chart.getHeight());

    return
View Full Code Here

        byte[] sourceBytes = units[i].getSourceCode().getBytes(SOURCE_ENCODING);
        unit.addSource("calculator_" + units[i].getName(), new ByteArrayInputStream(sourceBytes));
      }
      catch (UnsupportedEncodingException e)
      {
        throw new JRRuntimeException(e);
      }
    }
   
    ClassCollector collector = new ClassCollector();
    unit.setClassgenCallback(collector);
View Full Code Here

     
      return clone;
    }
    catch (CloneNotSupportedException e)
    {
      throw new JRRuntimeException(e);
    }
  }
View Full Code Here

 
  public Expression getExpression(int id)
  {
    if (id >= expressions.size())
    {
      throw new JRRuntimeException("No expression for id " + id);
    }
    Expression expr = (Expression) expressions.get(id);
    if (expr == null)
    {
      throw new JRRuntimeException("No expression for id " + id);
    }
    return expr;
  }
View Full Code Here

    if (percentageCalculatorClass == null)
    {
      calculator = (JRPercentageCalculator) builtInCalculators.get(valueClass.getName());
      if (calculator == null)
      {
        throw new JRRuntimeException("Measure with type " + valueClass.getName() + " should specify a percentage calculator class.");
      }
    }
    else
    {
      calculator = (JRPercentageCalculator) cachedCalculators.get(percentageCalculatorClass.getName());
     
      if (calculator == null)
      {
        try
        {
          calculator = (JRPercentageCalculator) percentageCalculatorClass.newInstance();
          cachedCalculators.put(percentageCalculatorClass.getName(), calculator);
        }
        catch (InstantiationException e)
        {
          throw new JRRuntimeException("Error while creating percentage calculator instance of " + percentageCalculatorClass + ".", e);
        }
        catch (IllegalAccessException e)
        {
          throw new JRRuntimeException("Error while creating percentage calculator instance of " + percentageCalculatorClass + ".", e);
        }
      }
    }

    return calculator;
View Full Code Here

   
    BarcodeProvider provider = (BarcodeProvider) providers.get(
        barcodeInfo.getType());
    if (provider == null)
    {
      throw new JRRuntimeException("No barcode provider for type "
          + barcodeInfo.getType());
    }
    try
    {
      return provider.createBarcode(barcodeInfo);
    }
    catch (BarcodeException e)
    {
      throw new JRRuntimeException("Error creating barcode", e);
    }
  }
View Full Code Here

TOP

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

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.