| Method from net.sf.jasperreports.engine.fill.JRFiller Detail: |
public static JRBaseFiller createFiller(JasperReport jasperReport) throws JRException {
JRBaseFiller filler = null;
switch (jasperReport.getPrintOrder())
{
case JRReport.PRINT_ORDER_HORIZONTAL :
{
filler = new JRHorizontalFiller(jasperReport);
break;
}
case JRReport.PRINT_ORDER_VERTICAL :
{
filler = new JRVerticalFiller(jasperReport);
break;
}
}
return filler;
}
|
public static JasperPrint fillReport(JasperReport jasperReport,
Map parameters) throws JRException {
JRBaseFiller filler = createFiller(jasperReport);
try
{
JasperPrint jasperPrint = filler.fill(parameters);
return jasperPrint;
}
catch (JRFillInterruptedException e)
{
throw new JRException("The report filling thread was interrupted.");
}
}
Fills a report.
The data source used to fill the report is determined in the following way:
- If a non-null value of the REPORT_DATA_SOURCE
has been specified, it will be used as data source.
- Otherwise, if the report has a query then a data source will be created based on the query and connection
parameter values.
- Otherwise, the report will be filled without a data source.
|
public static JasperPrint fillReport(JasperReport jasperReport,
Map parameters,
Connection conn) throws JRException {
JRBaseFiller filler = createFiller(jasperReport);
JasperPrint jasperPrint = null;
try
{
jasperPrint = filler.fill(parameters, conn);
}
catch(JRFillInterruptedException e)
{
throw new JRException("The report filling thread was interrupted.");
}
return jasperPrint;
}
|
public static JasperPrint fillReport(JasperReport jasperReport,
Map parameters,
JRDataSource dataSource) throws JRException {
JRBaseFiller filler = createFiller(jasperReport);
JasperPrint jasperPrint = null;
try
{
jasperPrint = filler.fill(parameters, dataSource);
}
catch(JRFillInterruptedException e)
{
throw new JRException("The report filling thread was interrupted.");
}
return jasperPrint;
}
|