net.sf.jasperreports.engine.JasperExportManager Java Examples

The following examples show how to use net.sf.jasperreports.engine.JasperExportManager. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AdminJasperReport.java    From Spring-MVC-Blueprints with MIT License 7 votes vote down vote up
@RequestMapping(value = "/hrms/showJasperManagerPDF", method = RequestMethod.GET)
public String showJasperManagerPDF(ModelMap model,
		HttpServletRequest request, HttpServletResponse response)
		throws ServletException, IOException, JRException, NamingException {

	usersList = loginService.getUserList();

	AdminJasperBase dsUsers = new AdminJasperBase(usersList);
	Map<String, Object> params = new HashMap<>();
	params.put("users", usersList);
	JasperReport jasperReport = getCompiledFile("JRUsers", request);
	JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport,
			params, dsUsers);

	response.setContentType("application/x-pdf");
	response.setHeader("Content-disposition",
			"inline; filename=userList.pdf");

	final OutputStream outStream = response.getOutputStream();
	JasperExportManager.exportReportToPdfStream(jasperPrint, outStream);

	return null;
}
 
Example #2
Source File: ExcelDataAdapterApp.java    From jasperreports with GNU Lesser General Public License v3.0 6 votes vote down vote up
/**
 *
 */
public void html() 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();
		String fileName = reportFile.getAbsolutePath();
		JasperExportManager.exportReportToHtmlFile(
				fileName, 
				fileName.substring(0, fileName.indexOf(".jrprint")) + ".html"
			);
		System.err.println("HTML creation time : " + (System.currentTimeMillis() - start));
	}
	
}
 
Example #3
Source File: HttpDataAdapterApp.java    From jasperreports with GNU Lesser General Public License v3.0 6 votes vote down vote up
/**
 *
 */
public void html() 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();
		String fileName = reportFile.getAbsolutePath();
		JasperExportManager.exportReportToHtmlFile(
			fileName, 
			fileName.substring(0, fileName.indexOf(".jrprint")) + ".html"
			);
		System.err.println("HTML creation time : " + (System.currentTimeMillis() - start));
	}
	
}
 
Example #4
Source File: ExcelDataAdapterApp.java    From jasperreports with GNU Lesser General Public License v3.0 6 votes vote down vote up
/**
 *
 */
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();
		String fileName = reportFile.getAbsolutePath();
		JasperExportManager.exportReportToPdfFile(
			fileName, 
			fileName.substring(0, fileName.indexOf(".jrprint")) + ".pdf"
			);
		System.err.println("PDF creation time : " + (System.currentTimeMillis() - start));
	}
}
 
Example #5
Source File: HttpDataAdapterApp.java    From jasperreports with GNU Lesser General Public License v3.0 6 votes vote down vote up
/**
 *
 */
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();
		String fileName = reportFile.getAbsolutePath();
		JasperExportManager.exportReportToPdfFile(
			fileName, 
			fileName.substring(0, fileName.indexOf(".jrprint")) + ".pdf"
			);
		System.err.println("PDF creation time : " + (System.currentTimeMillis() - start));
	}
}
 
Example #6
Source File: TableApp.java    From jasperreports with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 *
 */
public void xmlEmbed() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToXmlFile("build/reports/TableReport.jrprint", true);
	System.err.println("XML creation time : " + (System.currentTimeMillis() - start));
}
 
Example #7
Source File: CsvDataSourceApp.java    From jasperreports with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 *
 */
public void html() 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.exportReportToHtmlFile(reportFile.getAbsolutePath());
		System.err.println("Report : " + reportFile + ". HTML creation time : " + (System.currentTimeMillis() - start));
	}
}
 
Example #8
Source File: SubreportApp.java    From jasperreports with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 *
 */
public void xml() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToXmlFile("build/reports/MasterReport.jrprint", false);
	System.err.println("XML creation time : " + (System.currentTimeMillis() - start));
}
 
Example #9
Source File: HtmlComponentApp.java    From jasperreports with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 *
 */
public void html() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToHtmlFile("build/reports/HtmlComponentReport.jrprint");
	System.err.println("HTML creation time : " + (System.currentTimeMillis() - start));
}
 
Example #10
Source File: BarbecueApp.java    From jasperreports with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 *
 */
public void xml() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToXmlFile("build/reports/BarbecueReport.jrprint", false);
	System.err.println("XML creation time : " + (System.currentTimeMillis() - start));
}
 
Example #11
Source File: NoPageBreakApp.java    From jasperreports with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 *
 */
public void xml() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToXmlFile("build/reports/NoPageBreakReport.jrprint", false);
	System.err.println("XML creation time : " + (System.currentTimeMillis() - start));
}
 
Example #12
Source File: HyperlinkApp.java    From jasperreports with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 *
 */
public void xmlEmbed() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToXmlFile("build/reports/HyperlinkReport.jrprint", true);
	System.err.println("XML creation time : " + (System.currentTimeMillis() - start));
}
 
