BusinessObjects Board

@prompt and default for all dates

What is the best way to set up the @prompt syntax so that the user can choose a specific date or all dates. I only have this example to go by but it hard codes random dates as the default through the CMC (01/01/1900 - 12/31/2030)

Is there a better way to set up a date range in the Universe?
It needs to default to all dates and return all data if the user does enter a specific date range.

@Select(Object\Start Date) BETWEEN @prompt(‘Enter Object Start Date (Start):’,‘D’,Mono,Free,Persistent,User:26)
AND @prompt(‘Enter Object Start Date (End):’,‘D’,Mono,Free,Persistent,User:27)
OR
@Select(Object\Start Date) Is Null

Also do you know what the significance of User:26?

Thanks
Dee


bobboard (BOB member since 2009-03-04)

Read about magic date by Dave Rathbun
.


haider :es: (BOB member since 2005-07-18)

Thanks… I read about magic date but I am still having trouble piecing it together… any help is greatly appreciated


bobboard (BOB member since 2009-03-04)

It tells the order of the prompt.

And coming to Dave’s blog, please let us know where exactly you’re stuck.


Jansi :india: (BOB member since 2008-05-12)

User:26, etc specifies the order of the prompt…

@Select(Object\Start Date) Is Null ??

this will return only where the date is null…
try using
@Select(Object\Start Date) =@Select(Object\Start Date)
or may be
@Select(Object\Start Date) BETWEEN @prompt(‘Enter Object Start Date (Start):’,‘D’,Mono,Free,Persistent,User:26)
AND @prompt(‘Enter Object Start Date (End):’,‘D’,Mono,Free,Persistent,User:27)
OR
1=1


amsmi :india: (BOB member since 2006-09-08)

Thanks amsmi.

Do you know how to set up the user prompt in WEBI such that they do not have to enter a value at run time if they want to have the reprot run for all start dates


bobboard (BOB member since 2009-03-04)

Which version you’re in? In XI 3.x you can use Optional prompts concept at query level.


Jansi :india: (BOB member since 2008-05-12)

Business Objects XI Release 2
Designer: 11.5.0.0
Business Objects 11.5.8.8265


bobboard (BOB member since 2009-03-04)

You will have to provide a prompt value until you upgrade to XI 3.x as mentioned. XI R2 and all previous versions do not allow prompts to be left empty.


Dave Rathbun :us: (BOB member since 2002-06-06)

If you are using R2, may be you can use a default value as ALL.
If user enters ALL,
then ,

date=
Case when @prompt = “ALL”
then
date
else @prompt


amsmi :india: (BOB member since 2006-09-08)

bobboard, please check this topic before you proceed.


Jansi :india: (BOB member since 2008-05-12)