Jump to content
Changes to the Jaspersoft community edition download ×
  • Setting non-context configuration properties dynamically


    teodord

    Certain configuration properties are not read from the configuration context (JasperReportsContext instances), which makes it impossible to have different values for them depending on context.

    They can only have one global value per application, either set statically, using the jasperreports.properties file in the root package, or set dynamically, using the following code:

    DefaultJasperReportsContext.getInstance().setProperty(propertyName, value);
    

    or

    JRPropertiesUtil.getInstance(DefaultJasperReportsContext.getInstance()).setProperty(propertyName, value);
    

    For a complete list of properties that are not configuration context aware, please consult the Configuration Reference.


    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    This is now closed for further comments

×
×
  • Create New...