I have web application that uses JasperReports for PDF report generation. I'd like to write a mobile ver开发者_JAVA技巧sion of my application, specifically iPhone development (iOS). Will this be possible?
That won't be possible for several reasons:
- JasperReports needs Java, so it won't work on devices without Java e.g. iOS
- Even if the mobile device supports Java it will probably be the Micro Edition (ME) that doesn't provide all basic classes used by JasperReports, e.g. java.awt.* to handle Fonts.
A possible solution would be to host a webservice that accepts a template and turns that into a PDF that gets return as a result, so you can display that in your app.
You might want to check out the new v4.2 if JasperReports Server. Jaspersoft has published a Mobile SDK with it to enable the creation of native applications for the iPhone/iPad. Basicallly it leverages web services to use a server to generate reports and provide them to the mobile application.
精彩评论