Automatically Calculate date parameter CR4E

Hello,

I have a report that I am creating as a manual cross tab.

This is in CR4E report using a connection to a universe running on SQL 2015
SAP BusinessObjects BI Platform 4.1 Support Pack 4

In the data source query filter I currently have a between filter on the date prompting you to select a start and end date in order to restrict the data being brought through to the report, this works fine.

I would like the end user to just be able to select the end date and then the report to automatically calculate the start date to two months before.

I can’t see an option or a way that I could make this work, does anyone have any ideas?
:hb:
Dave


Davidhole (BOB member since 2016-07-12)

did you try add months function… all you need to give in parameters is ‘m’ for month and in number of months it should be -2 so that automatically it will calculate. If not available in sql please search for alternate similar to oracle.


surya.g :india: (BOB member since 2009-11-24)

The problem isn’t the calculation, its how to do the calculated parameter and still restrict the report from loading all of the data.
Dave


Davidhole (BOB member since 2016-07-12)

You need to do a custom selection formula. I can’t open Crystal right now, but pseudo-code would look like:


={My Date} BETWEEN MonthAdd({?SelectDate},-2) AND {?SelectDate}

Lugh (BOB member since 2009-07-16)

Are you able to do that with CR4E using a universe because you just get the query panel?


Davidhole (BOB member since 2016-07-12)