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 BookmarkHelperprotected JRCalculatorprotected Map<String, JRFillDataset> Map of datasets (JRFillDatasetobjects} indexed by name.protected DelayedFillActionsprotected final JRFillObjectFactoryprotected JRFillContextprotected final intprotected Threadprotected FillListenerprotected FormatFactoryprotected booleanprotected JasperPrintprotected JasperReportThe report.protected JasperReportsContextprotected JRFillDatasetMain report dataset.protected FillerParentprotected JRPropertiesUtilprotected JasperReportSourceprotected RepositoryContextprotected JRAbstractScriptletprotected intprotected JRVirtualizationContext -
Constructor Summary
ConstructorsConstructorDescriptionBaseReportFiller(JasperReportsContext jasperReportsContext, JasperReportSource reportSource, FillerParent parent) BaseReportFiller(JasperReportsContext jasperReportsContext, JasperReport jasperReport, FillerParent parent) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddBoundElement(JRFillElement element, JRPrintElement printElement, JREvaluationTime evaluationTime, FillPageKey pageKey) voidaddFillListener(FillListener fillListener) Adds a fill lister to be notified by events that occur during the fill.protected voidprotected voidaddVariableCalculationReq(String variableName, CalculationEnum calculation) Adds a variable calculation request.voidCancels the fill process.protected voidprotected voidprotected final voidcreateBoundElementMaps(JREvaluationTime evaluationTime) protected voidevaluateExpression(JRExpression expression, byte evaluation) Evaluates an expressionfill(Map<String, Object> parameterValues, Connection conn) fill(Map<String, Object> parameterValues, JRDataSource ds) protected JRFillExpressionEvaluatorprotected FormatFactoryReturns the report format factory.Returns the report.Returns the report locale.protected BooleangetOwnIgnorePagination(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 TimeZoneReturns the report time zone.intgetVariable(String variableName) Returns a report variable.getVariableValue(String variableName) Returns the value of a variable.protected abstract voidignorePaginationSet(Map<String, Object> parameterValues) protected final voidprotected abstract JRFillObjectFactoryprotected voidinitVirtualizationContext(Map<String, Object> parameterValues) protected booleanbooleanprotected booleanbooleanabstract booleanprotected booleanprotected abstract voidvoidrecordUsedPageWidth(int width) protected voidresolveBoundElements(JREvaluationTime evaluationTime, byte evaluation) protected voidprotected voidprotected voidsetConnectionParameterValue(Map<String, Object> parameterValues, Connection conn) protected voidsetDatasourceParameterValue(Map<String, Object> parameterValues, JRDataSource ds) protected final voidsetFormatFactory(Map<String, Object> parameterValues) voidsetIgnorePagination(Map<String, Object> parameterValues) protected voidsetInterrupted(boolean isInterrupted) protected voidsetJasperReportsContext(JasperReportsContext jasperReportsContext) protected voidsetParameters(Map<String, Object> parameterValues) protected final voidsetParametersToContext(Map<String, Object> parameterValues) protected voidsetVirtualPageSize(Map<String, Object> parameterValues) voidupdateBookmark(JRPrintElement element) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 (JRFillDatasetobjects} 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:
addFillListenerin 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:
fillin interfaceReportFiller- Throws:
JRException
-
setConnectionParameterValue
-
fill
@continuable public JasperPrint fill(Map<String, Object> parameterValues, JRDataSource ds) throws JRException- Specified by:
fillin 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:
getFillContextin 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:
cancelFillin 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()
-