本文整理匯總了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));
}