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

0

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.

volker_1's picture
Joined: Oct 5 2013 - 10:00am
Last seen: 4 years 11 months ago

1 Answer:

0

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

http://community.jaspersoft.com/documentation/jasperreports-server-user-...

yuanix14's picture
Joined: Apr 1 2015 - 1:38am
Last seen: 1 month 1 week ago
Feedback