BusinessObjects Board

Prompt based Date filter in Universe

Hi

I have a requirement to create a filter which prompts the user for Date which is the start data and end date. Along with this, the requirement is that the user may or may not enter the value. If the user does not enter the value then it means to include all the records and no filter.

Here is what I have applied in the universe for a filter. The same thing works fine when the Datatype is Char. But does not seem to work for a date.

@Select(Transaction Details\Transaction Date) >= @Variable(‘1.ENTER Transaction Start Date eg 12-Sep-2005’) OR ‘*’ >= @Prompt(‘1.ENTER Transaction Start Date eg 12-Sep-2005’,‘D’,‘Transaction Details\Transaction Date’,MONO,FREE)

Could please someone help on this?


pravink81 :india: (BOB member since 2004-06-30)

I would say, Use @prompt for both of your prompts…

for additional information, follow this link…

https://bobj-board.org/t/15227/2


BO_Chief :us: (BOB member since 2004-06-06)

What you really need is an optional prompt, which is not available – but I pray that some future release after XIr2 will have it! :roll_eyes:

In the meantime, can your users be trained to enter the word ALL? If so, then check out this entry from our Designer FAQ. The FAQ is a great place to visit before you post questions. :wink:


Anita Craig :us: (BOB member since 2002-06-17)

What I would recommend here would be to do the following before you export your report to the Corp Docs. I’ll keep it simple for this example, lets say that your doc has one dataprovider. Click Edit Dataprovider, go to Options and select your Results to retrieve 0 rows. Click Ok and then Run on the Query Panel. Your prompts should appear, enter all the prompts with your wildcard character * in your case. Now for the dates enter an obscenely early and late date for instance 01/01/1900 for start date and 01/01/2050 for end date. Train your users to only change this date when they need to, otherwise it will not affect your results. Now click Ok. The report will let you know that you ran the report for 0 rows, which does 2 things. Lets you purge the dataprovider, AND add default values to your prompts. Now export the report to the Corp Docs and voila there you go.

Hope that helps.


JTAMBLYN :canada: (BOB member since 2003-05-28)