What is the difference between JasperReport format

2020-02-05 04:38发布

问题:

I've found four files. Each of them represent JasperReport. There are

A.jasper, A.jrprint, A.jrpxml, A.jrxml

What is the difference between them? And what are the purpose of each of them?

回答1:

  • .jrxml is a human readable XML file that contains the report template i.e. report structure and its formatting rules.
  • .jasper is the compiled report template i.e. compiled .jrxml file. You use this file as the template argument in the JasperReports API.
  • .jrprint is a serialized JasperPrint object i.e. an actual report instance i.e. a template that has been filled with data. This file can be deserialized back into a JasperPrint object.
  • .jrpxml is a human readable XML represenatation of a JasperPrint object i.e. an XML version of a template that has been filled with data. This file can be unmarshalled back into a JasperPrint object.