protected static String getUnitName(JRReport report, JRDataset dataset, String nameSuffix) {
    String className;
    if (dataset.isMainDataset()) {
      className = report.getName();
    } else {
      className = report.getName() + "_" + dataset.getName();
    }

    className = JRStringUtil.getJavaIdentifier(className) + nameSuffix;

    return className;
  }
  /**
   * Creates a fill dataset object.
   *
   * @param filler the filelr
   * @param dataset the template dataset
   * @param factory the fill object factory
   */
  protected JRFillDataset(JRBaseFiller filler, JRDataset dataset, JRFillObjectFactory factory) {
    factory.put(dataset, this);

    this.filler = filler;
    this.parent = dataset;
    this.isMain = dataset.isMainDataset();

    scriptletClassName = dataset.getScriptletClass();
    resourceBundleBaseName = dataset.getResourceBundle();
    whenResourceMissingType = dataset.getWhenResourceMissingType();

    query = dataset.getQuery();

    setParameters(dataset, factory);

    setFields(dataset, factory);

    setVariables(dataset, factory);

    setGroups(dataset, factory);
  }