May 3, 200619 yr I have 2 fields: Revision Date Revision Number I want to display the last record of Revision Date and Revision Number as part of a header for a report. I'm tried to create a calculation field, but I am not good with scripting in FMP. Also, I have tried to sort the data, but this doesn't seem to work at all in a header. Any help would be greatly appreciated. Thank you very much in advance!
May 3, 200619 yr Normally, a field placed in the header displays data from the first record on the page. To display data from the last record in the found set, define an unstored calculation field = GetNthRecord ( YourField ; Get (FoundCount) ) and place in the header. Alternatively, use a global field and set it by script (after finding and sorting the reported records): Go to Record [Last] Set Field [ GlobalField ; YourField ]
May 3, 200619 yr Author Thank you so very very much. Your awesome and have helped me several times now. I owe you one or two or ten...
May 3, 200619 yr Author I also found alternatively, you can place a portal in the header to show only one row and make the background and border invisible, then sort it in descending order.
May 3, 200619 yr Not really - because a relationship ignores both the found set and local sorting. So, if for example you do not want to include the last record in the report, this will bomb (unless your relationship is based on a recursive custom function that reproduces the found set in a portal - but let's not go there...).
May 3, 200619 yr Author Well... I didn't understand most of what you just said, but I tried it and it worked. Don't know why. :
May 3, 200619 yr Well, I don't know what your relationship is, and what your found set is. Still, I believe that if you go to the last record and omit it, you will see the difference.
May 3, 200619 yr Author Ahh, yes. I data is stored in a seperate table referenced via a relationship and placed into a portal. That data is never part of a find, but is sorted via the portal.
Create an account or sign in to comment