In addition to building reports via Pentaho Reporting's traditional API, it is also possible to build a report using Pentaho's Wizard API. This API is defined in the wizard-core library, within the org.pentaho.reporting.engine.classic.wizard
package and sub-packages. The DefaultWizardSpecification
class, defined in the model package, allows you to quickly populate a report with groupings and details. The Wizard API may incorporate predefined styles, allowing your organization to easily generate dynamic reports that fit your company's style requirements.
Once a WizardSpecification
is defined, you can easily populate a report with just two lines of code:
WizardProcessorUtil.applyWizardSpec(styledReport, wizardSpec); WizardProcessorUtil.ensureWizardProcessorIsAdded(styledReport, null);
The applyWizardSpec
inserts the wizardSpec
into the styledReport
, and the ensureWizardProcessorIsAdded
method adds a WizardProcessor
as a ReportPreProcessor
to the styledReport
, by calling the...