Applying a filter on a dataitem request form

Hi, Scenario: Navision 3.70a IT Run a report with a ReqFilterField on an option field, say rep. 99000767, “Prod. Order - Calculation”, but it could be any of the kind. Set Status = Released and lookup on No. - it shows all the realeased orders. That’s right. Now, leave Status blank (blank, not 0!) and lookup on No. - it shows only Simulated orders. Not right, but maybe understandable (more or less) Now, try to to apply a more complex filter on Status, say Firm Planned|Released or, just to work around the language issue, 2|3 - again the lookup on No. shows only Simulated orders. Any comment? Anna

Quote -Set Status = Released and lookup on No. - it shows all the realeased orders. That’s right. -Endquote I don’t think that this is right at all, how can a filter set on a report request form affect the behaviour of a lookuplist form? I have experimented with the Employee table and a standard report Employee Labels Report 5200. You can set Sex = Male and lookup on No. and see all Employees which is what I would expect to happen.

quote:

Quote -Set Status = Released and lookup on No. - it shows all the realeased orders. That’s right. -Endquote I don’t think that this is right at all, how can a filter set on a report request form affect the behaviour of a lookuplist form? I have experimented with the Employee table and a standard report Employee Labels Report 5200. You can set Sex = Male and lookup on No. and see all Employees which is what I would expect to happen.
Originally posted by dwest - 2006 Mar 31 : 05:16:57

You are probably right, but my point was slightly different. When I set the filter on Status to Released, the lookup on No. do show only Released orders. The difference in behaviour with the case you tested might be caused by the fact that Status in the Prod. Order table is in the primary key, while sex in the Employee table clearly is not. What I find disconcerting is that if I DON’T set any filter on Status, the lookup on No. shows ONLY Simulated orders. [?] Anna

Hi, Anna is right. That specific report does show that bahavior. The reason is to be found in the way that Table-relation is defined on the “No.”-field in the table-design. “Production Order”.No. WHERE (Status=FIELD(Status)) The option-string on the Status-field looks like this: Simulated,Planned,Firm Planned,Released,Finished If you do not define “Status” in the request-window, it is given the 0 (zero) value when You lookup on the “No.”-field, and that is the same as ‘Simulated’. Just for the fun, try to delete the WHERE-clause on the Table-relation on “No.”, and the lookup on “No.” in the report acts just as David descriped. regards Alexander

quote:

Hi, Anna is right. That specific report does show that bahavior. The reason is to be found in the way that Table-relation is defined on the “No.”-field in the table-design. “Production Order”.No. WHERE (Status=FIELD(Status)) The option-string on the Status-field looks like this: Simulated,Planned,Firm Planned,Released,Finished If you do not define “Status” in the request-window, it is given the 0 (zero) value when You lookup on the “No.”-field, and that is the same as ‘Simulated’. Just for the fun, try to delete the WHERE-clause on the Table-relation on “No.”, and the lookup on “No.” in the report acts just as David descriped. regards Alexander
Originally posted by sander7 - 2006 Mar 31 : 08:25:01

Indeed, it works! Thank you. [:)] Now I’m wondering - what sense does it make to have a tablerelation linking a record to… itself? Am I missing something? The problem might seem pointless, but the reports based on the Prod. Order table are often used by people working in the production plant who get easily confused by such a behaviour. I’m definitely getting more complaints than I’d like to. [}:)] Anna

This is interesting. Perhaps it was intended that any lookup would always show a subset of the available records in the table? I agree that this is confusing.