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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Incorrect Result with Maximum Formula

Status
Not open for further replies.

lesleycampbell

Technical User
Jun 21, 2013
59
0
0
US
I am working with CR 2011. I have two different tables that I am working with - OrderAssignment & CustomerMaster with the following fields:

OrderAssignment - AssignmentID, CustomerID, EmployeeID, StartDate
CustomerMaster - CustomerID, CustomerName

My report is grouped on the EmployeeID field. I am trying to get the last assignment to which the employee was assigned. I am using the following formula to get the last assignment - maximum({OrderAssignment.AssignmentID},{@groupemployee}). That formula is working, however I would like the field to display the CustomerName field associated with that assignment rather than the AssignmentID.

I have tried to format the field using the CustomerMaster.CustomerName field as a Display String formula but when I do it does not match the customer associated with the last assignment.

Help?

 
You're already grouped by employee id, now sort by Order Assignment, suppress Group Header and Detail, and put everything in the Group Footer.
 
If I do that, how do I get only the last assignment to show? I have tried to group by the last assignment using the maximum formula but it says I can't do that because it is calculated later.
 
Go to report->selection formula->GROUP and enter:

{OrderAssignment.AssignmentID}=maximum({OrderAssignment.AssignmentID},{@groupemployee})

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top