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

Multiple Range Parameters in Select Expert. Need help

Status
Not open for further replies.

mulema

Technical User
Nov 16, 2002
32
0
0
US
Hi all,
Please I need help with getting this multiple parameter ranges to work in my select Expert.

My report has multiple Prompts for Product groups.
and each of these products will have a prompt for Mkt Invoice Price Range.
The customer wants to exclude prices that fall within a certain price range, for a given product.

Example:
Boneless Breast
1.40 to 1.50

Drum
1.20 to 1.25

Tender
1.50 to 1.60

etc.

So if the Product is Boneless Breast, and the price range is between 1.4 and 1.50, the product Boneless Breast should not show on the report.
How do I get these multiple Price Ranges to work in my select Expert.?

Thanks for your assistance.
Mulema
 
Minimum({?BonelessBreast}) and
Maximum({?BoneLessBreast})

Will give you the values, so:

PriceRange >= Minimum({?BonelessBreast}) and PriceRange <= Maximum({?BoneLessBreast})



Reebo
Scotland (Sunny with a Smile)
 
mulema,

Are there a limited number of items that can be selected. In your example you gave 3 selection criteria, although each has 2 criteria within it(product type and price range). Is there a limited number of selections that you would like to provide, or is it unlimited?
 
If I understand Jcfowl's question, there are ten product items that will be prompted for.
The user can enter whatever price range he wants to search for each product. Each Product will default to 0.00, to take care of products he doesn't need. He can enter only one price range for each product. The other issue is that this Product Group is a single Column on the table ( view )

Hope this clarifies a bit.

Thanks
 
Use something akin to the following:

(
{table.product} = &quot;Boneless Breast&quot;
and
{table.price} < Minimum({?BBprice})
and PriceRange > Maximum({?BBprice})
)
and
...

You might also add another parameter for each to determine the Products, in which case you would replace the hard coded &quot;Boneless Breast&quot; with the {?Product} and be able to use prompt universally, as in:

(
{table.product} = {?parameter1} //makes it generic
and
{table.price} < Minimum({?price1})
and PriceRange > Maximum({?price1})
)

Note that you seperate these with parens and an AND between products to build separate clauses and to assure pass through SQL.

Hope this resolves for you.

-k
 
Couldn't you use 2 parameters: ProductType and PriceRange. Both would allow multiple values. ProductType would allow multiple discrete string values. PriceRange would accept multiple numeric range values. Each parameter returns an array of values that can be matched. The problem is the user must understand that the relationship between parameters is 1 to 1. The first ProductType would match the First PriceRange and so on. Would this work?????
 
Jcfowl

I tried your suggestion but ran into another hiccup. &quot; This Array must be subscripted &quot; error.
Any suggestion on how to subscript this thing. My search couldn't find me a good enough example to work on.

({TABLE.PRICEPERUM} >= {?PRICE RANGE} and
{TABLE.PRICEPERUM} <= {?PRICE RANGE} and
{TABLE.PROD_GROUP} = {?PRODUCT GROUP} )

 
Try this

({TABLE.PRICEPERUM} >= minimum({?PRICE RANGE}) and
{TABLE.PRICEPERUM} <= maximum({?PRICE RANGE}) and
{TABLE.PROD_GROUP} = {?PRODUCT GROUP} )



Jim Broadbent
 
Had no luck with this approach.
The report fails, with message &quot;Error in formula code. Contact seagate software &quot;.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top