Re: FOSS Reporting Libraries?
Re: FOSS Reporting Libraries?
- Subject: Re: FOSS Reporting Libraries?
- From: Kieran Kelleher <email@hidden>
- Date: Mon, 7 Sep 2009 22:35:13 -0400
Thanks John.
Kieran
On Sep 4, 2009, at 10:48 AM, John Ours wrote:
I use Jasper for reporting along with a wrapper someone posted a
while back to create a JRDataSource from EOGenericRecords.
It was called WCJRDataSource...I can't find it again on the web so
it's attached.
Then I run the report with something like this:
public static JasperReport getCompiledReport(String reportName) {
try {
InputStream reportDef = getResource("Reports/" + reportName +
".jrxml");
try {
return JasperCompileManager.compileReport(reportDef);
} catch (Exception ex) {
System.err.println("Failed to compile report " + reportName + ":
" + ex.getMessage());
}
} catch (Exception ex) {
System.err.println("Failed to find report file for " + reportName
+ ": " + ex.getMessage());
}
return null;
}
public static byte[] runReportToPDF(String reportName, Map
parameters, WCJRDataSource dataSource) {
JasperReport compiledReport = getCompiledReport(reportName);
try {
return JasperRunManager.runReportToPdf(compiledReport,
parameters, dataSource);
} catch (Exception ex) {
System.err.println("Failed to run report " + reportName + ": " +
ex.getMessage());
}
return null;
}
Works great for us.
HTH,
John
<WCJRDataSource.java>
On Sep 4, 2009, at 10:32 AM, Kieran Kelleher wrote:
Hi All,
What are the latest recommendations for Free Open Source reporting
libraries to integrate with a WebObjects app?
and also, what are opinions of these two:
BIRT: http://eclipse.org/birt/phoenix/
Jasper Reports: http://jasperforge.org/projects/jasperreports
Regards, Kieran
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden