Jump to content
We've recently updated our Privacy Statement, available here ×

Ad-Hoc Reporting Prefilter Relative Dates (V5.6)


volker_1

Recommended Posts

When I create a filter within the ad-hoc editor I can filter against relative dates (e.g. db_datefield < DAY+1). I would like to apply such a relative date filter in the ad-hoc prefilter setup ... but it seems as if it does not accept relative dates there. Do I oversee something? Relative dates would make a lot of sense in the prefilter.

Link to comment
Share on other sites

  • 2 years later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Did you mean adding relative date filters in Domain designer?  We had this problem before and we eventually solved it this way:

Lets say, if you would like to prefilter db_datefield < DAY+1

1. Go to Domain Deisigner > Calculated field

2. Create a new cal field

  • Field name: name of your calculated field.
  • Type: Date
  • Expression: Today(+1)

3. After that you would see a constant field created.

4. Now go to pre-filter tab. ctrl+click the two date you want to compare(db_datefield  and the constant field just created) and pick the right operand.

 

Ref:

http://community.jaspersoft.com/documentation/jasperreports-server-user-guide/v56/calculated-fields-reference

http://community.jaspersoft.com/documentation/jasperreports-server-user-guide/pre-filters-tab

Link to comment
Share on other sites

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...