Hi, I have a requirement of showing begin date as 16th July 2015 i.e. today's date and end date 16th of June 2015(exactly 1 month less) automatically in prompt page while using filter as [Date] in_range ?Start and End Date? in query. I am using Date prompt in my prompt page and mine is relational data base. It would be a big help if you can come up with some Java or HTML Scripts.
You'll use a filter expression to do this. When editing your query filter, there is a built-in function to add/subtract days. Use that to always get this day last month.
I would create two prompts with default values.
Data Item #1 - Today's date = {sysdate} (This is an Oracle function and we have an Oracle DB)
Data Item #2 - Year ago Date = _add_years ({sysdate}, -1)
(or you could use the data item name you used from prompt #1)
There is some oddity on leap years on leap days that you have to take in account.