Package net.sf.jasperreports.engine

Examples of net.sf.jasperreports.engine.JRRuntimeException


                    mapping = parser.mapping();
                }
                catch (ANTLRException e)
                {
                    log.error("Error parsing field mapping", e);
                    throw new JRRuntimeException(e);
                }

                if (mapping == null)
                {
                    throw new JRRuntimeException("Invalid field mapping \"" + fieldMapping + "\".");
                }

                processMappingMembers(mapping);

                FieldMatcher fieldMatcher = createFieldMatcher(mapping);
View Full Code Here


            dataField = true;
            fieldMatcher = new DataFieldMatcher((DataMapping) mapping);
        }
        else
        {
            throw new JRRuntimeException("internal error");
        }

        return fieldMatcher;
    }
View Full Code Here

            }
        }

        if (dimensionIndex == -1)
        {
            throw new JRRuntimeException("Could not find dimension \"" + dimension + "\" on axis " + axis.getIdx() + ".");
        }

        return dimensionIndex;
    }
View Full Code Here

      configureParser(parser);
      return parser;
    }
    catch (SAXException e)
    {
      throw new JRRuntimeException("Error creating SAX parser", e);
    }
    catch (ParserConfigurationException e)
    {
      throw new JRRuntimeException("Error creating SAX parser", e);
    }
  }
View Full Code Here

  protected String getResourceURI(String resource)
  {
    URL location = JRLoader.getResource(resource);
    if (location == null)
    {
      throw new JRRuntimeException("Could not find resource " + resource);
    }
    return location.toExternalForm();
  }
View Full Code Here

            }
        }

        if (levelIndex == -1)
        {
            throw new JRRuntimeException("Could not find level \"" + levelName
                    + "\" on hierarchy #" + pos.getIdx() + " (dimension " + hierarchy.getDimensionName()
                    + ") on axis #" + pos.getAxis().getIdx());
        }

        return levelIndex;
View Full Code Here

    public int getTuplePosition(int axisIndex, Tuple tuple)
    {
        if (axisIndex > axes.length)
        {
            throw new JRRuntimeException("OLAP result doesn't contain Axis(" + axisIndex + ").");
        }

        String[] memberUniqueNames = tuple.getMemberUniqueNames();
        JROlapResultAxis axis = axes[axisIndex];
        int tupleCount = axis.getTupleCount();

        int pos = -1;
        for (int i = 0; i < tupleCount; i++)
        {
            JROlapMemberTuple memberTuple = axis.getTuple(i);
            JROlapMember[] resMembers = memberTuple.getMembers();
            if (resMembers.length == memberUniqueNames.length)
            {
                boolean eq = true;
                for (int j = 0; eq && j < resMembers.length; ++j)
                {
                    if (!memberUniqueNames[j].equals(resMembers[j].getUniqueName()))
                    {
                        eq = false;
                    }
                }

                if (eq)
                {
                    pos = i;
                    break;
                }
            }
        }

        if (pos == -1)
        {
            StringBuffer sb = new StringBuffer();
            sb.append('(');
            for (int i = 0; i < memberUniqueNames.length; i++)
            {
                if (i > 0)
                {
                    sb.append(',');
                }
                sb.append(memberUniqueNames[i]);
            }
            throw new JRRuntimeException("No such tuple " + sb + " on axis " + axisIndex + ".");
        }

        return pos;
    }
View Full Code Here

      JREvaluator evaluator = JasperCompileManager.loadEvaluator(jasperReport, parentCrosstab);
      crosstabEvaluator = new JRCrosstabExpressionEvaluator(evaluator);
    }
    catch (JRException e)
    {
      throw new JRRuntimeException("Could not load evaluator for crosstab.", e);
    }
  }
View Full Code Here

      {
        bucketingService = createService(JRExpression.EVALUATION_DEFAULT);
      }
      catch (JRException e)
      {
        throw new JRRuntimeException("Could not create bucketing service", e);
      }
    }
    else
    {
      bucketingService.clear();
View Full Code Here

        // first empty page
        overflowStartPage = pageCount;
      }
      else if (pageCount >= overflowStartPage + 2)
      {
        throw new JRRuntimeException("Crosstab has not printed anything on 3 consecutive pages, "
            + "likely infinite loop");
      }
    }
   
    boolean willOverflow = crosstabFiller.willOverflow();
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.