开发者

how to auto-generate a report with JasperReports

开发者 https://www.devze.com 2023-02-12 04:24 出处:网络
I\'m working on NetBeans, and want to \'auto-generate\' a report with JasperReports. Here is the deal: I want to create a form that asks for a date frame in order 开发者_运维知识库to do a sql query a

I'm working on NetBeans, and want to 'auto-generate' a report with JasperReports.

Here is the deal: I want to create a form that asks for a date frame in order 开发者_运维知识库to do a sql query and bring that information; then format it and generate a PDF report out of it.

I see that JasperReports uses the jrxml files compiled to .jasper in order to generate the reports. I want to know if that jrxml could be auto-generated by some code of the API, or it would be needed to edit the jrxml file 'programatically' to auto-generate the report.

Thanks, gadget00


Take a look at DynamicJasper. It allows you to programmatically create reports without a jrxml file.


try this :

JasperExportManager.exportReportToPdfFile(jprint, pdfFileName);

it works perfectly.

0

精彩评论

暂无评论...
验证码 换一张
取 消