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

net.sf.dynamicreports.jasper.transformation.MainDatasetExpressionTransform Maven / Gradle / Ivy

Go to download

DynamicReports is an open source Java reporting library based on JasperReports. It allows to create dynamic report designs and it doesn't need a visual report designer. You can very quickly create reports and produce documents that can be displayed, printed or exported into many popular formats such as PDF, Excel, Word and others.

There is a newer version: 6.20.1
Show newest version
/*
 * DynamicReports - Free Java reporting library for creating reports dynamically
 *
 * Copyright (C) 2010 - 2018 Ricardo Mariaca and the Dynamic Reports Contributors
 * http://www.dynamicreports.org
 *
 * This file is part of DynamicReports.
 *
 * DynamicReports is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * DynamicReports is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with DynamicReports. If not, see .
 */
package net.sf.dynamicreports.jasper.transformation;

import net.sf.dynamicreports.design.definition.DRIDesignField;
import net.sf.dynamicreports.design.definition.DRIDesignGroup;
import net.sf.dynamicreports.design.definition.DRIDesignSort;
import net.sf.dynamicreports.design.definition.DRIDesignVariable;
import net.sf.dynamicreports.design.definition.expression.DRIDesignComplexExpression;
import net.sf.dynamicreports.design.definition.expression.DRIDesignJasperExpression;
import net.sf.dynamicreports.design.definition.expression.DRIDesignSimpleExpression;
import net.sf.dynamicreports.design.definition.expression.DRIDesignSystemExpression;
import net.sf.dynamicreports.jasper.base.JasperCustomValues;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JRGroup;
import net.sf.jasperreports.engine.design.JRDesignField;
import net.sf.jasperreports.engine.design.JRDesignSortField;
import net.sf.jasperreports.engine.design.JRDesignVariable;

import java.util.Collection;

/**
 * 

MainDatasetExpressionTransform class.

* * @author Ricardo Mariaca ([email protected]) * @version $Id: $Id */ public class MainDatasetExpressionTransform extends AbstractExpressionTransform { private JasperTransformAccessor accessor; /** *

Constructor for MainDatasetExpressionTransform.

* * @param accessor a {@link net.sf.dynamicreports.jasper.transformation.JasperTransformAccessor} object. */ public MainDatasetExpressionTransform(JasperTransformAccessor accessor) { this.accessor = accessor; } /** {@inheritDoc} */ @Override protected JasperCustomValues getCustomValues() { return accessor.getCustomValues(); } /** {@inheritDoc} */ @Override protected JRGroup getGroup(DRIDesignGroup group) { return accessor.getGroupTransform().getGroup(group); } /** {@inheritDoc} */ @Override protected Collection getFields() { return accessor.getReport().getFields(); } /** {@inheritDoc} */ @Override protected Collection getVariables() { return accessor.getReport().getVariables(); } /** {@inheritDoc} */ @Override protected Collection getSystemExpressions() { return accessor.getReport().getSystemExpressions(); } /** {@inheritDoc} */ @Override protected Collection getJasperExpressions() { return accessor.getReport().getJasperExpressions(); } /** {@inheritDoc} */ @Override protected Collection getSimpleExpressions() { return accessor.getReport().getSimpleExpressions(); } /** {@inheritDoc} */ @Override protected Collection getComplexExpressions() { return accessor.getReport().getComplexExpressions(); } /** {@inheritDoc} */ @Override protected Collection getSorts() { return accessor.getReport().getSorts(); } /** {@inheritDoc} */ @Override protected void addField(JRDesignField field) throws JRException { accessor.getDesign().addField(field); } /** {@inheritDoc} */ @Override protected void addVariable(JRDesignVariable variable) throws JRException { accessor.getDesign().addVariable(variable); } /** {@inheritDoc} */ @Override protected void addSort(JRDesignSortField sort) throws JRException { accessor.getDesign().addSortField(sort); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy