當前位置: 首頁>>代碼示例>>Java>>正文


Java JasperFillManager.fillReportToFile方法代碼示例

本文整理匯總了Java中net.sf.jasperreports.engine.JasperFillManager.fillReportToFile方法的典型用法代碼示例。如果您正苦於以下問題:Java JasperFillManager.fillReportToFile方法的具體用法?Java JasperFillManager.fillReportToFile怎麽用?Java JasperFillManager.fillReportToFile使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.sf.jasperreports.engine.JasperFillManager的用法示例。


在下文中一共展示了JasperFillManager.fillReportToFile方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: fill

import net.sf.jasperreports.engine.JasperFillManager; //導入方法依賴的package包/類
/**
 *
 */
public void fill() throws JRException
{
	long start = System.currentTimeMillis();
	// create entity manager factory for connection with database
	EntityManagerFactory emf = Persistence.createEntityManagerFactory("pu1", new HashMap<Object, Object>());
	EntityManager em = emf.createEntityManager();

	try
	{
		Map<String, Object> parameters = getParameters(em);
		
		JasperFillManager.fillReportToFile("build/reports/JRMDbReport.jasper", parameters);

		em.close();
		
		System.err.println("Filling time : " + (System.currentTimeMillis() - start));
	}
	finally
	{
		if (em.isOpen())
			em.close();
		if (emf.isOpen())
			emf.close();
	}
}
 
開發者ID:TIBCOSoftware,項目名稱:jasperreports,代碼行數:29,代碼來源:EjbqlApp.java

示例2: fill

import net.sf.jasperreports.engine.JasperFillManager; //導入方法依賴的package包/類
/**
	 *
	 */
	public void fill() throws JRException
	{
//		Map<String, Object> parameters = new HashMap<>();
//		parameters.put(JsonQueryExecuterFactory.JSON_DATE_PATTERN, "yyyy-MM-dd");
//		parameters.put(JsonQueryExecuterFactory.JSON_NUMBER_PATTERN, "#,##0.##");
//		parameters.put(JsonQueryExecuterFactory.JSON_LOCALE, Locale.ENGLISH);
//		parameters.put(JRParameter.REPORT_LOCALE, Locale.US);

		File[] files = getFiles(new File("build/reports"), "jasper");
		for(int i = 0; i < files.length; i++)
		{
			File reportFile = files[i];
			long start = System.currentTimeMillis();
			JasperFillManager.fillReportToFile(reportFile.getAbsolutePath(), new HashMap<String, Object>());
			System.err.println("Report : " + reportFile + ". Filling time : " + (System.currentTimeMillis() - start));
		}
	}
 
開發者ID:TIBCOSoftware,項目名稱:jasperreports,代碼行數:21,代碼來源:JsonQLDataSourceApp.java

示例3: fill

import net.sf.jasperreports.engine.JasperFillManager; //導入方法依賴的package包/類
/**
 *
 */
public void fill() throws JRException
{
	Map<String, Object> parameters = new HashMap<String, Object>();
	parameters.put("ReportTitle", "Customers Report");
	parameters.put("Customers", "Customers");
	parameters.put("ReportDate", new Date());
	parameters.put("DataFile", "CsvDataSource.txt - CSV query executer");

	File[] files = getFiles(new File("build/reports"), "jasper");
	for(int i = 0; i< files.length; i++)
	{
		long start = System.currentTimeMillis();
		File sourceFile = files[i];
		JasperFillManager.fillReportToFile(sourceFile.getPath(), new HashMap<String, Object>(parameters));
		System.err.println("Report : " + sourceFile + ". Filling time : " + (System.currentTimeMillis() - start));
	}
}
 
開發者ID:TIBCOSoftware,項目名稱:jasperreports,代碼行數:21,代碼來源:XlsFeaturesApp.java

示例4: fill

import net.sf.jasperreports.engine.JasperFillManager; //導入方法依賴的package包/類
/**
 *
 */
public void fill() throws JRException
{
	long start = System.currentTimeMillis();
	JasperFillManager.fillReportToFile(
		"build/reports/Report1.jasper",
		null, 
		new JREmptyDataSource(2)
		);
	JasperFillManager.fillReportToFile(
		"build/reports/Report2.jasper",
		null, 
		new JREmptyDataSource(2)
		);
	JasperFillManager.fillReportToFile(
		"build/reports/Report3.jasper",
		null, 
		new JREmptyDataSource(2)
		);
	System.err.println("Filling time : " + (System.currentTimeMillis() - start));
}
 
開發者ID:TIBCOSoftware,項目名稱:jasperreports,代碼行數:24,代碼來源:BatchExportApp.java

示例5: fill

import net.sf.jasperreports.engine.JasperFillManager; //導入方法依賴的package包/類
/**
 *
 */
public void fill() throws JRException
{
	long start = System.currentTimeMillis();
	JasperFillManager.fillReportToFile("build/reports/UnicodeReport.jasper", null, new JREmptyDataSource());
	System.err.println("Filling time : " + (System.currentTimeMillis() - start));
}
 
開發者ID:TIBCOSoftware,項目名稱:jasperreports,代碼行數:10,代碼來源:UnicodeApp.java

示例6: fill

import net.sf.jasperreports.engine.JasperFillManager; //導入方法依賴的package包/類
/**
 *
 */
