VIPPY Posted May 3, 2006 Posted May 3, 2006 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!
comment Posted May 3, 2006 Posted May 3, 2006 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 ]
VIPPY Posted May 3, 2006 Author Posted May 3, 2006 Thank you so very very much. Your awesome and have helped me several times now. I owe you one or two or ten...
VIPPY Posted May 3, 2006 Author Posted May 3, 2006 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.
comment Posted May 3, 2006 Posted May 3, 2006 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...).
VIPPY Posted May 3, 2006 Author Posted May 3, 2006 Well... I didn't understand most of what you just said, but I tried it and it worked. Don't know why. :
comment Posted May 3, 2006 Posted May 3, 2006 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.
VIPPY Posted May 3, 2006 Author Posted May 3, 2006 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.
Recommended Posts
This topic is 6781 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now