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


Java JasperExportManager.exportReportToPdfFile方法代码示例

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


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

示例1: testInvoice

import net.sf.jasperreports.engine.JasperExportManager; //导入方法依赖的package包/类
@Test
public void testInvoice(){
  List<InvoiceItem> invoiceItems = new ArrayList<>();

  int count = 1;
  for (IDemandItem demandItem : getDemandItems()) {
    InvoiceItem invoiceItem = new InvoiceItem();
    invoiceItem.setItem(demandItem.getMaterialId().toString());
    invoiceItem.setQuantity(demandItem.getQuantity().toString());
    invoiceItem.setRecommended(demandItem.getRecommendedOrderQuantity().toString());
    invoiceItem.setRemarks("Blah");
      invoiceItem.setBatchId("AB/1234/56"+count);
      invoiceItem.setExpiry("11/03/2020");
      invoiceItem.setManufacturer("Serum");
      invoiceItem.setBatchQuantity(BigDecimal.TEN.toPlainString());
    invoiceItem.setSno(String.valueOf(count++));
    invoiceItems.add(invoiceItem);
  }

  JRBeanCollectionDataSource beanColDataSource = new JRBeanCollectionDataSource(invoiceItems);

  try {

    Map<String, Object> hm = new HashMap<>();
    JasperPrint jasperPrint = JasperFillManager.fillReport(
        JasperCompileManager
            .compileReport(Thread.currentThread().getContextClassLoader().getResourceAsStream(
                "test_logistimo_invoice.jrxml")), hm, beanColDataSource);

    JasperExportManager.exportReportToPdfFile(jasperPrint, "/tmp/logistimo_invoice.pdf");


  } catch (Exception e) {
    e.printStackTrace();
  }


}
 
开发者ID:logistimo,项目名称:logistimo-web-service,代码行数:39,代码来源:GenerateInvoiceTest.java

示例2: pdf

import net.sf.jasperreports.engine.JasperExportManager; //导入方法依赖的package包/类
/**
 *
 */
public void pdf() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToPdfFile("build/reports/NoReport.jrprint");
	System.err.println("PDF creation time : " + (System.currentTimeMillis() - start));
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:10,代码来源:NoReportApp.java

示例3: pdf

import net.sf.jasperreports.engine.JasperExportManager; //导入方法依赖的package包/类
/**
 *
 */
public void pdf() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToPdfFile("build/reports/XlsxDataSourceReport.jrprint");
	System.err.println("PDF creation time : " + (System.currentTimeMillis() - start));
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:10,代码来源:XlsxDataSourceApp.java

示例4: pdf

import net.sf.jasperreports.engine.JasperExportManager; //导入方法依赖的package包/类
/**
 *
 */
public void pdf() throws JRException
{
	File[] files = getFiles(new File("build/reports"), "jrprint");
	for(int i = 0; i < files.length; i++)
	{
		File reportFile = files[i];
		long start = System.currentTimeMillis();
		JasperExportManager.exportReportToPdfFile(
			reportFile.getAbsolutePath()
			);
		System.err.println("Report : " + reportFile + ". PDF creation time : " + (System.currentTimeMillis() - start));
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:17,代码来源:CrosstabApp.java

示例5: pdf

import net.sf.jasperreports.engine.JasperExportManager; //导入方法依赖的package包/类
/**
 *
 */
public void pdf() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToPdfFile("build/reports/DateRangeReport.jrprint");
	System.err.println("PDF creation time : " + (System.currentTimeMillis() - start));
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:10,代码来源:DateRangeApp.java

示例6: pdf

import net.sf.jasperreports.engine.JasperExportManager; //导入方法依赖的package包/类
/**
 *
 */
public void pdf() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToPdfFile("build/reports/XChartReport.jrprint");
	System.err.println("PDF creation time : " + (System.currentTimeMillis() - start));
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:10,代码来源:XChartApp.java

示例7: pdf

import net.sf.jasperreports.engine.JasperExportManager; //导入方法依赖的package包/类
/**
 *
 */
public void pdf() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToPdfFile("build/reports/FormsReport.jrprint");
	System.err.println("PDF creation time : " + (System.currentTimeMillis() - start));
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:10,代码来源:FormsApp.java

示例8: pdf

import net.sf.jasperreports.engine.JasperExportManager; //导入方法依赖的package包/类
/**
 *
 */
public void pdf() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToPdfFile("build/reports/StyledTextReport.jrprint");
	System.err.println("PDF creation time : " + (System.currentTimeMillis() - start));
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:10,代码来源:StyledTextApp.java

示例9: pdf

import net.sf.jasperreports.engine.JasperExportManager; //导入方法依赖的package包/类
/**
 *
 */
public void pdf() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToPdfFile("build/reports/MapReport.jrprint");
	System.err.println("PDF creation time : " + (System.currentTimeMillis() - start));
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:10,代码来源:MapApp.java

示例10: pdf

import net.sf.jasperreports.engine.JasperExportManager; //导入方法依赖的package包/类
/**
 *
 */
public void pdf() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToPdfFile("build/reports/I18nReport.jrprint");
	System.err.println("PDF creation time : " + (System.currentTimeMillis() - start));
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:10,代码来源:I18nApp.java

示例11: pdf

import net.sf.jasperreports.engine.JasperExportManager; //导入方法依赖的package包/类
/**
 *
 */
public void pdf() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToPdfFile("build/reports/XYChart.jrprint");
	System.err.println("PDF creation time : " + (System.currentTimeMillis() - start));
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:10,代码来源:XChartApp.java

示例12: pdf

import net.sf.jasperreports.engine.JasperExportManager; //导入方法依赖的package包/类
/**
 *
 */
public void pdf() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToPdfFile("build/reports/TableReport.jrprint");
	System.err.println("PDF creation time : " + (System.currentTimeMillis() - start));
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:10,代码来源:TableApp.java

示例13: pdf

import net.sf.jasperreports.engine.JasperExportManager; //导入方法依赖的package包/类
/**
 *
 */
public void pdf() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToPdfFile("build/reports/HorizontalReport.jrprint");
	System.err.println("PDF creation time : " + (System.currentTimeMillis() - start));
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:10,代码来源:HorizontalApp.java

示例14: pdf

import net.sf.jasperreports.engine.JasperExportManager; //导入方法依赖的package包/类
/**
 *
 */
public void pdf() throws JRException
{
	File[] files = getFiles(new File("build/reports"), "jrprint");
	for(int i = 0; i < files.length; i++)
	{
		File reportFile = files[i];
		long start = System.currentTimeMillis();
		JasperExportManager.exportReportToPdfFile(reportFile.getAbsolutePath());
		System.err.println("Report : " + reportFile + ". PDF export time : " + (System.currentTimeMillis() - start));
	}
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:15,代码来源:JsonQLDataSourceApp.java

示例15: pdf

import net.sf.jasperreports.engine.JasperExportManager; //导入方法依赖的package包/类
/**
 *
 */
public void pdf() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToPdfFile("build/reports/CustomersReport.jrprint");
	System.err.println("PDF creation time : " + (System.currentTimeMillis() - start));
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:10,代码来源:XmlDataSourceApp.java


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