On a report I am working on I need to find the maximum date for a field within each group and then perform calculations using that date. Since I have to do a final average on those calculations I cannot use the built in summary to find the maximum date in the field. I have tried using the 3 formula approach, but it does not seem to be working. Here are my three formulas:
@ResetMaxDate (in group header)
DateTimeVar MaxDate;
MaxDate := DateTimeValue (1990, 01, 01)
@FindMaxDate (in details)
DateTimeVar MaxDate;
if {CHS_AUDIT_RESERVES.TRANS_DATE}>MaxDate then MaxDate := {CHS_AUDIT_RESERVES.TRANS_DATE}
@ShowMaxDate (in group footer)
DateTimeVar MaxDate
All of the results come up null! If I test it and make @FindMaxDate just assign MaxDate to the field Trans_Date, MaxDate will display as the Trans_date next to each record in the details, but then the footer will show the value of MaxDate that it was originally assigned to in the header! I have no idea why this is happening. Please help. Thanks.
@ResetMaxDate (in group header)
DateTimeVar MaxDate;
MaxDate := DateTimeValue (1990, 01, 01)
@FindMaxDate (in details)
DateTimeVar MaxDate;
if {CHS_AUDIT_RESERVES.TRANS_DATE}>MaxDate then MaxDate := {CHS_AUDIT_RESERVES.TRANS_DATE}
@ShowMaxDate (in group footer)
DateTimeVar MaxDate
All of the results come up null! If I test it and make @FindMaxDate just assign MaxDate to the field Trans_Date, MaxDate will display as the Trans_date next to each record in the details, but then the footer will show the value of MaxDate that it was originally assigned to in the header! I have no idea why this is happening. Please help. Thanks.