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