Jump to content
  • How to Use French Accents in the Calculated Field Names


    Dhiraj Pahlani
    • Edited on:
    • Features: Ad Hoc Version: v9.0.0 Product: JasperReports® Server

    Requirement:
    French language uses many accents (e.g., à, è, ù, ë, ï, ü). We need a way to possibly be able to use these accents in the calculated fields names. Is there a way to achieve our requirement?

    Solution:
    With JasperReports Server 9.0.0, by default the calculated functions' names cannot contain special characters, and the only allowed special characters are: space and underscore.

    To achieve this requirement, we need to update the property Validator.ClientFunctionName in the validation.properties file (<jasperserver-pro>/WEB-INF/classes) as below

    Validator.ClientFunctionName=^[^\\s][a-zA-Z0-9\\s_\\p{L}]+$

    And the same rule should also be duplicated in the applicationContext-pro-remote-services.xml file (<jasperserver-pro>/WEB-INF/) as it is used for REST API.

    <bean id="functionNameRegex" class="java.lang.String">
    <constructor-arg value="^[^\\s][a-zA-Z0-9\\s_\\p{L}]+$" /> <!-- pattern to allow function name -->
    </bean>

    After saving the above changes a server restart would be required for these changes to reflect. And in this way the requirement to use such accents in the calculated field names can be achieved.
    ___________________________________________________________________________________________________________________________________________
    Ref. Case #02277339


    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...