• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: FOSS Reporting Libraries?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FOSS Reporting Libraries?


  • Subject: Re: FOSS Reporting Libraries?
  • From: John Ours <email@hidden>
  • Date: Fri, 04 Sep 2009 10:48:10 -0400

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

Attachment: WCJRDataSource.java
Description: Binary data





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

  • Follow-Ups:
    • Re: FOSS Reporting Libraries?
      • From: Kieran Kelleher <email@hidden>
References: 
 >FOSS Reporting Libraries? (From: Kieran Kelleher <email@hidden>)

  • Prev by Date: FOSS Reporting Libraries?
  • Next by Date: NSNotificationCenter mystery
  • Previous by thread: FOSS Reporting Libraries?
  • Next by thread: Re: FOSS Reporting Libraries?
  • Index(es):
    • Date
    • Thread