當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。