All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apertereports.engine.AperteReport Maven / Gradle / Ivy

/**
 * 
 */
package org.apertereports.engine;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

import net.sf.jasperreports.engine.JRExpressionCollector;
import net.sf.jasperreports.engine.JRReport;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.JasperReport;
import net.sf.jasperreports.engine.base.JRBaseObjectFactory;

/**
 * 
 * Wrapper for class {@link JasperPrint} used by {@link ReportMaster} for
 * storing information about subreports.
 * 
 */
public class AperteReport {
	private Map subreports = new HashMap();
	private JasperReport jasperReport;

	/**
	 * Constructs a report by specifying the template report and compile
	 * information.
	 * 
	 */
	public AperteReport(JasperReport jasperReport) {
		this.jasperReport = jasperReport;
	}

	public Map getAllNestedSubreports() {
		Map map = new HashMap();
		map.putAll(subreports);
		for (AperteReport subreport : map.values()) {
			map.putAll(subreport.getAllNestedSubreports());
		}
		return map;
	}

	public Map getSubreports() {
		return subreports;
	}

	public void setSubreports(Map subreports) {
		this.subreports = subreports;
	}

	public JasperReport getJasperReport() {
		return jasperReport;
	}

	public void setJasperReport(JasperReport jasperReport) {
		this.jasperReport = jasperReport;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy