Jump to content
Changes to the Jaspersoft community edition download ×
  • Using Calculated Fields to filter values from report data.


    Issue Description

    As of 6.3.0 Calculated Fields cannot be added to the filter pane, so they cannot be used to filter Ad Hoc View data, but they can be used with Saved Reports from Ad Hoc Views.


    Reports saved from Ad Hoc Views which are tabular are based on Table Components, thus contain Jive/Interactivity features like filtering and sorting.   Suppose you only want to see rows from your sales table for  homes remodeled 5 years ago but you aren't able to create this type of filtering via SQL, thus you must use Calculated Fields.   You could use something like the following expression to return the number of yrs since today for a date-time entry in the table:

    Round(ElapsedYears(Today(), "RemodelDate"), 0)

    Ensure the Calculate Field is in the columns for your Saved Report.  Then click the header for it and choose the "Column Filters" icon, choose "Equals 5" and apply to only show the most recently created entry:





    Ref. Case 01457811

    User Feedback

    Recommended Comments

    There are no comments to display.

    This is now closed for further comments

  • Create New...