BusinessObjects Board

Prompt with (ALL) Values

Hi to all,

I now it is not a new topic but I still don’t know how to do it correctly :hb: i tried a lot of ways and do a lot of searches before posting this Question:

I also check David G. Rathbun PDF “Tales from a Universe Ninja” they was interested but i still can’t do it here, I went to SAPPHIRE 2008 in Berlin and attend David presentation but :frowning: :frowning: it was only the first part :wah:.

So please if any one can just give me the step-by-step to do the prompt with (All) to get it work.

Please David I've got to save the universe  :wink:

I am using BO XI2 SP1 MHF1 CHF19


DataAdmin :bahrain: (BOB member since 2006-08-23)

Did you not look into the Designer FAQ for
syntax on using ALL and
Displaying All in LOV

.


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

Both parts of “Tales from a Universe Ninja” presentations can be found here:
http://www.islink.com/Library_Presentations.htm#Design


Marek Chladny :slovakia: (BOB member since 2003-11-27)

Hi, I hope you enjoyed the presentation even if it was only part one. :slight_smile: As mentioned, both parts are on the Integra web site, and also on my blog (link is signature). On my blog I hope to provide more details over the coming months as well.

Adding “ALL” to the prompt and making that work with a single prompt is covered in the FAQ for Designer here on BOB. The Ninja II presentation showed how to use ALL in a cascading LOV as well, and that is substantially more complex.


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

Thanks to ‘ALL’ of you :smiley:

I've download the two parts but as Dave said it is a complex way. The presentation was 'Fantastic' as the 'Food' :mrsbob: but i think it was soooo fast for the topics, any way i will try to do it and if there are any questions i will post it here , Thanks again

DataAdmin :bahrain: (BOB member since 2006-08-23)

create the lov for the object which you are going to use in the prompt with an all in the begining of the lov
i.e
object->properties->edit->(query panel will be shown)->sql
in the sql add the query

union
select ‘All’ from dual

check do not generate before running
save & close

check the lov for this object weather ‘all’ comes in the begining of the lov’s

for the condition object

colunmname in @prompt(‘text’,‘datatype’,’(classname/objectname)’,multi,constrained) or ‘all’ @prompt(‘text’,‘datatype’,’(classname/objectname)’,multi,constrained)


niru2008 (BOB member since 2008-05-19)

Thanks niru2008,
I do it and it seems work OK, BUT mmmmm, can I do the same for a numeric data type, such as if i have a branch number and i want to let the user to select a number or ‘All’ for all branches , how can it be done ? :roll_eyes:

thanks for ‘All’


DataAdmin :bahrain: (BOB member since 2006-08-23)

No, you can’t mix datatypes – so you’d have to have some special numeric value that means “all”.


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

Hi

I added ‘ALL’ for object called Division and kept condition for Lovs Division in (1,2,3,4…) when I refresh Lovs values are correct, ‘ALL’ and remaining values are appearing.

created conditional object

‘ALL’ in @Prompt(‘DIVISION’,‘A’,‘Settlements\Division’,Multi,constrained) or @Select(Settlements\Division)IN @Prompt(‘DIVISION’,‘A’,‘Settlements\Division’,Multi,constrained’)

In report level took division in result pane and condition object in condition pane when I run the query Division prompt is coming up when I see values it is showing correct values as LOV’s in universe but when I select ‘ALL’ option that object is showing every thing

Can any one please help me out.

Thanks in advance

Regards,
Sreepal.


patriot3029 :india: (BOB member since 2006-12-08)

Isn’t that what it’s supposed to do? :slight_smile: The condition logic is set such that if you select ALL for the prompt result, you will see all divisions on the result set.


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

Hi Dave,

Thanks for your reply,

I have LOV’s like 0,1,2,3,4,5,6,7,8,9,10,11… so restricted these lovs to 1,2,3,4,5,6,7 so when I select ‘All’ I want to see only these values 1,2,3,4,5,6,7

but I am getting 0,1,2,3,4,5,6,7,8,10,11…
if I try with case one blank record is coming so can you please help me out in this issue.

Regards,
Sreepal.


patriot3029 :india: (BOB member since 2006-12-08)

Hi,

If you want only the selected values, you should check show selected values where you try to select value while running. Because the usage of ‘Show all values’ is to show all the values irrespective of what you check at the universe.


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

The code you’re using doesn’t make any distinction as to what values are shown in the LOV. When you select ‘All’ you get all values in the database, not the LOV. Any restriction on the LOV is lost. If you want to restrict to the values 1 through 7 then you need to change the code. I took a few minutes to think about it and could not come up with a suggestion at the moment, but you would have to hard-code the values 1 through 7 and use that list when the user selected ‘All’ from the list.


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

Dave,

Thansk for your reply how to hard code values? Can you please send me if you have any exampls or code

Regards,
Sree


patriot3029 :india: (BOB member since 2006-12-08)

Make a derived table that includes only the values one through seven. Join this table to your “division” table using the appropriate code. Base your LOV and your prompt on this table, so that when the user selects ‘All’ then they will only match on the values in the derived table, and that will impose the restriction on the main table.


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

Hi Dave,

thaks for your reply with derived tables is it going to impact on performance?

Regards,
Sree


patriot3029 :india: (BOB member since 2006-12-08)

It depends on how your database optimizer handles it. Since this is going to be a condition, and then it’s joined to a regular table, I would expect that it might be okay. Try it out and see. If a derived table doesn’t work, you can always ask for a real table, or a view…


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

Thanks for reply Dave ,I will try and let you know

Regards,
Sree


patriot3029 :india: (BOB member since 2006-12-08)