exporter classes that transform the generated documents into new output formats.
This way, if you need to export your reports into a special output format that is not yet available in the
core library, you might decide to implement yourself the dori.jasper.engine.JRExporter
intece.
The JasperReports Ultimate Guide
Page 69
Before deciding to implement this intece, it is important for you to understand how the
implementation is expected to function.
All the input data the exporter might need should be supplied to it using the so-called exporter
parameters, before the exporting process is started.
This is because the exporting process will be always invoked by calling the exportReport() method
of the dori.jasper.engine.JRExporter intece, and this method does not receive any
parameters itself, when called. The exporter parameters have to be already set using the
setParameter() method on the exporter instance you are working with, before launching the export
task.
You might choose to bulk set all your exporter parameters using the setParameters() method which
receives a java.util.Map object containing the parameter values. The keys in this map should be
instances of the dori.jasper.engine.JRExporterParameter class, as you would supply when
individually calling the setParameter() method for each of your exporter parameters.
Note that no matter what the type of output your exporter produces, you will be using parameters to
indicate to the exporter where to place or send this output.
本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/ruanjian/article-30468-72.html
这样比较太简单了
感谢@SMTOWN让宋茜身高魔术般地变成了最矮的