Package net.sf.jasperreports.engine
Interface JRDatasetRun
-
- All Superinterfaces:
Cloneable
,JRCloneable
,JRIdentifiable
,JRPropertiesHolder
- All Known Implementing Classes:
FillDatasetRun
,JRBaseDatasetRun
,JRDesignDatasetRun
,JRFillDatasetRun
,MarkerFillDatasetRun
public interface JRDatasetRun extends JRCloneable, JRIdentifiable, JRPropertiesHolder
Interface of an sub dataset instantiation. Once a dataset is declared inside a report template, it can be used only if it's actually referenced by a chart, crosstab or other component. Simply declaring a dataset at the report level does not have any effect. When a dataset is referenced by a report component, a dataset run is instantiated. The dataset runs through the supplied data source performing all the variable calculations and the required data grouping. A dataset run declaration supplies the values for the dataset parameters as well as the data source through which the dataset will iterate. Optionally, ajava.sql.Connection
can be passed to the dataset instead of aJRDataSource
instance, when there is a SQL query associated with the dataset. This query is executed by the engine using the JDBC connection and thejava.sql.ResultSet
object obtained is iterated through. Dataset runs resemble subreports in the way parameters and the data source/connection are passed in. Charts, crosstabs and other report components can reference datasets by instantiating and configuring dataset runs. If no dataset run is specified for a component, the main dataset of the report is used.- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
- See Also:
JRDataset
,JRChartDataset.getDatasetType()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description JRExpression
getConnectionExpression()
Returns the DB connection expression.String
getDatasetName()
Returns the sub dataset name.JRExpression
getDataSourceExpression()
Returns the data source expression.JRDatasetParameter[]
getParameters()
Returns the list of parameter values.JRExpression
getParametersMapExpression()
Returns the parameters map expression.List<ReturnValue>
getReturnValues()
Returns the list of values to be copied from the subdataset.-
Methods inherited from interface net.sf.jasperreports.engine.JRCloneable
clone
-
Methods inherited from interface net.sf.jasperreports.engine.JRIdentifiable
getUUID
-
Methods inherited from interface net.sf.jasperreports.engine.JRPropertiesHolder
getParentProperties, getPropertiesMap, hasProperties
-
-
-
-
Method Detail
-
getDatasetName
String getDatasetName()
Returns the sub dataset name.- Returns:
- the sub dataset name
-
getParametersMapExpression
JRExpression getParametersMapExpression()
Returns the parameters map expression.The result of this expression is used as the parameters map when instantiating the dataset.
- Returns:
- the parameters map expression
-
getParameters
JRDatasetParameter[] getParameters()
Returns the list of parameter values.- Returns:
- the list of parameter values
-
getConnectionExpression
JRExpression getConnectionExpression()
Returns the DB connection expression.The result of this expression is used as the DB connection when instantiating the dataset.
- Returns:
- the DB connection expression
-
getDataSourceExpression
JRExpression getDataSourceExpression()
Returns the data source expression.The result of this expression is used as the data source when instantiating the dataset.
- Returns:
- the data source expression
-
getReturnValues
List<ReturnValue> getReturnValues()
Returns the list of values to be copied from the subdataset.- Returns:
- the list of copied values.
-
-