Jump to content
Server Maintenance This Week. ×

Display Last Record in Report Header


This topic is 6568 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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!

Link to comment
Share on other sites

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 ]

Link to comment
Share on other sites

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...).

Link to comment
Share on other sites

This topic is 6568 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.