Jump to content
We've recently updated our Privacy Statement, available here ×
  • How to Change the Order of 'Fields and Measures' Items in Ad Hoc Calculated Measure Window


    asimkin
    • Features: Ad Hoc Version: v6.4 Product: JasperReports® Server

    Issue Description

    I create a calculated field in ad hoc view, but the item list of "Fields and measures" lined up at this time

    is different from the order specified at domain creation, it is hard to select.

    Is there a way to keep the order specified during domain creation when creating calculated fields in ad hoc view?


    Resolution

    By default, Fields and Measures items are sorted by item label alphabeticaly.

    The sort order is coded in a Javascript file:

    webappsjasperserver-proscriptsadhoccalculatedFieldsviewExpressionEditorView.js

    renderFields function definition, line ~93:

                        .sortBy("label")

    Commenting out that line resuls in displaying items in the same order they are defned in domain designer.

    In order to test the solution, you have to either switch JasperReports Server to use non-optimized scripts

    or add &_opt=false parameter to the URL.

    fieldsmeasures_sortorder.png.44ffd70faed21c8e682ba0047510dcdc.png

    Once you test that fix works for you, you need to re-build optimized scripts as described in Ultimate Guide:

    https://community.jaspersoft.com/documentation/jasperreports-server-ultimate-guide/v561/customizing-javascript-files


    Ref. Case 01520665

    fieldsmeasures_sortorder.png.92884d73953e2165fe335775a68e10d0.png


    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    This is now closed for further comments

×
×
  • Create New...