[#5020] - Export to an HTML form

Feature request
Project: Severity:
Component: Reproducibility:
Assigned to:


we are searching for a possibility of exporting reports to HTML forms.

Our web application generates JasperReports offered for download and saved in a archive the same time. Most reports are exported to RTF. Often, the downloaded documents are manually edited by the user without uploading the new version to the archive, so information gets lost. Manual editing is necessary because not all information can be entered into the forms / database (e.g. additional information, temporarily changed information).

For this reason, we would like to display a HTML based preview of the document. We intent to create a new exporter based upon the existing JRHtmlExporter. The new exporter would render textfields as HTML form fields. Form field names would consist of a base name plus a running number (detail number). The base name would consist of a prefix and the JR element name.

From the original template we would automatically create a new template which uses the base names as fields (type "java.lang.String"), and where each textfield uses expression $F{<base name>} and expression type "java.lang.String".

When the HTML form is submitted, we wourld save the form field / field content mapping into the database, and using a special data source we would also be able to display the preview again, this time using the edited content from the database.

Do you know any existing solution for exporting reports to HTML forms? Would you recommend us to copy the JRHtmlExporter, or could we achieve our goal just by implementing interfaces like GenericElementHtmlHandler? Copying classes might turn out as a disadvantage when upgrading JasperReports.

Perhaps such a functionality could be integrated directly into a future release of JasperReports.

Thanks in advance.

Best regards

Björn Borowsky

bborowsky's picture
Joined: Nov 24 2008 - 7:02am
Last seen: 13 years 6 months ago