BusinessObjects Board

Prompts: Default values

I am not quite sure if this can be done within BO or at a data level.

We have some reports where the user will be able to select the month he wants the see through the use of prompts.

We want to be able to set the default value to the current month. :confused: :reallymad:
I know you can set the default value in Designer but it would have to be changed every month…

I can’t think of any ways of doing this so any ideas would be welcome.

Thanks in advance.


Olivier Masse :fr: (BOB member since 2002-08-29)

Most likely VBA would be your solution (populating your prompt in the data provider with a default value via VBA)… Please, do a search on BOB.


Andreas :de: (BOB member since 2002-06-20)

Webi, version 6.0, allows you to set default values for prompts. But that’s the only place that I know of where this can be done.


MichaelWelter :vatican_city: (BOB member since 2002-08-08)

You can use VBA to set the prompt Value like Andreas said :!:

BTB how do you set the Default Value of a prompt in Designer :?:

Sri
:wave:


Sridharan :india: (BOB member since 2002-11-08)

In Designer, try setting the LOV to refresh before use and then edit the LOV to select the max month where date <= current date using a calculation in a query by editing the list of values. Not sure how this will effect your list of values for choosing other months, but it should return the current month. I’ve not tried it yet, but I’ll try it tonight on non-chargeable time! Update to follow tomorrow 9am (UK time)

Thats neat, what about Full Client , does it also allow default values for the prompt???

Reema


reemagupta (BOB member since 2002-09-18)

Not yet. :nonod: Hopefully, that will be added in the future, as well as in Designer.


MichaelWelter :vatican_city: (BOB member since 2002-08-08)

When done this way I think LOV will show only the MAX value and not show the Other values.

Sri
:wave:


Sridharan :india: (BOB member since 2002-11-08)

You’re right, Sri, it does, but at least that is the prompt they want! It’s the only way I can think of to get the current month every time.

Hi Mark :),

Thank for confirming it . I 've got one more question. If we do that way does the Current Month show in the Prompt TextBox automatically or user has to select from LOV :?: I think it will not by default find its place in the TextBox.

Sri
:wave:


Sridharan :india: (BOB member since 2002-11-08)

My understanding of the LOV text box is that it will be populated by the last value run - I’ll check over the weekend because I am sad like that :oops:

But if you run the report for first you have to provide the value, later on it will show the last value right.


peacock (BOB member since 2002-11-07)

One VBA approach is documented here, and could be modified to determine the current month.


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

Hi,

The best way of doing so is to create a filter in the designer. You did not write what D.B you are using so I assume for the purpose of my example it is Oracle.

The designer should create a filer that looks like that:

month= decode (prompt (‘enter a month or an astrik for last month’),’*’,to_char(sysdate,‘mm/yyyy’),prompt (‘enter a month or an astrik for last month’)).

Now, when you use this filter, when ever the user puts an astrik it will regard it as if he put the last month.

Tamir


Tamir Bar-Netzer (BOB member since 2002-12-07)

Hi :),

Yes first time user have to select it from the LOV. Also I foresee another thing when there is a changeover of month from May to June. If the report is run for May and tomorrow is June then I think the textbox will show May :wink:

Sri
:wave:


Sridharan :india: (BOB member since 2002-11-08)

That’s our problem, we want the user to have the ability to select any given month but the default would be showing the current month.

Therefore I don’t think this would work as Sri pointed it out the user would have to change every month…


Olivier Masse :fr: (BOB member since 2002-08-29)

Hi Olivier :slight_smile: ,

Definitely VBA will be to your rescue unless you have some reservation in using it.

Sri
:wave:


Sridharan :india: (BOB member since 2002-11-08)