Skip to Content
0
Former Member
Jun 15, 2016 at 04:44 PM

Date Variables, compares to NULL and reinitialize

711 Views

Hi,

I have the following formula on a detail line:

shared DateVar PO_Delivery_Date;

shared StringVar PO_Vendor_Name;

shared NumberVar PO_Qty;

if {Inventory_Stock_Report.PO_Delivery_Date} > PO_Delivery_Date

then ( PO_Delivery_Date := {Inventory_Stock_Report.PO_Delivery_Date};

PO_Vendor_Name := {Inventory_Stock_Report.PO_Vendor_Name};

PO_Qty := {Inventory_Stock_Report.PO_Qty}; );

Works fine when I display in the Group Footer, using formulas for PO_Delivery_Date, PO_Vendor_Name, and PO_Qty.

Problem is, I need the earliest PO_Delivery_Date, not the latest.

Default value for PO_Delivery_Date is NULL, and there are lots of 'em. If I switch to "<", I just get blank fields for all three display formulas.

I've tried playing with combinations of NOT ISNULL, and comparing to DATE(1900-0101), but can't seem to find the right combination.

Along with this, I also need to know the syntax to reinitialize the DateVar for the RESET formula.