本文整理汇总了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();
}
}
示例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));
}
示例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));
}
示例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));
}
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
}
示例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));
}