Item Filters AND in reports

May 07, 2008 1 Replies

I want to filter a movement report to include movement between two dates for a long list of item codes. If I set the filter for the date range AND the first ILC OR the second ILC OR the third ILC, etc, I get the correct movement for the first item, but all the other items show movement for all dates.



I am trying to do something like:



BETWEEN date1 and date2 AND (ILC1, ILC2, ILC3, etc)



Using the report interface, it does not appear I can do this unless I put the date in after every OR statement - one date per ILC. Its there a way I can modify the report to make this work easier? What I have now in the .qrp file is this:


--------------------------



Begin Filter FieldName = "ViewItemMovement.DateTransferred" FilterOp = reportfilteropBetween FilterLoLim = "1/1/2008" FilterHilim = "5/7/2008" FilterNegated = False FilterConnector = reportfilterbooleanconAND End Filter



Begin Filter FieldName = "ViewItemMovement.ItemLookupCode" FilterOp = reportfilteropEqual FilterLoLim = "072693100503" FilterHilim = "072693100503" FilterNegated = False FilterConnector = reportfilterbooleanconAND End Filter



Begin Filter FieldName = "ViewItemMovement.ItemLookupCode" FilterOp = reportfilteropEqual FilterLoLim = "072693100510" FilterHilim = "072693100510" FilterNegated = False FilterConnector = reportfilterbooleanconOR End Filter



Begin Filter FieldName = "ViewItemMovement.DateTransferred" FilterOp = reportfilteropBetween FilterLoLim = "1/1/2008" FilterHilim = "5/7/2008" FilterNegated = False FilterConnector = reportfilterbooleanconAND End Filter


-------



This works fine, but I would need to change the date multiple times in the report filter interface. I want to just change the date once. Am I making sense?


Should have used my noggin and looked at the other report sections. Figured it out.

I kept the filter:

Begin Filter FieldName = "ViewItemMovement.DateTransferred" FilterOp = reportfilteropBetween FilterLoLim = "1/1/2008" FilterHilim = "5/7/2008" FilterNegated = False FilterConnector = reportfilterbooleanconAND End Filter

...and used the SelCriteria line to read:

SelCriteria = "ItemLookupCode IN ('072693100503','072693100510')"

Now I just need to add my list of ILCs to the list in parentheses.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required