IronRocket
Technical User
I've put together two formulas to find out which is the highest order amount per Group. I put one formula in the group header that resets the variable in the coditional formula to 0; and in the group footer, I have an conditional formula that finds the highest order in the group. Unfortunately, this isn't working. It's giving me some other numbers...here is what I have in the two formulas:
In the group header:
Global CurrencyVar OrdersAmount;
OrdersAmount := 0;
In the group footer:
whilePrintingrecords;
Global CurrencyVar OrdersAmount;
DateTimeVar OrdersDate;
StringVar CName;
if {Orders.Order Amount} > OrdersAmount then
(
CName := {Customer.Customer Name};
OrdersDate := {Orders.Order Date};
OrdersAmount := {Orders.Order Amount}
);
OrdersAmount;
In the group header:
Global CurrencyVar OrdersAmount;
OrdersAmount := 0;
In the group footer:
whilePrintingrecords;
Global CurrencyVar OrdersAmount;
DateTimeVar OrdersDate;
StringVar CName;
if {Orders.Order Amount} > OrdersAmount then
(
CName := {Customer.Customer Name};
OrdersDate := {Orders.Order Date};
OrdersAmount := {Orders.Order Amount}
);
OrdersAmount;