public void fill() throws JRException
{
	long start = System.currentTimeMillis();
	JasperFillManager.fillReportToFile("build/reports/BarbecueReport.jasper", null, new JREmptyDataSource());
	System.err.println("Filling time : " + (System.currentTimeMillis() - start));
}
 
開發者ID:TIBCOSoftware,項目名稱:jasperreports,代碼行數:10,代碼來源:BarbecueApp.java

示例7: fill

import net.sf.jasperreports.engine.JasperFillManager; //導入方法依賴的package包/類
/**
 *
 */
public void fill() throws JRException
{
	long start = System.currentTimeMillis();
	JasperFillManager.fillReportToFile("build/reports/Barcode4JReport.jasper", null, new JREmptyDataSource());
	System.err.println("Filling time : " + (System.currentTimeMillis() - start));
}
 
開發者ID:TIBCOSoftware,項目名稱:jasperreports,代碼行數:10,代碼來源:Barcode4JApp.java

示例8: fill

import net.sf.jasperreports.engine.JasperFillManager; //導入方法依賴的package包/類
/**
 *
 */
public void fill() throws JRException
{
	long start = System.currentTimeMillis();
	JasperFillManager.fillReportToFile("build/reports/StretchReport.jasper", null, new JREmptyDataSource(20));
	System.err.println("Filling time : " + (System.currentTimeMillis() - start));
}
 
開發者ID:TIBCOSoftware,項目名稱:jasperreports,代碼行數:10,代碼來源:StretchApp.java

示例9: fill

import net.sf.jasperreports.engine.JasperFillManager; //導入方法依賴的package包/類
/**
 *
 */
public void fill() throws JRException
{
	long start = System.currentTimeMillis();
	JasperFillManager.fillReportToFile("build/reports/JFreeChartReport.jasper", null, new JREmptyDataSource());
	System.err.println("Filling time : " + (System.currentTimeMillis() - start));
}
 
開發者ID:TIBCOSoftware,項目名稱:jasperreports,代碼行數:10,代碼來源:JFreeChartApp.java

示例10: fill

import net.sf.jasperreports.engine.JasperFillManager; //導入方法依賴的package包/類
/**
 *
 */
public void fill() throws JRException
{
	long start = System.currentTimeMillis();
	Map<String, Object> parameters = new HashMap<String, Object>();
	parameters.put("MaxOrderID", new Integer(10500));
	JasperFillManager.fillReportToFile("build/reports/DateRangeReport.jasper", null, getDemoHsqldbConnection());
	System.err.println("Filling time : " + (System.currentTimeMillis() - start));
}
 
開發者ID:TIBCOSoftware,項目名稱:jasperreports,代碼行數:12,代碼來源:DateRangeApp.java

示例11: fill

import net.sf.jasperreports.engine.JasperFillManager; //導入方法依賴的package包/類
/**
 *
 */
public void fill() throws JRException
{
	long start = System.currentTimeMillis();
	JasperFillManager.fillReportToFile("build/reports/FormsReport.jasper", null, new JREmptyDataSource());
	System.err.println("Filling time : " + (System.currentTimeMillis() - start));
}
 
開發者ID:TIBCOSoftware,項目名稱:jasperreports,代碼行數:10,代碼來源:FormsApp.java

示例12: fill

import net.sf.jasperreports.engine.JasperFillManager; //導入方法依賴的package包/類
/**
 *
 */
public void fill() throws JRException
{
	long start = System.currentTimeMillis();
	JasperFillManager.fillReportToFile("build/reports/StyledTextReport.jasper", null, new JREmptyDataSource());
	System.err.println("Filling time : " + (System.currentTimeMillis() - start));
}
 
開發者ID:TIBCOSoftware,項目名稱:jasperreports,代碼行數:10,代碼來源:StyledTextApp.java

示例13: fill

import net.sf.jasperreports.engine.JasperFillManager; //導入方法依賴的package包/類
/**
 *
 */
public void fill() throws JRException
{
	long start = System.currentTimeMillis();
	JasperFillManager.fillReportToFile("build/reports/MapReport.jasper", null, new JREmptyDataSource(5));
	System.err.println("Filling time : " + (System.currentTimeMillis() - start));
}
 
開發者ID:TIBCOSoftware,項目名稱:jasperreports,代碼行數:10,代碼來源:MapApp.java

示例14: fill

import net.sf.jasperreports.engine.JasperFillManager; //導入方法依賴的package包/類
/**
 *
 */
public void fill() throws JRException
{
	long start = System.currentTimeMillis();
	JasperFillManager.fillReportToFile("build/reports/TabularReport.jasper", null, new JREmptyDataSource(50));
	System.err.println("Filling time : " + (System.currentTimeMillis() - start));
}
 
開發者ID:TIBCOSoftware,項目名稱:jasperreports,代碼行數:10,代碼來源:TabularApp.java

示例15: fill

import net.sf.jasperreports.engine.JasperFillManager; //導入方法依賴的package包/類
/**
 *
 */
public void fill() throws JRException
{
	long start = System.currentTimeMillis();
	JRDataSource datasource = createDataSource(DefaultJasperReportsContext.getInstance(), Locale.US);
	JasperFillManager.fillReportToFile("build/reports/FunctionsReport.jasper", null, datasource);
	System.err.println("Filling time : " + (System.currentTimeMillis() - start));
}
 
開發者ID:TIBCOSoftware,項目名稱:jasperreports,代碼行數:11,代碼來源:FunctionsApp.java


注:本文中的net.sf.jasperreports.engine.JasperFillManager.fillReportToFile方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。