I now it is not a new topic but I still don’t know how to do it correctly 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 it was only the first part .
So please if any one can just give me the step-by-step to do the prompt with (All) to get it work.
Hi, I hope you enjoyed the presentation even if it was only part one. 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.
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
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)
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 ?
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
Isn’t that what it’s supposed to do? The condition logic is set such that if you select ALL for the prompt result, you will see all divisions on the result set.
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.
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.
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.
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.
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…