当前位置: 首页>>代码示例>>Java>>正文


Java JRXlsExporter.setParameters方法代码示例

本文整理汇总了Java中net.sf.jasperreports.engine.export.JRXlsExporter.setParameters方法的典型用法代码示例。如果您正苦于以下问题:Java JRXlsExporter.setParameters方法的具体用法?Java JRXlsExporter.setParameters怎么用?Java JRXlsExporter.setParameters使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.sf.jasperreports.engine.export.JRXlsExporter的用法示例。


在下文中一共展示了JRXlsExporter.setParameters方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: exportToXLS

import net.sf.jasperreports.engine.export.JRXlsExporter; //导入方法依赖的package包/类
private void exportToXLS() {
    log.debug("exporting to XLS");
    xlsExporter = new JRXlsExporter();
    setExportParameter(JRXlsExporterParameter.IS_DETECT_CELL_TYPE,
            Boolean.TRUE);
    setExportParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET,
            Boolean.FALSE);
    xlsExporter.setParameters(getExportParameters());
    try {
        start = System.currentTimeMillis();
        xlsExporter.exportReport();
        log.info("export running time (msec): "
                + (System.currentTimeMillis() - start));
    } catch (JRException jre) {
        jre.printStackTrace();
        log.error(jre.getMessage());
    }
}
 
开发者ID:rmage,项目名称:gnvc-ims,代码行数:19,代码来源:OOReportGenerator.java

示例2: renderAsXls

import net.sf.jasperreports.engine.export.JRXlsExporter; //导入方法依赖的package包/类
/**
 * Render a report in XLS format using the supplied report data.
 * Writes the results to the supplied {@code OutputStream}.
 * @param report the {@code JasperReport} instance to render
 * @param parameters the parameters to use for rendering
 * @param stream the {@code OutputStream} to write the rendered report to
 * @param reportData a {@code JRDataSource}, {@code java.util.Collection} or object array
 * (converted accordingly), representing the report data to read fields from
 * @param exporterParameters a {@link Map} of {@link JRExporterParameter exporter parameters}
 * @throws JRException if rendering failed
 * @see #convertReportData
 */
public static void renderAsXls(JasperReport report, Map<String, Object> parameters, Object reportData,
		OutputStream stream, Map<JRExporterParameter, Object> exporterParameters) throws JRException {

	JasperPrint print = JasperFillManager.fillReport(report, parameters, convertReportData(reportData));
	JRXlsExporter exporter = new JRXlsExporter();
	exporter.setParameters(exporterParameters);
	render(exporter, print, stream);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:21,代码来源:JasperReportsUtils.java

示例3: renderAsXls

import net.sf.jasperreports.engine.export.JRXlsExporter; //导入方法依赖的package包/类
/**
 * Render a report in XLS format using the supplied report data.
 * Writes the results to the supplied {@code OutputStream}.
 * @param report the {@code JasperReport} instance to render
 * @param parameters the parameters to use for rendering
 * @param stream the {@code OutputStream} to write the rendered report to
 * @param reportData a {@code JRDataSource}, {@code java.util.Collection} or object array
 * (converted accordingly), representing the report data to read fields from
 * @param exporterParameters a {@link Map} of {@code JRExporterParameter exporter parameters}
 * @throws JRException if rendering failed
 * @see #convertReportData
 */
public static void renderAsXls(JasperReport report, Map<String, Object> parameters, Object reportData,
		OutputStream stream, Map<net.sf.jasperreports.engine.JRExporterParameter, Object> exporterParameters)
		throws JRException {

	JasperPrint print = JasperFillManager.fillReport(report, parameters, convertReportData(reportData));
	JRXlsExporter exporter = new JRXlsExporter();
	exporter.setParameters(exporterParameters);
	render(exporter, print, stream);
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:22,代码来源:JasperReportsUtils.java


注:本文中的net.sf.jasperreports.engine.export.JRXlsExporter.setParameters方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。