reporting matters

Hi there, I have problem showing out the maximum value of a table field. For example:- Table: Sales Header Field: Version No There will be many version numbers on the Version No field. But how can I get the latest version number out? I mean, how to print out the version number? Do I need to create extra coding on the report? Please help… Thanks, ngps

Unfortunateally I dont´t know of an aggregate function like MAX(VersionNo) in C/AL. But you could use the following workaround. SalesHeader2.SETCURRENTKEY(VersionNo); SalesHeader2.FIND(’+’); SalesHeader.SETRANGE(VersionNo, SalesHeader2.VersionNo); SalesHeader.FIND(’-’); Yes, you need a key on Field VersionNo to do so. Regards