Example #13
Source File: XlsDataSourceApp.java    From jasperreports with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 *
 */
public void pdf() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToPdfFile("build/reports/XlsDataSourceReport.jrprint");
	System.err.println("PDF creation time : " + (System.currentTimeMillis() - start));
}
 
Example #14
Source File: XlsDataSourceApp.java    From jasperreports with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 *
 */
public void xmlEmbed() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToXmlFile("build/reports/XlsDataSourceReport.jrprint", true);
	System.err.println("XML creation time : " + (System.currentTimeMillis() - start));
}
 
Example #15
Source File: ParagraphsApp.java    From jasperreports with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 *
 */
public void pdf() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToPdfFile("build/reports/ParagraphsReport.jrprint");
	System.err.println("PDF creation time : " + (System.currentTimeMillis() - start));
}
 
Example #16
Source File: DateRangeApp.java    From jasperreports with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 *
 */
public void xmlEmbed() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToXmlFile("build/reports/DateRangeReport.jrprint", true);
	System.err.println("XML creation time : " + (System.currentTimeMillis() - start));
}
 
Example #17
Source File: XChartApp.java    From jasperreports with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 *
 */
public void xmlEmbed() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToXmlFile("build/reports/XYChart.jrprint", true);
	System.err.println("XML creation time : " + (System.currentTimeMillis() - start));
}
 
Example #18
Source File: XmlDataSourceApp.java    From jasperreports with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 *
 */
public void html() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToHtmlFile("build/reports/CustomersReport.jrprint");
	System.err.println("HTML creation time : " + (System.currentTimeMillis() - start));
}
 
Example #19
Source File: HtmlComponentApp.java    From jasperreports with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 *
 */
public void xml() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToXmlFile("build/reports/HtmlComponentReport.jrprint", false);
	System.err.println("XML creation time : " + (System.currentTimeMillis() - start));
}
 
Example #20
Source File: I18nApp.java    From jasperreports with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 *
 */
public void xmlEmbed() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToXmlFile("build/reports/I18nReport.jrprint", true);
	System.err.println("XML creation time : " + (System.currentTimeMillis() - start));
}
 
Example #21
Source File: XlsxDataSourceApp.java    From jasperreports with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 *
 */
public void xml() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToXmlFile("build/reports/XlsxDataSourceReport.jrprint", false);
	System.err.println("XML creation time : " + (System.currentTimeMillis() - start));
}
 
Example #22
Source File: JsonQLDataSourceApp.java    From jasperreports with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 *
 */
public void html() 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.exportReportToHtmlFile(reportFile.getAbsolutePath());
		System.err.println("Report : " + reportFile + ". HTML export time : " + (System.currentTimeMillis() - start));
	}
}
 
Example #23
Source File: RotationApp.java    From jasperreports with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 *
 */
public void html() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToHtmlFile("build/reports/RotationReport.jrprint");
	System.err.println("HTML creation time : " + (System.currentTimeMillis() - start));
}
 
Example #24
Source File: ScriptletApp.java    From jasperreports with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 *
 */
public void html() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToHtmlFile("build/reports/ScriptletReport.jrprint");
	System.err.println("HTML creation time : " + (System.currentTimeMillis() - start));
}
 
Example #25
Source File: TableOfContentsApp.java    From jasperreports with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 *
 */
public void pdf() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToPdfFile("build/reports/TableOfContentsReport.jrprint");
	System.err.println("PDF creation time : " + (System.currentTimeMillis() - start));
}
 
Example #26
Source File: StylesApp.java    From jasperreports with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 *
 */
public void xmlEmbed() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToXmlFile("build/reports/StylesReport.jrprint", true);
	System.err.println("XML creation time : " + (System.currentTimeMillis() - start));
}
 
Example #27
Source File: GenericElementApp.java    From jasperreports with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 *
 */
public void html() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToHtmlFile("build/reports/GenericElementReport.jrprint");
	System.err.println("HTML creation time : " + (System.currentTimeMillis() - start));
}
 
Example #28
Source File: SpiderChartApp.java    From jasperreports with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 *
 */
public void pdf() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToPdfFile("build/reports/SpiderChart.jrprint");
	System.err.println("PDF creation time : " + (System.currentTimeMillis() - start));
}
 
Example #29
Source File: TableOfContentsApp.java    From jasperreports with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 *
 */
public void xml() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToXmlFile("build/reports/TableOfContentsReport.jrprint", false);
	System.err.println("XML creation time : " + (System.currentTimeMillis() - start));
}
 
Example #30
Source File: ChartThemesApp.java    From jasperreports with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 *
 */
public void pdf() throws JRException
{
	long start = System.currentTimeMillis();
	JasperExportManager.exportReportToPdfFile("build/reports/AllChartsReport.jrprint");
	System.err.println("PDF creation time : " + (System.currentTimeMillis() - start));
}