当前位置: 首页>>代码示例>>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;未经允许,请勿转载。