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!

Record Selection

Status
Not open for further replies.

mcrisf

Programmer
Mar 2, 2005
31
US
Someone can tall me why my selection formula does not work?(it means the dealer ID filter works, but the discount filter doesnt work, i got always all discounts, even i select the filter "59")

{vDW_KPI_SALES_MASTER.SHIPPED_DATE}>={?Start Date} and
{vDW_KPI_SALES_MASTER.SHIPPED_DATE}<={?End Date}
and
if {?Dealer ID}<>"*ALL" then
{vDW_KPI_SALES_MASTER.CUSTOMER_ID} in {?Dealer ID}
else
true
if {?Discount}<>"*ALL" then
if {?Discount}<>"<60" then
{vDW_KPI_SALES_MASTER.DISCOUNT}<60
else if {?Discount}=">=60" then
{vDW_KPI_SALES_MASTER.DISCOUNT}>=60
else
true

thx in advance
 
Try:

(
{vDW_KPI_SALES_MASTER.SHIPPED_DATE}>={?Start Date}
and
{vDW_KPI_SALES_MASTER.SHIPPED_DATE}<={?End Date}
)
and
(
if {?Dealer ID} <> "*ALL" then
{vDW_KPI_SALES_MASTER.CUSTOMER_ID} in {?Dealer ID}
else
true
)
and
(
if {?Discount}<>"*ALL" then
(
if {?Discount} = "<60" then
{vDW_KPI_SALES_MASTER.DISCOUNT} <60
else if {?Discount}= ">=60" then
{vDW_KPI_SALES_MASTER.DISCOUNT}>=60
)
else
if {?Discount} = "*ALL"
true
)

You had a few problems in there.

-k
 
Try:

(
{vDW_KPI_SALES_MASTER.SHIPPED_DATE}>={?Start Date} and
{vDW_KPI_SALES_MASTER.SHIPPED_DATE}<={?End Date}
)
and
(
if {?Dealer ID} <> "*ALL" then
{vDW_KPI_SALES_MASTER.CUSTOMER_ID} in {?Dealer ID}
else
if {?Dealer ID} = "*ALL" then
true
)
and
(
if {?Discount} <> "*ALL" then
(
if {?Discount} = "<60" then
{vDW_KPI_SALES_MASTER.DISCOUNT}<60
else if {?Discount}= ">=60" then
{vDW_KPI_SALES_MASTER.DISCOUNT}>=60
)
else
if {?Discount} = "*ALL" then
true
)

-k
 
It doesnt work...
or i get the correct CustomerID and but not the correct Discount filter....:-(
 
I'm not sure why you have an asterisk at the beginning of "*All", but did you add "*All" (without the parens) to the parameter value list?

-LB
 
Post exactly what was tried, not "it doesn't work".

The above assumed that you either created default values of *All, or that is entered when you wish to ignore that portion, or you're entering something else and expect it to match.

Also you can check the Database->Show SQL Query to see what is being passed to the database as a result.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top