Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

latest/max transaction date?

Status
Not open for further replies.

stevesd

Technical User
Dec 26, 2000
74
US
I need to find the accounts where the latest transaction date is not later than 5/1/2002. when I have tried the Max function the formula gives me an error that a boolean is expected in that part of the formula does anyone have an idea of what I may have missed? I will be specifying a list of trans types such as "one of TR, DV..." etc.
 
You need to post the formula, running total or whatever, before anyone can tell you what's wrong. Also a lot can depend on the version of Crystal.

You can create a Summary Total on the transaction date to get the maximum, and then test that. The Summary Total appears on the report, but can be removed again after you have included it in your test.

Madawc Williams
East Anglia
Great Britain
 
Thanks, Mawdac.
I have been using this in the record selection parameter:
maximum ({Trans.date}) > 5-1-2002
I was getting at the date of the transaction would be later than 5-1-02
 
You cannot use a summary function in a record selection formula. Use a group selection formula and it will return only those groups where the max of the date is > 5-1-02.

This is only available if you actually have groups in your report.


Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
dgilsdorf@trianglepartners.com
 
I would use the record selection to limit records to the transaction types of interest. Then group on accountID, and in Edit Selection Formula->Group, add the group select statement:

Maximum({Transaction.Date},{AccountID}) <= Date(2002, 05, 01)

This will give the accounts that have no activity after 5/1/02, as suggested by your first entry. Your later entry seemed to indicate you only wanted records with most recent dates after 5/1/02, in which case, just change the sign to >.

-LB
 
I actually have used the Format Section formula for the group footer after grouping by account number. I clicked on the &quot;suppress&quot; box and then the formula says &quot;if maximum ({Trans.RecDate}, {Trans.acct }> date (2002, 05, 01) then true else false&quot; in other words, in this mangled state of logic, suppress if there is a date of trans after 5/1/02. I think it accomplished the effect I was after, so I wish to thank each of you for the very inciteful help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top