Skip to Content
0
Former Member
Jan 05, 2016 at 04:57 PM

Writing a report that deals with a "for each" clause?

20 Views

Hello all beginner here,

I have something a little complicated I think that may or may not be able to run in a crystal report.

I have this table called PURCHASE_QUANTITY_PRICE\ that holds two values I need, PURCHASE_QUANTITY_PRICE\.VALID_FROM and PURCHASE_QUANTITY_PRICE\.VALID_UNTIL. These two values I pull to dictate whether a price has a valid date or not.

I need to find something like this PURCHASE_QUANTITY_PRICE\.VALID_UNTIL<= CurrentDate for each INVENTORY_PART\.PART_NO that does not have a PURCHASE_QUANTITY_PRICE\.VALID_UNTIL >= Current Date.

So currently my code looks like this:

{PURCHASE_QUANTITY_PRICE\.VALID_FROM} <= CurrentDate and

{PURCHASE_PART_SUPPLIER\.PRIMARY_VENDOR_DB} = "Y" and

{PURCHASE_QUANTITY_PRICE\.VALID_UNTIL} < currentdate and

{PURCHASE_PART_SUPPLIER\.PRIMARY_VENDOR} = "Primary supplier"

This code currently shows all INVALID PRICES for all INVENTORY_PART\.PART_NO

I am not really sure any other workarounds or ways to think about the logic differently.

Thanks for the help. Any questions just ask!

-Ajax