Anyone know why when you ask in the Report Filter say two different Sales Reps why the querry comes back blank? Seems I can only querry one thing of one type of field at once without RMS coming back with a blank screen.
When I querry two sales Reps at once Report Querry comes up empty
Nov 29, 2005
12 Replies
The Report Filters default to using "AND" conditions - meaning that all of the filters must be true for a record to be returned. There is a radio button that lets you change to an "OR" Contition, meaning that any one (or more) true filter will cause the record to be returned.
When you start combining multiple filters with different AND/OR settings, the final query can become unclear and some combinations are just impossible to invoke.
If you were unaware of the ability to switch between AND and OR Criteria, this will probably take care of your problem. If you were already using OR Conditions, be aware that the filter system does have some issues in this area and that may be what you are running into.
Jack T,
Your query below reads as follows: Give me all instances where Status is equal to Open and Sales rep = sales rep A or any instances where sales rep sales rep B or any instances where sales rep = sales rep C. Your query should something like this: Sales Rep = "sales rep A" AND Status = Open OR Sales Rep = "sales rep B" AND Status = Open OR Sales Rep = "sales rep C" AND Status = Open
Rob
Yeah, your running into the combination of conditions problem I tried to describe.
The Filter system is sort of inexact in the way it groups the conditions.
What you want is: (Status = 'Open') AND (SalesRep = A OR SalesRep = B)
What you are getting is PROBABLY: (Status = 'Open') AND SalesRep = A) OR (SalesRep = B)
If there's a way to specify the grouping so that you actually get what you want, I've never found it. You might try removing the Status filter, then adding it back as the last Filter: (SalesRep = A OR SalesRep = B) AND (Status = 'Open')
That MIGHT work in this case, but as you add more and more conditions it gets more and more confusing.
There is a way to edit the report files to include a Selection Criteria that DOES allow you to use parentheses to specify the grouping, but that's kind of inconvenient....
Open your report as you've been doing it. Try to set the filters so that you get at least some results, but don't worry for the moment that iut's not exactly the filter you want.
Format the report the way you want to see it (set grouping, show/hide columns, etc...)
MEMORIZE the report - give it a name you will recognize - for example, I'l use "My Sales Rep Report"
Close SO Manager
go to Windows Explorer, and browse to ..\Program Files\Microsoft Retail Managemnet System\Store Operations\Reports
There will be a file named (Using my example from above) "Memorized - My Sales Rep Report.qrp". Open this file in Notepad
Find the line that says SelCriteria = ""
To 'lock' the SalesRep part of your filter, change this to: SelCriteria = "(SalesRep.Name = 'Rep A' OR SalesRep.Name = 'Rep B' OR SalesRep.Name = 'Rep C' )"
Save the file and reopen SO Manager.
Go to Reports/Memorized and open your memorized report Any Filters you add (Like Status = Open) will be included in the filter an an AND condition with the permanent selection Criteria above.
I wasn't sure what report you were starting from, so I didn't know the proper context for Status - it really probably makes more sense to make that the 'permanent' condition...
Glenn, Well it worked, however I have a question. When I opened up the QRP file in notepad, the following information was already populated as follows: SelCriteria = "[Order].Type = 5"
I basically deleted that information and populated with the following which seems to pull in the Layaway information I am requesting. Here is the line I wrote.
SelCriteria = "(SalesRep.Name = 'Sales Rep A' OR SalesRep.Name = 'Sales Rep B')"
I can then make the status > Open your report as you've been doing it. Try to set the filters so that
Yes, [Order].Type = 5 is a layaway.
4 is a Back Order, 3 is a quote, 2 is a Work OrderYou can use the following:
SelCriteria = "((SalesRep.Name = 'Sales Rep A' OR SalesRep.Name = 'Sales Rep B') AND ([Order].Type = 5))"
Note the double Parentheses at the beginning and End...
The Order Type is limiting the selection to only Layaway orders. If you leave that out, the report SHOULD return any Work Orders, Back Orders or Quotes that meet your other conditions. It's possible that you don't have any of the other types of transactions or that none of those transactions have Seales Reps assigned - making the report look the same, but just by coincidence...
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required