Package net.sf.jasperreports.engine.fill
Class BaseReportFiller
java.lang.Object
net.sf.jasperreports.engine.fill.BaseReportFiller
- All Implemented Interfaces:
ReportFiller
- Direct Known Subclasses:
JRBaseFiller
,PartReportFiller
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BookmarkHelper
protected JRCalculator
protected Map
<String, JRFillDataset> Map of datasets (JRFillDataset
objects} indexed by name.protected DelayedFillActions
protected final JRFillObjectFactory
protected JRFillContext
protected final int
protected Thread
protected FillListener
protected FormatFactory
protected boolean
protected JasperPrint
protected JasperReport
The report.protected JasperReportsContext
protected JRFillDataset
Main report dataset.protected FillerParent
protected JRPropertiesUtil
protected JasperReportSource
protected RepositoryContext
protected JRAbstractScriptlet
protected int
protected JRVirtualizationContext
-
Constructor Summary
ConstructorsConstructorDescriptionBaseReportFiller
(JasperReportsContext jasperReportsContext, JasperReportSource reportSource, FillerParent parent) BaseReportFiller
(JasperReportsContext jasperReportsContext, JasperReport jasperReport, FillerParent parent) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addBoundElement
(JRFillElement element, JRPrintElement printElement, JREvaluationTime evaluationTime, FillPageKey pageKey) void
addFillListener
(FillListener fillListener) Adds a fill lister to be notified by events that occur during the fill.protected void
protected void
addVariableCalculationReq
(String variableName, CalculationEnum calculation) Adds a variable calculation request.void
Cancels the fill process.protected void
protected void
protected final void
createBoundElementMaps
(JREvaluationTime evaluationTime) protected void
evaluateExpression
(JRExpression expression, byte evaluation) Evaluates an expressionfill
(Map<String, Object> parameterValues, Connection conn) fill
(Map<String, Object> parameterValues, JRDataSource ds) protected JRFillExpressionEvaluator
protected FormatFactory
Returns the report format factory.Returns the report.Returns the report locale.protected Boolean
getOwnIgnorePagination
(Map<String, Object> parameterValues, boolean onlySetAttribute) protected Map
<String, JRFillParameter> Returns the report parameters indexed by name.getParameterValue
(String parameterName) Returns the value of a parameter.Returns the map of parameter values.protected TimeZone
Returns the report time zone.int
getVariable
(String variableName) Returns a report variable.getVariableValue
(String variableName) Returns the value of a variable.protected abstract void
ignorePaginationSet
(Map<String, Object> parameterValues) protected final void
protected abstract JRFillObjectFactory
protected void
initVirtualizationContext
(Map<String, Object> parameterValues) protected boolean
boolean
protected boolean
boolean
abstract boolean
protected boolean
protected abstract void
void
recordUsedPageWidth
(int width) protected void
resolveBoundElements
(JREvaluationTime evaluationTime, byte evaluation) protected void
protected void
protected void
setConnectionParameterValue
(Map<String, Object> parameterValues, Connection conn) protected void
setDatasourceParameterValue
(Map<String, Object> parameterValues, JRDataSource ds) protected final void
setFormatFactory
(Map<String, Object> parameterValues) void
setIgnorePagination
(Map<String, Object> parameterValues) protected void
setInterrupted
(boolean isInterrupted) protected void
setJasperReportsContext
(JasperReportsContext jasperReportsContext) protected void
setParameters
(Map<String, Object> parameterValues) protected final void
setParametersToContext
(Map<String, Object> parameterValues) protected void
setVirtualPageSize
(Map<String, Object> parameterValues) void
updateBookmark
(JRPrintElement element) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.sf.jasperreports.engine.fill.ReportFiller
fill, isPageFinal
-
Field Details
-
jasperReportsContext
-
propertiesUtil
-
fillContext
-
parent
-
fillerId
protected final int fillerId -
printTransferPropertyPrefixes
-
reportSource
-
jasperReport
The report. -
repositoryContext
-
calculator
-
factory
-
mainDataset
Main report dataset. -
datasetMap
Map of datasets (JRFillDataset
objects} indexed by name. -
delayedActions
-
scriptlet
-
formatFactory
-
ignorePagination
protected boolean ignorePagination -
bookmarkHelper
-
virtualizationContext
-
jasperPrint
-
fillingThread
-
fillListener
-
usedPageWidth
protected int usedPageWidth
-
-
Constructor Details
-
BaseReportFiller
public BaseReportFiller(JasperReportsContext jasperReportsContext, JasperReport jasperReport, FillerParent parent) throws JRException - Throws:
JRException
-
BaseReportFiller
public BaseReportFiller(JasperReportsContext jasperReportsContext, JasperReportSource reportSource, FillerParent parent) throws JRException - Throws:
JRException
-
-
Method Details
-
jasperReportSet
protected abstract void jasperReportSet() -
initFillFactory
-
initDatasets
- Throws:
JRException
-
createBoundElementMaps
-
addFillListener
Adds a fill lister to be notified by events that occur during the fill.- Specified by:
addFillListener
in interfaceReportFiller
- Parameters:
fillListener
- the listener to add
-
getJasperReportsContext
-
getRepositoryContext
-
getPropertiesUtil
-
getReportSource
-
getJasperReport
Returns the report.- Returns:
- the report
-
getJasperPrint
-
setJasperReportsContext
-
setParametersToContext
-
initVirtualizationContext
-
setVirtualPageSize
-
fill
@continuable public JasperPrint fill(Map<String, Object> parameterValues, Connection conn) throws JRException- Specified by:
fill
in interfaceReportFiller
- Throws:
JRException
-
setConnectionParameterValue
-
fill
@continuable public JasperPrint fill(Map<String, Object> parameterValues, JRDataSource ds) throws JRException- Specified by:
fill
in interfaceReportFiller
- Throws:
JRException
-
setDatasourceParameterValue
-
setParameters
- Throws:
JRException
-
setBookmarkHelper
protected void setBookmarkHelper() -
setIgnorePagination
-
getOwnIgnorePagination
-
ignorePaginationSet
-
isIgnorePagination
public boolean isIgnorePagination() -
isInterrupted
protected boolean isInterrupted() -
isDeliberatelyInterrupted
protected boolean isDeliberatelyInterrupted() -
setInterrupted
protected void setInterrupted(boolean isInterrupted) -
checkInterrupted
protected void checkInterrupted() -
isPageBreakInhibited
public abstract boolean isPageBreakInhibited() -
getFillContext
- Specified by:
getFillContext
in interfaceReportFiller
-
getVirtualizationContext
-
getMainDataset
-
getParameterValuesMap
Returns the map of parameter values.- Returns:
- the map of parameter values
-
getParametersMap
Returns the report parameters indexed by name.- Returns:
- the report parameters map
-
getParameterValue
Returns the value of a parameter.- Parameters:
parameterName
- the parameter name- Returns:
- the parameter value
-
getLocale
Returns the report locale.- Returns:
- the report locale
-
getTimeZone
Returns the report time zone.- Returns:
- the report time zone
-
addVariableCalculationReq
Adds a variable calculation request.- Parameters:
variableName
- the variable namecalculation
- the calculation type
-
getVariable
Returns a report variable.- Parameters:
variableName
- the variable name- Returns:
- the variable
-
getVariableValue
Returns the value of a variable.- Parameters:
variableName
- the variable name- Returns:
- the variable value
- Throws:
JRRuntimeException
- when the variable does not exist
-
getExpressionEvaluator
-
isSubreport
protected boolean isSubreport() -
isMasterReport
public boolean isMasterReport() -
evaluateExpression
Evaluates an expression- Parameters:
expression
- the expressionevaluation
- the evaluation type- Returns:
- the evaluation result
- Throws:
JRException
-
setFormatFactory
-
getFormatFactory
Returns the report format factory.- Returns:
- the report format factory
-
addLastPageBookmarks
protected void addLastPageBookmarks() -
updateBookmark
-
detectPart
protected void detectPart() -
cancelFill
Cancels the fill process.- Specified by:
cancelFill
in interfaceReportFiller
- Throws:
JRException
-
clearFillingThread
protected void clearFillingThread() -
addBoundElement
protected void addBoundElement(JRFillElement element, JRPrintElement printElement, JREvaluationTime evaluationTime, FillPageKey pageKey) -
resolveBoundElements
protected void resolveBoundElements(JREvaluationTime evaluationTime, byte evaluation) throws JRException - Throws:
JRException
-
resolveMasterBoundElements
- Throws:
JRException
-
recordUsedPageWidth
public void recordUsedPageWidth(int width) -
getUsedPageWidth
public int getUsedPageWidth()
-