Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

reports and related problems

Featured Replies

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!

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

  • Author

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!!

Yes, if you add a condition such as 'not last record in the found set', I believe that should work.

  • Author

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

  • Author

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.

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:

 

  • Author

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!!

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

  • Author

OK. Thank you for explaining it to me, anyway.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.