Package net.sf.jasperreports.engine

Examples of net.sf.jasperreports.engine.JRRuntimeException


      }
      else
      {
        if (fields.length > 1)
        {
          throw new JRRuntimeException("The HQL query returns only one non-entity and non-component result but there are more than one fields.");
        }
       
        if (fields.length == 1)
        {
          JRField field = fields[0];
View Full Code Here


    {
      int firstNestedIdx = fieldMapping.indexOf(PropertyUtils.NESTED_DELIM);
     
      if (firstNestedIdx < 0)
      {
        throw new JRRuntimeException("Unknown HQL return alias \"" + fieldMapping + "\".");
      }
     
      String fieldAlias = fieldMapping.substring(0, firstNestedIdx);
      String fieldProperty = fieldMapping.substring(firstNestedIdx + 1);
     
      fieldIdx = (Integer) aliasesMap.get(fieldAlias);
      if (fieldIdx == null)
      {
        throw new JRRuntimeException("The HQL query does not have a \"" + fieldAlias + "\" alias.");
      }
     
      Type type = returnTypes[fieldIdx.intValue()];
      if (!type.isEntityType() && !type.isComponentType())
      {
        throw new JRRuntimeException("The HQL query does not have a \"" + fieldAlias + "\" alias.");
      }
     
      reader = new IndexPropertyFieldReader(fieldIdx.intValue(), fieldProperty);
    }
    else
View Full Code Here

  public Object getFieldValue(JRField jrField) throws JRException
  {
    FieldReader reader = (FieldReader) fieldReaders.get(jrField.getName());
    if (reader == null)
    {
      throw new JRRuntimeException("No filed reader for " + jrField.getName());
    }
    return reader.getFieldValue(currentReturnValue);
  }
View Full Code Here

    {
      Map fontsMap = jasperPrint.getFontsMap();

      if ( !fontsMap.containsKey(atts.getValue(JRXmlConstants.ATTRIBUTE_reportFont)) )
      {
        printXmlLoader.addError(new JRRuntimeException("Unknown report font : " + atts.getValue(JRXmlConstants.ATTRIBUTE_reportFont)));
      }

      element.setReportFont((JRReportFont)fontsMap.get(atts.getValue(JRXmlConstants.ATTRIBUTE_reportFont)));
    }
View Full Code Here

      {
        bucketingService.addData(bucketValues, measureValues);
      }
      catch (JRException e)
      {
        throw new JRRuntimeException("Error incrementing crosstab dataset", e);
      }
    }
View Full Code Here

    {
      clone = (JRBaseGroup)super.clone();
    }
    catch (CloneNotSupportedException e)
    {
      throw new JRRuntimeException(e);
    }
   
    if (expression != null)
    {
      clone.expression = (JRExpression)expression.clone();
View Full Code Here

            }
            else
            {
                if (mappingPositions.size() != axes.length)
                {
                    throw new JRRuntimeException("Incorrect data mapping: the number of positions doesn't match the number of axes.");
                }

                this.dataPositions = new int[axes.length];
                int c = 0;
                for (Iterator iter = mappingPositions.iterator(); iter.hasNext(); ++c)
View Full Code Here

        {
            JROlapCell cell = olapResult.getCell(positions);

            if (cell != null && cell.isError())
            {
                throw new JRRuntimeException("OLAP cell calculation returned error.");
            }

            Object value;
            if (cell == null || cell.isNull())
            {
View Full Code Here

  {
    Integer fieldIndex = (Integer)fieldIndexMap.get(jrField.getName());

    if (fieldIndex == null)
    {
      throw new JRRuntimeException("Field \"" + jrField.getName() + "\" not found in sortable data source.");
    }

    return currentRecord[fieldIndex.intValue()];
  }
View Full Code Here

          j++;
        }

        if (!isFound)
        {
          throw new JRRuntimeException("Sort field \"" + sortFieldName + "\" not found in the list of data source fields.");
        }
      }
    }
  }
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.