Package net.sf.jasperreports.engine.xml
Class JRXmlLoader
java.lang.Object
net.sf.jasperreports.engine.xml.JRXmlLoader
Utility class that helps parsing a JRXML file into a
JasperDesign object.
This can be done using one of the load(...) or loadXml
methods published by this class. Applications might need to do this in cases where report
templates kept in their source form (JRXML) must be modified at runtime based on
some user input and then compiled on the fly for filling with data.
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if the loader is set to ignore consistency problemsstatic JasperDesignstatic JasperDesignload(InputStream is) static JasperDesignstatic JasperDesignload(JasperReportsContext jasperReportsContext, File file) static JasperDesignload(JasperReportsContext jasperReportsContext, InputStream is) static JasperDesignload(JasperReportsContext jasperReportsContext, String sourceFileName) loadXML(InputStream is) voidsetIgnoreConsistencyProblems(boolean ignoreConsistencyProblems) Allows to enable or disable the reporting of consistency problems.
-
Field Details
-
EXCEPTION_MESSAGE_KEY_NO_LOADER
- See Also:
-
-
Constructor Details
-
JRXmlLoader
-
-
Method Details
-
getJasperReportsContext
-
load
- Throws:
JRException- See Also:
-
load
public static JasperDesign load(JasperReportsContext jasperReportsContext, String sourceFileName) throws JRException - Throws:
JRException
-
load
- Throws:
JRException- See Also:
-
load
public static JasperDesign load(JasperReportsContext jasperReportsContext, File file) throws JRException - Throws:
JRException
-
load
- Throws:
JRException- See Also:
-
load
public static JasperDesign load(JasperReportsContext jasperReportsContext, InputStream is) throws JRException - Throws:
JRException
-
loadXML
- Throws:
JRException
-
isIgnoreConsistencyProblems
public boolean isIgnoreConsistencyProblems()Returns true if the loader is set to ignore consistency problems- Returns:
- the ignoreConsistencyProblems flag.
-
setIgnoreConsistencyProblems
public void setIgnoreConsistencyProblems(boolean ignoreConsistencyProblems) Allows to enable or disable the reporting of consistency problems. Consistency problems are problems in the logical structure of the report such as references to missing groups and fonts.- Parameters:
ignoreConsistencyProblems- The ignoreConsistencyProblems value to set.
-