Peachtree Quantum 2012
Pervasive SQL Database
Crystal Reports 2008
I have a report that lists total quantity of Sales Orders and Purchase Orders by Item ID by month:
Item OnHand JAN FEB MAR APR JUN
A 3 0 0 98 0 0 Sales Order
0 0 27 50 0 Purchase Order
3 3 -68 -18 -18 Available
My record selection is:
If {?Item ID} = "ALL" then TRUE else {LineItem.ItemID} = {?Item ID} and {JrnlHdr.JrnlKey_Journal} in [10, 11]
and (YEAR({JrnlHdr.ShipByDate}) = {?YEAR} or
YEAR({JrnlHdr.GoodThruDate}) = {?YEAR})
The problem is that 0's appear for all months for the Purchase Order
row. If I use "and" instead of "or" in the record selection the report only displays the column titles and no data.
I need to select sales orders and purchase orders for a specific year because some sales orders and purchase orders may remain open into another year. For example, a sales order with a ship by date of 11/15/11 may not be fulfilled until some time in the year 2012. If the ship by date is in a different year than the year requested by the report, the sales order quantity should not appear on the report.
How can use a record selection or formula to only select the sales orders with ship by dates and purchases with good thru dates that contain the year the user enters in the {?YEAR} parameter?
Pervasive SQL Database
Crystal Reports 2008
I have a report that lists total quantity of Sales Orders and Purchase Orders by Item ID by month:
Item OnHand JAN FEB MAR APR JUN
A 3 0 0 98 0 0 Sales Order
0 0 27 50 0 Purchase Order
3 3 -68 -18 -18 Available
My record selection is:
If {?Item ID} = "ALL" then TRUE else {LineItem.ItemID} = {?Item ID} and {JrnlHdr.JrnlKey_Journal} in [10, 11]
and (YEAR({JrnlHdr.ShipByDate}) = {?YEAR} or
YEAR({JrnlHdr.GoodThruDate}) = {?YEAR})
The problem is that 0's appear for all months for the Purchase Order
row. If I use "and" instead of "or" in the record selection the report only displays the column titles and no data.
I need to select sales orders and purchase orders for a specific year because some sales orders and purchase orders may remain open into another year. For example, a sales order with a ship by date of 11/15/11 may not be fulfilled until some time in the year 2012. If the ship by date is in a different year than the year requested by the report, the sales order quantity should not appear on the report.
How can use a record selection or formula to only select the sales orders with ship by dates and purchases with good thru dates that contain the year the user enters in the {?YEAR} parameter?