Adagio Master
Registered: 03/16/99
Posts: 10504
Loc: Canada
|
Hello Susan, This Filter might run a little faster:
AND (
{Date} >= QUERYDATE("Enter START Date:", TODAY()),
{Date} <= QUERYDATE("Enter END Date:", TODAY()),
Left({Salesperson},5) =Left(QueryString("Enter LINDSY, KINGSN, LONDON", ""),5),
{Qty} <> 0,
{Amt} <> 0,
{Category} <> " BE",
{Category} <> " MC ",
{Category} <> "RCO",
{Category} <> "RCA",
{Category} <> " SH",
{Category} <> " ZZ",
{Type} = "L" // select item lines only, skipping taxes and Misc charges.
)
You could also make the data entry easier with a calculated column for the Salesperson (say "Region"), like this:
IF(UPPER(TRIM(QUERYSTRING("Enter D, K or L for LINDSY, KINGSN or LONDON","K")))="D","LINDSY ",
IF(UPPER(TRIM(QUERYSTRING("Enter D, K or L for LINDSY, KINGSN or LONDON","K")))="K","KINGSN ","LONDON "
))
// The default will be "LONDON"
also, if you want to make sure that you are only asked a specific QUERY() question once, include ",1" as the third parameter, like this:
IF(UPPER(TRIM(QUERYSTRING("Enter D, K or L for LINDSY, KINGSN or LONDON","K",1)))="D","LINDSY",
IF(UPPER(TRIM(QUERYSTRING("Enter D, K or L for LINDSY, KINGSN or LONDON","K",1)))="K","KINGSN","LONDON"
))
// The default will be "LONDON"
If you create the calculated column, then your Filter becomes:
AND (
{Date} >= QUERYDATE("Enter START Date:", TODAY()),
{Date} <= QUERYDATE("Enter END Date:", TODAY()),
{Salesperson}={Region},
{Qty} <> 0,
{Amt} <> 0,
{Category} <> " BE",
{Category} <> " MC ",
{Category} <> "RCO",
{Category} <> "RCA",
{Category} <> " SH",
{Category} <> " ZZ",
{Type} = "L" // select item lines only, skipping taxes and Misc charges.
)
Finally, to remove all the category tests, you might consider using the Inventory report group or one of the option fields to contain something identifiable for this collection of items.
_________________________
Andrew Bates
|