There are some things one could improve when looking at the integration of JasperReports into ADempiere:
- Loading of resources with any filename
- up to now subreports need a filename with a special convention and other files (images, fonts) can not be loaded. Subreports can not use any resources.
- keep (and extend) the use of different protocols in the file URL (and keep this when loading sub-resources)
- automatic creation and caching of.jasper files from .jrxml files
- caching possible for more than one user per system
- clean cache when original may have changed
- Make it possible to overload a resource in a user directory
- define (and document) which parameters were set automatic
- keep this all compatible with legacy installations (old behaviour as a special case)
- allow to compile the report on the fly (with caching, if possible) to avoid problems with different JasperReport versions (newer iReport version)
I would like to have a user-editable "overloading" mechanism so that all reports (from the different protocol's sources) may be (when configured so) saved to the user's file system and be changed by him. With such a mechanism we give the user the opportunity to do small changes for himself and give the developer a facility for rapid development.
I made a list which parameter are defined to use in your report. See http://www.adempiere.com/JasperReports_Tips_und_Tricks#Parameter_in_Reporten
I added some parameters with my patch at http://www.adempiere.com/JasperReports_with_Window_Sql-Clauses
Which parameters are needed in a perfect world?
documentation about the current state
- [Compiere JasperReports Integration HowTo] - This seems to be the originally documentation from one of the integrators (worth reading!)
- www.adempiere.com/Talk:ADempiere/Compiere_JasperReports_Integration_HowTo talk page of the former document - outdated information about dealing with subreports
- [Workshop:Integration von JasperReports in ADempiere] - Workshop from NWessel to introduce the usage. Here is an example with sub-subreports explained with the "attachment:" protocol. (worth reading)
- [Compiere JasperReports Integration] - wiki page of the original integration effort. Links to the old [Compiere Jasper Integration project] (outdated)
- [Old JasperReports Integration HowTo] - Older integration effort (outdated)
... all these documents do not deal with internals like using the different protocols, loading reports from attachments, which parameters are used, etc.!
- [JasperReports Integration HowTo] - Here someone seems to have improved the class to a JasperStarter2. I could not find the source (yet) or whether some of it is included already
my own pages:
- [JasperReports Tips und Tricks] - my own page about JasperReports hints (german). I did a list of parameters there
- [JasperReports with Window Sql-Clauses] - my extension to get the WHERE and ORDER BY clause from the actual window
Which protocols for which reason?
This may became a hintful description of all protocols with usecases:
<trifon> is the most flexible for me.
<trifon> i do not need to re-start adempiere server and every admin can upload new version of report.
- http://idempiere.atlassian.net/browse/IDEMPIERE-28 - seems to be obsolete?!?
- https://sourceforge.net/tracker/index.php?func=detail&aid=2984671&group_id=176962&atid=879335 - Attached Images not passed to Jasper (problem loading other filetypes than *.jasper)
- https://sourceforge.net/tracker/index.php?func=detail&aid=2985582&group_id=176962&atid=879335 - implicit path in JasperReports (seems to mean file: access)
- https://sourceforge.net/tracker/index.php?func=detail&aid=2690161&group_id=176962&atid=879335 - Jasper subreports with arbitrary names (seems to mean the subreport naming convention)
- http://www.adempiere.com/ADempiere_on_a_terminalserver - describes a caching problem on a system with several users
Einführung in die Benutzung von URLHandlern: http://java.sun.com/developer/onlineTraining/protocolhandlers/
Forumsthread mit gutem Beispiel zur Benutzung von URLHandler und ClassLoader mit JasperReports: http://jasperforge.org/plugins/espforum/view.php?group_id=102&forumid=103&topicid=17884
In JRResourcesUtil werden Handler und Loader gesetzt. http://jasperreports.sourceforge.net/api/net/sf/jasperreports/engine/util/JRResourcesUtil.html
Google gibt mir einen Link zum "Definitive Guide": http://www.google.com/m/search?client=ms-nokia-maemo&channel=unibox&q=jasperreports+urlhandlerfactory