org.pentaho.reporting.engine.classic.core.event
Interface ReportListener

All Superinterfaces:
EventListener
All Known Subinterfaces:
AggregationFunction, FieldAggregationFunction, Function, LayoutProcessorFunction, OutputFunction, StructureFunction
All Known Implementing Classes:
AbstractElementFormatFunction, AbstractFunction, AttributeExpressionsEvaluator, CellFormatFunction, ConditionalItemSumFunction, CountDistinctFunction, CreateGroupAnchorsFunction, CreateHyperLinksFunction, CrosstabProcessorFunction, CSVWriter, DefaultOutputFunction, ElementColorFunction, ElementTrafficLightFunction, ElementVisibilityFunction, ElementVisibilitySwitchFunction, EventMonitorFunction, FormulaFunction, GroupCountFunction, HideElementByNameFunction, HideElementIfDataAvailableExpression, HideNullValuesFunction, HidePageBandForTableExportFunction, ItemAvgFunction, ItemCountFunction, ItemHideFunction, ItemMaxFunction, ItemMinFunction, ItemPercentageFunction, ItemSumFunction, MetaDataStyleEvaluator, NegativeNumberPaintChangeFunction, PageFunction, PageItemCountFunction, PageItemSumFunction, PageOfPagesFunction, PageTotalFunction, PaintComponentFunction, PaintDynamicComponentFunction, RowBandingFunction, SheetNameFunction, ShowElementByNameFunction, ShowElementIfDataAvailableExpression, SingleValueQueryFunction, StyleExpressionsEvaluator, TotalCalculationFunction, TotalGroupCountFunction, TotalGroupSumFunction, TotalGroupSumQuotientFunction, TotalGroupSumQuotientPercentFunction, TotalItemCountFunction, TotalItemMaxFunction, TotalItemMinFunction, TotalPageItemCountFunction, TriggerPageFooterFunction, WizardItemHideFunction, XMLWriter

public interface ReportListener
extends EventListener

ReportListeners get informed whenever the state of a report changes.

You should be aware that most events occur more than once. For example, the reportStarted event will be triggered every time the report is regenerated.

When handling these events, use the reportState to track the current changes of the report.

Author:
Thomas Morgner

Method Summary
 void groupFinished(ReportEvent event)
          Receives notification that a group is finished.
 void groupStarted(ReportEvent event)
          Receives notification that a new group has started.
 void itemsAdvanced(ReportEvent event)
          Receives notification that a new row has been read.
 void itemsFinished(ReportEvent event)
          Receives notification that a group of item bands has been completed.
 void itemsStarted(ReportEvent event)
          Receives notification that a group of item bands is about to be processed.
 void reportDone(ReportEvent event)
          Receives notification that report generation has completed, the report footer was printed, no more output is done.
 void reportFinished(ReportEvent event)
          Receives notification that report generation has finished (the last record is read and all groups are closed).
 void reportInitialized(ReportEvent event)
          Receives notification that report generation initializes the current run.
 void reportStarted(ReportEvent event)
          Receives notification that report generation has started.
 

Method Detail

reportInitialized

void reportInitialized(ReportEvent event)
Receives notification that report generation initializes the current run.

The event carries a ReportState.Started state. Use this to initialize the report.

Parameters:
event - The event.

reportStarted

void reportStarted(ReportEvent event)
Receives notification that report generation has started.

The event carries a ReportState.Started state. Use this to prepare the report header.

Parameters:
event - The event.

reportFinished

void reportFinished(ReportEvent event)
Receives notification that report generation has finished (the last record is read and all groups are closed).

Parameters:
event - The event.

reportDone

void reportDone(ReportEvent event)
Receives notification that report generation has completed, the report footer was printed, no more output is done. This is a helper event to shut down the output service.

Parameters:
event - The event.

groupStarted

void groupStarted(ReportEvent event)
Receives notification that a new group has started.

The group can be determined by the report state's getCurrentGroup() function.

Parameters:
event - The event.

groupFinished

void groupFinished(ReportEvent event)
Receives notification that a group is finished.

The group can be determined by the report state's getCurrentGroup() function.

Parameters:
event - The event.

itemsStarted

void itemsStarted(ReportEvent event)
Receives notification that a group of item bands is about to be processed.

The next events will be itemsAdvanced events until the itemsFinished event is raised.

Parameters:
event - The event.

itemsFinished

void itemsFinished(ReportEvent event)
Receives notification that a group of item bands has been completed.

The itemBand is finished, the report starts to close open groups.

Parameters:
event - The event.

itemsAdvanced

void itemsAdvanced(ReportEvent event)
Receives notification that a new row has been read.

This event is raised before an ItemBand is printed.

Parameters:
event - The event.