Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to restrict the ALL selection list?

Status
Not open for further replies.

rajrev

Programmer
Sep 25, 2003
148
US
HI,
Problem:
We are using a parameter called "Degree"(here degrees represent phd,MS,BS...).
Consider a table called "Deg" which contains list of Degrees
Deg1,Deg2,Deg3,Deg4,Deg5,Deg6 so on.

Now in the Parameter we need to filter the Degree values
(ie) at the time of creating this parameter, we manually enter the degree values as default like
ALL
Deg1
Deg2
Deg5

In normal case we can write a formula like
(
if ({?Degree} <>&quot;ALL&quot;) then
{?Degree}={Deg.DegName}
else if ({?Degree} =&quot;ALL&quot;) then
true
)
User select the &quot;ALL&quot;, then the output listed all
the degrees in the table Deg.
(ie)
Deg1,Deg2... Deg6

But I want to filter the degree list like, if the user select &quot;ALL&quot; then
only the degrees Deg1,Deg2 and Deg5 (which are typed manually as parameter default)

Guide me,how to change the formula for getting this result.
Need more info pl. let me know.
Thanks,
MK

 
So &quot;ALL&quot; doesn't realy mean &quot;ALL&quot;, it means instead &quot;Deg1&quot;, &quot;Deg2&quot; or Deg5&quot; ? Do I have that correct?

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
I used this to solve a similar problem


if {?Degree} = &quot;All&quot;
Then
{Deg.DegName} in [&quot;Deg1&quot;, &quot;Deg2&quot;, &quot;Deg5&quot;]
else
{?Degree} = {Deg.DegName}
 
Thanks for your responses
Dgillz! you are correct.
And demachak, I tried your way, it says &quot;This array must be subscripted. For example Array&quot; at the time of save the fromula.

Need more info please let me know.
Thanks
MK
 
In my report I have a parameter field that picks the status of an account.
The default values are

All Closed
Closed - Decline
Closed - Lost
Closed - Won
Open

In my selection formula i used the code

(
if {?Status} = &quot;All Closed&quot;
Then
{OPPORTUNITY.STATUS} in [&quot;Closed - Decline&quot;,&quot;Closed - Lost&quot;,&quot;Closed - Won&quot;]
else
{OPPORTUNITY.STATUS} = {?Status}
)

And it correctly picks up the status. Not sure why its giving you a hastle about the array.
 
Hi,
Do you have {?Degree} defined as a Parameter that can have Multiple Values?

If so, it becomes an Array...

[profile]
 
Hi Demchak, its working now. I did a small spelling mistake.
Thanks
MK

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top