/* */


Dec 21 2010

Default Date / Magic Date

Category: Business ObjectsTauseef @ 5:40 pm

Scenario :- User is prompted to enter a Date but if the user does not enters a Date or Wants Current Date or other date for which they would like to run the report. This is helpful when the same report is to scheduled or run without a schedule.

Resolution :-  In order to resolve the above scenario we can use the suggested Magic Date scenario by Dave. The approach i have used allows us to use TimeCalendarDate objects available in the Universe. Instead of just allowing the user to enter a date i will prompt the user to choose if they would want a certain date in our case the current or today’s date or they would like to enter there custom date. Let see how we can do this.

I have created a object with the following definition @Prompt(‘Created Date (Current Date /Custom Date) :’,’A’,{‘Current Date’,’Custom’},mono,constrained,,User:1). This object will not validate but will work fine when used.

Let’s see how to use this in the Query. As you can see in the image . The left hand side of the first Filter ‘User Prompt Current Date / Custom’ will get the User input if they want ‘Current Date’ or ‘ Custom’. If the User selects Current Date the first Combination of ‘AND’ statements get executed else vice versa. In the first combination of AND statements i have restricted the query to run for the Current Date. Here i am using a Universe Filter Pre – Defined filter to get the current date you can always define define filter during query and set them equal to any date value desired to run the report for that value.

Tags: , , , ,

Leave a Reply

You must be logged in to post a comment. Login now.