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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mutually exclusive parameters 1

Status
Not open for further replies.

xsw1971

Programmer
Jun 21, 2001
153
US
I am using CR8.5 (and CE8) with an Oracle database.

Is it possible to create a report with 2 string parameters that are mutually exclusive? I am creating a sales report and would like the user to be able to select from either an organization pick list OR a business unit pick list, but not both. I tried creating a boolean group parameter, but since 8.5 doesn't support cascading parameters I can't do anything with the user's selection.

Thank you in advance!
 
Hi there,

When you've got your parameters set up, if you go into the select expert, click on show formula you will see somthing like this

{?Param1} = {Field1} and
{?Param2} = {Field2}

What you could do is change the and to an or i.e

{?Param1} = {Field1} or
{?Param2} = {Field2}

HTH
 
Thank you for the very fast reply.

However that solution didn't work, as it allows my users to select an item from the organization list AND an item from the business unit list. Then it gets the data that matches either/or selection (basically a union).

What I want to do is allow the users to report on organization OR business unit. So the select screen would allow them to select an organization, thereby disabling the business unit select option or vice versa. Does that make sense?

Thanks!
 
Yeah that makes a bit more sense. Not too sure how you can go about this one to be honest, as far as I'm aware you can't disable a parameter based on the results from the previous parameter. So really you not got a lot of options available.

I see where your coming from with the users though but is it worth inserting another parameter at the top of the other two which just makes the user select either business unit or organisation (as a text string) and show some sort of prompt text stating that if you select organisation then you need to select a value from the organisation list and vice versa.

Thats probably not going to be much use to you sorry but thats all I can suggest. Maybe someone else will have some ideas but I think your pretty limited with the options.

Hope that is of some use.
 
That's what I was afraid of; I think I am going to have to create two reports.

Thanks again for the prompt reply!
 
You could try the following which appears to work as you wish even when selections are made from all parameters. This example uses the Xtreme database:

(
{?shipper or custID} = "Shipper" and
{Orders.Ship Via} = {?shipper}
) or
{?shipper or custID} = "CustID" and
{Orders.Customer ID}) = {?custID}
)

-LB
 
Thanks lbass. I am unclear as to how to apply this to my report. Where do you get the "Shipper" and "CustID" text from? I have tried replacing the values with my fields/parameters but I'm missing that one piece:

(
{?func_org or ?b_unit} = "<Shipper>" and
{requests.funtion_org} = {?func_org}
) or
{?func_org or ?b_unit} = "<CustID>" and
{requests.business_unit}) = {?b_unit}
)

I'm lost! [sadeyes]
 
You have three parameters. The first one might be {?func_org or b_unit}. Make it a string parameter and add two parameter options:

function organization
business unit

...or whatever would make sense to the user. Then create your record selection formula like:

(
{?func_org or ?b_unit} = "function organization" and
{requests.funtion_org} = {?func_org}
) or
(
{?func_org or ?b_unit} = "business unit" and
{requests.business_unit}) = {?b_unit}
)

Note that in my first post I left out a "(" at the beginning of the second clause.

-LB
 
Ohhhh, I get it. That works really well, thanks! The only confusing thing is that users still get the impression that they can select from the "other" drop down, although their selection doesn't count in the report. I have to hope that they will read the descriptions for each of the parameters.

Thanks a bunch!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top