Package net.sf.jasperreports.engine

Examples of net.sf.jasperreports.engine.JRDatasetRun


  public void collectExpressions(Component component,
      JRExpressionCollector collector)
  {
    ListComponent listComponent = (ListComponent) component;
    JRDatasetRun datasetRun = listComponent.getDatasetRun();
    collector.collect(datasetRun);
   
    JRExpressionCollector datasetCollector = collector.getDatasetCollector(
        datasetRun.getDatasetName());
    JRElement[] elements = listComponent.getContents().getElements();
    if (elements != null)
    {
      for (int i = 0; i < elements.length; i++)
      {
View Full Code Here


  public void verify(Component component, JRVerifier verifier)
  {
    ListComponent listComponent = (ListComponent) component;

    JRDatasetRun datasetRun = listComponent.getDatasetRun();
    if (datasetRun == null)
    {
      verifier.addBrokenRule("No list subdataset run set", listComponent);
    }
    else
View Full Code Here

  public void collectExpressions(Component component,
      JRExpressionCollector collector)
  {
    TableComponent table = (TableComponent) component;
   
    JRDatasetRun datasetRun = table.getDatasetRun();
    collector.collect(datasetRun);
   
    JRExpressionCollector datasetCollector = collector.getDatasetCollector(
        datasetRun.getDatasetName());
    ColumnExpressionCollector columnCollector = new ColumnExpressionCollector(
        collector, datasetCollector);
    columnCollector.collectColumns(table.getColumns());
  }
View Full Code Here

  public void verify(Component component, JRVerifier verifier)
  {
    TableComponent table = (TableComponent) component;

    JRDatasetRun datasetRun = table.getDatasetRun();
    if (datasetRun == null)
    {
      verifier.addBrokenRule("No list subdataset run set", table);
    }
    else
View Full Code Here

          {
            verifier.addBrokenRule("Duplicate " + cellName + " for group \"" + groupName + "\"",
                groupCell);
          }
         
          JRDatasetRun datasetRun = table.getDatasetRun();
          if (datasetRun != null)
          {
            JRDesignDataset dataset = (JRDesignDataset) verifier.getReportDesign().getDatasetMap().get(
                datasetRun.getDatasetName());
            if (dataset != null && dataset.getGroupsMap().get(groupName) == null)
            {
              verifier.addBrokenRule("No group named " + groupName
                  + "\" found in subdataset " + datasetRun.getDatasetName(),
                  groupCell);
            }
          }
        }
       
View Full Code Here

      {
        return "table footer";
      }
    });
   
    JRDatasetRun datasetRun = table.getDatasetRun();
    if (datasetRun != null)
    {
      JRDesignDataset dataset = (JRDesignDataset) verifier.getReportDesign().getDatasetMap().get(
          datasetRun.getDatasetName());
      if (dataset != null)
      {
        JRGroup[] groups = dataset.getGroups();
        if (groups != null)
        {
View Full Code Here

  public void begin(String namespace, String name, Attributes attributes)
      throws Exception
  {
    JRXmlLoader xmlLoader = getXmlLoader();
    TableComponent table = getTableComponent();
    JRDatasetRun datasetRun = table.getDatasetRun();
    String datasetName = datasetRun == null ? null : datasetRun.getDatasetName();
   
    if (log.isDebugEnabled())
    {
      log.debug("Pushing report context for dataset name " + datasetName);
    }
View Full Code Here

        write( datasetName + ".setIncrementGroup(" + incrementGroupName + ");\n");
      }
 
      writeExpression( dataset.getIncrementWhenExpression(), datasetName, "IncrementWhenExpression");
 
      JRDatasetRun datasetRun = dataset.getDatasetRun();
      if (datasetRun != null)
      {
        writeDatasetRun( datasetRun, datasetName);
      }
      flush();
View Full Code Here

    return getGroupList(table, jasperDesign);
  }

  public static List<?> getGroupList(TableComponent table, JasperDesign jd) {
    List<?> groupsList = null;
    JRDatasetRun datasetRun = table.getDatasetRun();
    if (datasetRun != null) {
      String dataSetName = datasetRun.getDatasetName();
      JRDataset ds = (JRDataset) jd.getDatasetMap().get(dataSetName);
      groupsList = (ds != null ? Arrays.asList(ds.getGroups()) : null);
    }
    return groupsList;
  }
View Full Code Here

  {
    String valueClassName = Object.class.getName();
   
    JRXmlLoader xmlLoader = (JRXmlLoader) digester.peek(digester.getCount() - 1);
    JasperDesign design = (JasperDesign) digester.peek(digester.getCount() - 2);
    JRDatasetRun datasetRun = (JRDatasetRun) digester.peek(1);
   
    JRDesignDataset dataset = (JRDesignDataset) design.getDatasetMap().get(datasetRun.getDatasetName());
    if (dataset == null)
    {
      xmlLoader.addError(new JRValidationException("Unknown sub dataset " + datasetRun.getDatasetName(), datasetRun));
    }
    else
    {
      JRDatasetParameter runParameter = (JRDatasetParameter) digester.peek();
      JRParameter param = (JRParameter) dataset.getParametersMap().get(runParameter.getName());
     
      if (param == null)
      {
        xmlLoader.addError(new JRValidationException("Unknown parameter " + runParameter.getName() + " in sub dataset " + datasetRun.getDatasetName(), runParameter));
      }
      else
      {
        valueClassName = param.getValueClassName();
      }
View Full Code Here

TOP

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

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.