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

Return value based on Max field

Status
Not open for further replies.

Joe1010

Programmer
Dec 11, 2006
49
US
Each product ID can have multiple lines for different versions. The Product ID is not the primary Key.

I’m grouping the report by Product ID

I would like to create a formula that returns the price field for the product ID where the version is the highest.

What would be the code?
Thanks
Joe
 
I can make it easer. I will bring in into the report only the record with the highest version number for each product id.

Can anyone please tell me how this is done?
Thanks
Joe

 
You should always identify your version of CR, as solutions may differ depending upon version.

-LB
 
Try going to the Report->Selection Formula->Group and place:

{table.version} = maximum({table.version},{table.productid})

This will suppress all other values,

This isn't the optimal way, best would be to use SQL in a Command, View or SP to do this, but it will work.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top