Prompt for Different date conditions

I am not sure how to ask this and was not real successful searching for the answer since I didn’t know how to ask the question :oops:

I have a report that the user want to run by different date criteria. For example, one department want to see all ‘orders’ delivered where order_date = today, another department wants to see all ‘orders’ delivered where the delivery_date = today, and so on…

The only thing that changes is the date column of the where x_date=today.

I would like the user to be able to select the date condition from a drop-down…

Any sugguestions? :crazy_face:

Thanks in advance…


larryc (BOB member since 2004-04-15)

A pre-defined condition (a universe object) as follows would do the trick. The syntax assumes Oracle:

(@prompt('Choose date type','A',{'Delivery date','Order date'},mono,constrained) = 'Delivery date'
    AND tbl.delivery_date = trunc(SYSDATE)) OR
(@prompt('Choose date type','A',{'Delivery date','Order date'},mono,constrained) = 'Order date'
    AND tbl.order_date = trunc(SYSDATE))

Dwayne Hoffpauir :us: (BOB member since 2002-09-19)

Thanks Duane… Don’t know why I had such a mental block on this… I am using Teradata, but will adapt accordingly if possible… Teradata gets a little funny on some stuff and just will not work with Business Objects
larry


larryc (BOB member since 2004-04-15)

Close enough…

I have no experience with Teradata, but I have heard of date-related challenges … good luck!


Dwayne Hoffpauir :us: (BOB member since 2002-09-19)

We’ve been using Teradata with BO for years; the one date-related gotcha that comes to mind is mistaking TIMESTAMP and DATE data types for each other. Once you know the actual datatype, you can manipulate the data accordingly. Like this, for example.


charlie :us: (BOB member since 2002-08-20)