Skip to Content
author's profile photo Former Member
Former Member

Default value for date prompt

BO XI R2 SP1

DB: Oracle10g

Hi - I have a couple of date prompts and I was wondering if I could set default values for those prompts; for example I have Start and End date prompts; I want to set Start prompt to First Day of the current Month and End prompt to Last Day of the current Month. That will help users not to change Date fields when running monthly reports.

Please help.

Thanks!

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Dec 17, 2008 at 08:42 AM

    Hi Ahmed,

    There is a default option in the @prompt statement. It is the last parameter into this function. This prompt could then be added to universe.

    If you are doing it from WebI then when you create a query filter against your date and switch it to prompt, clicking the prompt detail will display a dialog with a number of options. One of these should be to set a default value.

    Regards

    Alan

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Ahmed,

      For that I have used a default value, for example 1/1/1900. Then the code for the condition would be

      my_date = case when @prompt("Enter Date", D,....) = to_date('01/01/1900', 'DD/MM/YYYY) 
                      then sysdate
                      else @prompt("Enter Date", D,....) 
                      end

      this will return the current date if the user enters the special '01/01/1900' date.

      Regards

      Alan

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.