Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

Hi!

I'm still running into problems formatting reports. I've received fantastic help here, but am stuck again.

I would like some words to repeat above the first iteration of the data part on second and subsequent pages. (Also not to repeat if the page begins with eg. the trailing summary part - but that is easier.)

I could figure out a way to do this if the function Get(PageNumber) actually returned the correct page number in preview mode. It doesn't. I must be doing something wrong - but what?

Also - Get (FoundCount) returns the total number of records if the records were not collected via the Find function but rather by Going to Related Records.

Is there a calculation that will return the number of records actually being browsed in that case? The only thing I can think of would be an aggregate count via a self-joined relationship. Seems like a lot of trouble for such a simple thing.

Related problem: Get (RecordNumber) also returns the number of the record in the total group if the selected records were compiled by going to Related Records rather than through a Find.

I must be missing something obvious. Unfortunately it isn't obvious to me.

Please help!

Posted

I'm afraid all your assumptions are wrong. Most likely, you are using these Get(...) functions in a STORED calculation field. If so, make the field/s unstored, or use the functions directly in a script.

I believe your first question has been discussed at length and answered here:

http://www.fmforums.com/forum/showtopic.php?tid/7420

See also:

http://www.fmforums.com/forum/showtopic.php?tid/187328

http://www.fmforums.com/forum/showtopic.php?tid/187370

Posted

Comment, thank you again! Of course: unstored! I knew I was missing something glaringly obvious.

The problem with the solution offered in the second link (which I have already used a number of times!) is that it repeats the fields even when the page begins with the final grand summary. Unless again I'm missing something obvious.

But unstoring the Get Page Number results should do the trick.

Thanks so much!!

Posted (edited)

Oops. I don't understand why this doesn't work:

Case(

page number > 1

and

page number ≠ GetNthRecord ( page number ; Get ( RecordNumber ) -1);"Zeitraum")

placed in the body part.

The page numbers are correct. Page number is not stored - is that the reason?

I obviously don't have a clear grasp of the effects of storing or not storing data.

Sorry - just saw your reply. I'll try that.

Edited by Guest
Posted

But what if the page actually begins with the last record? How to distinguish between that and the page beginning with the trailing grand summary?

That is why I've thought putting the fields in the body part was the better way.

Posted

I see. That could indeed be a problem. I don't see how putting the fields in the body part would help, unless you know on which page each record will print. If there is a fixed number of records per page, and there are no subsummary parts, this can be easy. Otherwise it can get rather complex - see:

 

Posted

No, unfortunately no way of knowing how many records will fit on a page as they are of unequal lengths.

Nor can I possibly ask the people using the database to perform the "brute force" procedure...

Could you explain why the calculation I posted three above doesn't work? It seems to me it should, but obviously I'm just being dense again and missing something so simple everyone else sees it.

Thanks!!

Posted

Nor can I possibly ask the people using the database to perform the "brute force" procedure...

Well, the 'brute force' would be handled by a script - the users need only to run it...

Could you explain why the calculation I posted three above doesn't work?

It could work if the PageNumber field was of type Number and populated with the page number of each record. That's what the 'brute force' script does. But if the field is an unstored calculation, it will not work, because Get ( PageNumber ) will always evaluate as the CURRENT page number - even if wrapped in GetNthRecord().

This topic is 6297 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.