Package net.sf.jasperreports.engine.design

Examples of net.sf.jasperreports.engine.design.JRDesignDatasetRun


public class JRDatasetRunFactory extends JRBaseFactory
{
 
  public Object createObject(Attributes atts)
  {
    JRDesignDatasetRun datasetRun = new JRDesignDatasetRun();
   
    datasetRun.setDatasetName(atts.getValue(JRXmlConstants.ATTRIBUTE_subDataset));
   
    return datasetRun;
  }
View Full Code Here


 
  public SortFillDatasetRun(JRBaseFiller filler, JRFillDataset dataset, SortInfo sortInfo) throws JRException
  {
    super(
      filler,
      new JRDesignDatasetRun(), //we don't need anything from a dataset run. just avoid NPEs down the call
      dataset
      );
   
    allSortFields = DatasetSortUtil.getAllSortFields(dataset);
View Full Code Here

   * @param djcrosstab
   */
  private void registerDataSet(DJCrosstab djcrosstab) {
    JRDesignCrosstabDataset dataset = new JRDesignCrosstabDataset();
    dataset.setDataPreSorted(false);
    JRDesignDatasetRun datasetRun = new JRDesignDatasetRun();
//    datasetRun.setDatasetName("sub1");
    JRDesignExpression exp = ExpressionUtils.getDataSourceExpression(djcrosstab.getDatasource());
    datasetRun.setDataSourceExpression(exp);



    dataset.setDatasetRun(datasetRun);


    JRDesignDataset jrDataset = new JRDesignDataset(false);
//    jrDataset.setName("sub1");

    for (int i =  rows.length-1; i >= 0; i--) {
      DJCrosstabRow crosstabRow = rows[i];
      JRDesignField field = new JRDesignField();
      field.setName(crosstabRow.getProperty().getProperty());
      field.setValueClassName(crosstabRow.getProperty().getValueClassName());
      try {
        jrDataset.addField(field);
      } catch (JRException e) {
        log.error(e.getMessage(),e);
      }
    }
    for (int i = cols.length-1; i >= 0; i--) {
      DJCrosstabColumn crosstabColumn = cols[i];
      JRDesignField field = new JRDesignField();
      field.setName(crosstabColumn.getProperty().getProperty());
      field.setValueClassName(crosstabColumn.getProperty().getValueClassName());
      try {
        jrDataset.addField(field);
      } catch (JRException e) {
        log.error(e.getMessage(),e);
      }
    }
    JRDesignField field = new JRDesignField();
    field.setName(djcrosstab.getMeasure(0).getProperty().getProperty());
    field.setValueClassName(djcrosstab.getMeasure(0).getProperty().getValueClassName());
    try {
      jrDataset.addField(field);
    } catch (JRException e) {
      log.error(e.getMessage(),e);
    }


    jrcross.setDataset(dataset);
    Random rd = new Random();
    String dsName = "crosstabDataSource_" + rd.nextLong();

    while (design.getDatasetMap().containsKey(dsName)){
      dsName = "crosstabDataSource_" + rd.nextLong();
    }

    datasetRun.setDatasetName(dsName);
    jrDataset.setName(dsName);

    log.debug("Crosstab dataset name = " + dsName);
    try {
        if ( design.getDatasetMap().containsKey(jrDataset.getName())==false)
View Full Code Here

   * @param djcrosstab
   */
  private void registerDataSet(DJCrosstab djcrosstab) {
    JRDesignCrosstabDataset dataset = new JRDesignCrosstabDataset();
    dataset.setDataPreSorted(false);
    JRDesignDatasetRun datasetRun = new JRDesignDatasetRun();
//    datasetRun.setDatasetName("sub1");
    JRDesignExpression exp = ExpressionUtils.getDataSourceExpression(djcrosstab.getDatasource());
    datasetRun.setDataSourceExpression(exp);



    dataset.setDatasetRun(datasetRun);


    JRDesignDataset jrDataset = new JRDesignDataset(false);
//    jrDataset.setName("sub1");

    for (int i =  rows.length-1; i >= 0; i--) {
      DJCrosstabRow crosstabRow = rows[i];
      JRDesignField field = new JRDesignField();
      field.setName(crosstabRow.getProperty().getProperty());
      field.setValueClassName(crosstabRow.getProperty().getValueClassName());
      try {
        jrDataset.addField(field);
      } catch (JRException e) {
        log.error(e.getMessage(),e);
      }
    }
    for (int i = cols.length-1; i >= 0; i--) {
      DJCrosstabColumn crosstabColumn = cols[i];
      JRDesignField field = new JRDesignField();
      field.setName(crosstabColumn.getProperty().getProperty());
      field.setValueClassName(crosstabColumn.getProperty().getValueClassName());
      try {
        jrDataset.addField(field);
      } catch (JRException e) {
        log.error(e.getMessage(),e);
      }
    }
    JRDesignField field = new JRDesignField();
    field.setName(djcrosstab.getMeasure(0).getProperty().getProperty());
    field.setValueClassName(djcrosstab.getMeasure(0).getProperty().getValueClassName());
    try {
      jrDataset.addField(field);
    } catch (JRException e) {
      log.error(e.getMessage(),e);
    }


    jrcross.setDataset(dataset);
    Random rd = new Random();
    String dsName = "crosstabDataSource_" + rd.nextLong();

    while (design.getDatasetMap().containsKey(dsName)){
      dsName = "crosstabDataSource_" + rd.nextLong();
    }

    datasetRun.setDatasetName(dsName);
    jrDataset.setName(dsName);

    log.debug("Crosstab dataset name = " + dsName);
    try {
        if ( design.getDatasetMap().containsKey(jrDataset.getName())==false)
View Full Code Here

   * @param djcrosstab
   */
  private void registerDataSet(DJCrosstab djcrosstab) {
    JRDesignCrosstabDataset dataset = new JRDesignCrosstabDataset();
    dataset.setDataPreSorted(false);
    JRDesignDatasetRun datasetRun = new JRDesignDatasetRun();
//    datasetRun.setDatasetName("sub1");
    JRDesignExpression exp = ExpressionUtils.getDataSourceExpression(djcrosstab.getDatasource());
    datasetRun.setDataSourceExpression(exp);



    dataset.setDatasetRun(datasetRun);


    JRDesignDataset jrDataset = new JRDesignDataset(false);
//    jrDataset.setName("sub1");

    for (int i =  rows.length-1; i >= 0; i--) {
      DJCrosstabRow crosstabRow = rows[i];
      JRDesignField field = new JRDesignField();
      field.setName(crosstabRow.getProperty().getProperty());
      field.setValueClassName(crosstabRow.getProperty().getValueClassName());
      try {
        jrDataset.addField(field);
      } catch (JRException e) {
        log.error(e.getMessage(),e);
      }
    }
    for (int i = cols.length-1; i >= 0; i--) {
      DJCrosstabColumn crosstabColumn = cols[i];
      JRDesignField field = new JRDesignField();
      field.setName(crosstabColumn.getProperty().getProperty());
      field.setValueClassName(crosstabColumn.getProperty().getValueClassName());
      try {
        jrDataset.addField(field);
      } catch (JRException e) {
        log.error(e.getMessage(),e);
      }
    }
    JRDesignField field = new JRDesignField();
    field.setName(djcrosstab.getMeasure(0).getProperty().getProperty());
    field.setValueClassName(djcrosstab.getMeasure(0).getProperty().getValueClassName());
    try {
      jrDataset.addField(field);
    } catch (JRException e) {
      log.error(e.getMessage(),e);
    }


    jrcross.setDataset(dataset);
    Random rd = new Random();
    String dsName = "crosstabDataSource_" + rd.nextLong();

    while (design.getDatasetMap().containsKey(dsName)){
      dsName = "crosstabDataSource_" + rd.nextLong();
    }

    datasetRun.setDatasetName(dsName);
    jrDataset.setName(dsName);

    log.debug("Crosstab dataset name = " + dsName);
    try {
        if ( design.getDatasetMap().containsKey(jrDataset.getName())==false)
View Full Code Here

   * @param djcrosstab
   */
  private void registerDataSet(DJCrosstab djcrosstab) {
    JRDesignCrosstabDataset dataset = new JRDesignCrosstabDataset();
    dataset.setDataPreSorted(djcrosstab.getDatasource().isPreSorted());
    JRDesignDatasetRun datasetRun = new JRDesignDatasetRun();
//    datasetRun.setDatasetName("sub1");
    JRDesignExpression exp = ExpressionUtils.getDataSourceExpression(djcrosstab.getDatasource());
    datasetRun.setDataSourceExpression(exp);



    dataset.setDatasetRun(datasetRun);


    JRDesignDataset jrDataset = new JRDesignDataset(false);
//    jrDataset.setName("sub1");

    for (int i =  rows.length-1; i >= 0; i--) {
      DJCrosstabRow crosstabRow = rows[i];
      JRDesignField field = new JRDesignField();
      field.setName(crosstabRow.getProperty().getProperty());
      field.setValueClassName(crosstabRow.getProperty().getValueClassName());
      try {
        jrDataset.addField(field);
      } catch (JRException e) {
        log.error(e.getMessage(),e);
      }
    }
    for (int i = cols.length-1; i >= 0; i--) {
      DJCrosstabColumn crosstabColumn = cols[i];
      JRDesignField field = new JRDesignField();
      field.setName(crosstabColumn.getProperty().getProperty());
      field.setValueClassName(crosstabColumn.getProperty().getValueClassName());
      try {
        jrDataset.addField(field);
      } catch (JRException e) {
        log.error(e.getMessage(),e);
      }
    }
   
    for (Iterator iterator = djcrosstab.getMeasures().iterator(); iterator.hasNext();) {
      JRDesignField field = new JRDesignField();
      DJCrosstabMeasure djmeasure = (DJCrosstabMeasure) iterator.next();
      field.setName(djmeasure.getProperty().getProperty());
      field.setValueClassName(djmeasure.getProperty().getValueClassName());
      try {
        jrDataset.addField(field);
      } catch (JRException e) {
        log.error(e.getMessage(),e);
      }
    }
   
//    field.setName(djcrosstab.getMeasure(0).getProperty().getProperty());
//    field.setValueClassName(djcrosstab.getMeasure(0).getProperty().getValueClassName());
//    try {
//      jrDataset.addField(field);
//    } catch (JRException e) {
//      log.error(e.getMessage(),e);
//    }


    jrcross.setDataset(dataset);
    Random rd = new Random();
    String dsName = "crosstabDataSource_" + Math.abs(rd.nextLong());

    while (design.getDatasetMap().containsKey(dsName)){
      dsName = "crosstabDataSource_" + Math.abs(rd.nextLong());
    }

    datasetRun.setDatasetName(dsName);
    jrDataset.setName(dsName);

    log.debug("Crosstab dataset name = " + dsName);
    try {
        if ( design.getDatasetMap().containsKey(jrDataset.getName())==false)
View Full Code Here

   * @param djcrosstab
   */
  private void registerDataSet(DJCrosstab djcrosstab) {
    JRDesignCrosstabDataset dataset = new JRDesignCrosstabDataset();
    dataset.setDataPreSorted(djcrosstab.getDatasource().isPreSorted());
    JRDesignDatasetRun datasetRun = new JRDesignDatasetRun();
//    datasetRun.setDatasetName("sub1");
    JRDesignExpression exp = ExpressionUtils.getDataSourceExpression(djcrosstab.getDatasource());
    datasetRun.setDataSourceExpression(exp);



    dataset.setDatasetRun(datasetRun);


    JRDesignDataset jrDataset = new JRDesignDataset(false);
//    jrDataset.setName("sub1");

    for (int i =  rows.length-1; i >= 0; i--) {
      DJCrosstabRow crosstabRow = rows[i];
      JRDesignField field = new JRDesignField();
      field.setName(crosstabRow.getProperty().getProperty());
      field.setValueClassName(crosstabRow.getProperty().getValueClassName());
      try {
        jrDataset.addField(field);
      } catch (JRException e) {
        log.error(e.getMessage(),e);
      }
    }
    for (int i = cols.length-1; i >= 0; i--) {
      DJCrosstabColumn crosstabColumn = cols[i];
      JRDesignField field = new JRDesignField();
      field.setName(crosstabColumn.getProperty().getProperty());
      field.setValueClassName(crosstabColumn.getProperty().getValueClassName());
      try {
        jrDataset.addField(field);
      } catch (JRException e) {
        log.error(e.getMessage(),e);
      }
    }
   
    for (Iterator iterator = djcrosstab.getMeasures().iterator(); iterator.hasNext();) {
      JRDesignField field = new JRDesignField();
      DJCrosstabMeasure djmeasure = (DJCrosstabMeasure) iterator.next();
      field.setName(djmeasure.getProperty().getProperty());
      field.setValueClassName(djmeasure.getProperty().getValueClassName());
      try {
        jrDataset.addField(field);
      } catch (JRException e) {
        log.error(e.getMessage(),e);
      }
    }
   
//    field.setName(djcrosstab.getMeasure(0).getProperty().getProperty());
//    field.setValueClassName(djcrosstab.getMeasure(0).getProperty().getValueClassName());
//    try {
//      jrDataset.addField(field);
//    } catch (JRException e) {
//      log.error(e.getMessage(),e);
//    }


    jrcross.setDataset(dataset);
    Random rd = new Random();
    String dsName = "crosstabDataSource_" + rd.nextLong();

    while (design.getDatasetMap().containsKey(dsName)){
      dsName = "crosstabDataSource_" + rd.nextLong();
    }

    datasetRun.setDatasetName(dsName);
    jrDataset.setName(dsName);

    log.debug("Crosstab dataset name = " + dsName);
    try {
        if ( design.getDatasetMap().containsKey(jrDataset.getName())==false)
View Full Code Here

   * @param djcrosstab
   */
  private void registerDataSet(DJCrosstab djcrosstab) {
    JRDesignCrosstabDataset dataset = new JRDesignCrosstabDataset();
    dataset.setDataPreSorted(djcrosstab.getDatasource().isPreSorted());
    JRDesignDatasetRun datasetRun = new JRDesignDatasetRun();
//    datasetRun.setDatasetName("sub1");
    JRDesignExpression exp = ExpressionUtils.getDataSourceExpression(djcrosstab.getDatasource());
    datasetRun.setDataSourceExpression(exp);



    dataset.setDatasetRun(datasetRun);


    JRDesignDataset jrDataset = new JRDesignDataset(false);
//    jrDataset.setName("sub1");

    for (int i =  rows.length-1; i >= 0; i--) {
      DJCrosstabRow crosstabRow = rows[i];
      JRDesignField field = new JRDesignField();
      field.setName(crosstabRow.getProperty().getProperty());
      field.setValueClassName(crosstabRow.getProperty().getValueClassName());
      try {
        jrDataset.addField(field);
      } catch (JRException e) {
        log.error(e.getMessage(),e);
      }
    }
    for (int i = cols.length-1; i >= 0; i--) {
      DJCrosstabColumn crosstabColumn = cols[i];
      JRDesignField field = new JRDesignField();
      field.setName(crosstabColumn.getProperty().getProperty());
      field.setValueClassName(crosstabColumn.getProperty().getValueClassName());
      try {
        jrDataset.addField(field);
      } catch (JRException e) {
        log.error(e.getMessage(),e);
      }
    }
   
    for (Iterator iterator = djcrosstab.getMeasures().iterator(); iterator.hasNext();) {
      JRDesignField field = new JRDesignField();
      DJCrosstabMeasure djmeasure = (DJCrosstabMeasure) iterator.next();
      field.setName(djmeasure.getProperty().getProperty());
      field.setValueClassName(djmeasure.getProperty().getValueClassName());
      try {
        jrDataset.addField(field);
      } catch (JRException e) {
        log.error(e.getMessage(),e);
      }
    }
   
//    field.setName(djcrosstab.getMeasure(0).getProperty().getProperty());
//    field.setValueClassName(djcrosstab.getMeasure(0).getProperty().getValueClassName());
//    try {
//      jrDataset.addField(field);
//    } catch (JRException e) {
//      log.error(e.getMessage(),e);
//    }

    jrcross.setDataset(dataset);   
    String dsName = "crosstabDataSource_" + Math.abs(random.nextLong());

    while (design.getDatasetMap().containsKey(dsName)){
      dsName = "crosstabDataSource_" + Math.abs(random.nextLong());
    }

    datasetRun.setDatasetName(dsName);
    jrDataset.setName(dsName);

    log.debug("Crosstab dataset name = " + dsName);
    try {
        if ( design.getDatasetMap().containsKey(jrDataset.getName())==false)
View Full Code Here

   * @param djcrosstab
   */
  private void registerDataSet(DJCrosstab djcrosstab) {
    JRDesignCrosstabDataset dataset = new JRDesignCrosstabDataset();
    dataset.setDataPreSorted(djcrosstab.getDatasource().isPreSorted());
    JRDesignDatasetRun datasetRun = new JRDesignDatasetRun();
//    datasetRun.setDatasetName("sub1");
    JRDesignExpression exp = ExpressionUtils.getDataSourceExpression(djcrosstab.getDatasource());
    datasetRun.setDataSourceExpression(exp);



    dataset.setDatasetRun(datasetRun);


    JRDesignDataset jrDataset = new JRDesignDataset(false);
//    jrDataset.setName("sub1");

    for (int i =  rows.length-1; i >= 0; i--) {
      DJCrosstabRow crosstabRow = rows[i];
      JRDesignField field = new JRDesignField();
      field.setName(crosstabRow.getProperty().getProperty());
      field.setValueClassName(crosstabRow.getProperty().getValueClassName());
      try {
        jrDataset.addField(field);
      } catch (JRException e) {
        log.error(e.getMessage(),e);
      }
    }
    for (int i = cols.length-1; i >= 0; i--) {
      DJCrosstabColumn crosstabColumn = cols[i];
      JRDesignField field = new JRDesignField();
      field.setName(crosstabColumn.getProperty().getProperty());
      field.setValueClassName(crosstabColumn.getProperty().getValueClassName());
      try {
        jrDataset.addField(field);
      } catch (JRException e) {
        log.error(e.getMessage(),e);
      }
    }
    JRDesignField field = new JRDesignField();
    field.setName(djcrosstab.getMeasure(0).getProperty().getProperty());
    field.setValueClassName(djcrosstab.getMeasure(0).getProperty().getValueClassName());
    try {
      jrDataset.addField(field);
    } catch (JRException e) {
      log.error(e.getMessage(),e);
    }


    jrcross.setDataset(dataset);
    Random rd = new Random();
    String dsName = "crosstabDataSource_" + rd.nextLong();

    while (design.getDatasetMap().containsKey(dsName)){
      dsName = "crosstabDataSource_" + rd.nextLong();
    }

    datasetRun.setDatasetName(dsName);
    jrDataset.setName(dsName);

    log.debug("Crosstab dataset name = " + dsName);
    try {
        if ( design.getDatasetMap().containsKey(jrDataset.getName())==false)
View Full Code Here

   * @param djcrosstab
   */
  private void registerDataSet(DJCrosstab djcrosstab) {
    JRDesignCrosstabDataset dataset = new JRDesignCrosstabDataset();
    dataset.setDataPreSorted(djcrosstab.getDatasource().isPreSorted());
    JRDesignDatasetRun datasetRun = new JRDesignDatasetRun();
//    datasetRun.setDatasetName("sub1");
    JRDesignExpression exp = ExpressionUtils.getDataSourceExpression(djcrosstab.getDatasource());
    datasetRun.setDataSourceExpression(exp);



    dataset.setDatasetRun(datasetRun);


    JRDesignDataset jrDataset = new JRDesignDataset(false);
//    jrDataset.setName("sub1");

    for (int i =  rows.length-1; i >= 0; i--) {
      DJCrosstabRow crosstabRow = rows[i];
      JRDesignField field = new JRDesignField();
      field.setName(crosstabRow.getProperty().getProperty());
      field.setValueClassName(crosstabRow.getProperty().getValueClassName());
      try {
        jrDataset.addField(field);
      } catch (JRException e) {
        log.error(e.getMessage(),e);
      }
    }
    for (int i = cols.length-1; i >= 0; i--) {
      DJCrosstabColumn crosstabColumn = cols[i];
      JRDesignField field = new JRDesignField();
      field.setName(crosstabColumn.getProperty().getProperty());
      field.setValueClassName(crosstabColumn.getProperty().getValueClassName());
      try {
        jrDataset.addField(field);
      } catch (JRException e) {
        log.error(e.getMessage(),e);
      }
    }
   
    for (Iterator iterator = djcrosstab.getMeasures().iterator(); iterator.hasNext();) {
      JRDesignField field = new JRDesignField();
      DJCrosstabMeasure djmeasure = (DJCrosstabMeasure) iterator.next();
      field.setName(djmeasure.getProperty().getProperty());
      field.setValueClassName(djmeasure.getProperty().getValueClassName());
      try {
        jrDataset.addField(field);
      } catch (JRException e) {
        log.error(e.getMessage(),e);
      }
    }
   
//    field.setName(djcrosstab.getMeasure(0).getProperty().getProperty());
//    field.setValueClassName(djcrosstab.getMeasure(0).getProperty().getValueClassName());
//    try {
//      jrDataset.addField(field);
//    } catch (JRException e) {
//      log.error(e.getMessage(),e);
//    }


    jrcross.setDataset(dataset);
    Random rd = new Random();
    String dsName = "crosstabDataSource_" + Math.abs(rd.nextLong());

    while (design.getDatasetMap().containsKey(dsName)){
      dsName = "crosstabDataSource_" + Math.abs(rd.nextLong());
    }

    datasetRun.setDatasetName(dsName);
    jrDataset.setName(dsName);

    log.debug("Crosstab dataset name = " + dsName);
    try {
        if ( design.getDatasetMap().containsKey(jrDataset.getName())==false)
View Full Code Here

TOP

Related Classes of net.sf.jasperreports.engine.design.JRDesignDatasetRun

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.