dbTalk Databases Forums  

Display number of records per page?

comp.databases.filemaker comp.databases.filemaker


Discuss Display number of records per page? in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
zimbabwhat@gmail.com
 
Posts: n/a

Default Display number of records per page? - 09-25-2006 , 04:52 PM






I want to put something like "Records 1-11" on the first page, "Records
12-20" on the second page, and so on, of a printed layout that has a
variable number of records per page. Is this possible? Thanks!


Reply With Quote
  #2  
Old   
Helpful Harry
 
Posts: n/a

Default Re: Display number of records per page? - 09-26-2006 , 01:10 AM






In article <1159221133.909518.49870 (AT) i42g2000cwa (DOT) googlegroups.com>,
zimbabwhat (AT) gmail (DOT) com wrote:

Quote:
I want to put something like "Records 1-11" on the first page, "Records
12-20" on the second page, and so on, of a printed layout that has a
variable number of records per page. Is this possible? Thanks!
Realistically I don't think this is possible.

You can create a script that loops through the records going into
Preview mode to find which records are on which page, BUT there's a bug
in the Preview mode (at least up to FileMaker 6) which means what you
see there may not exactly match what actually comes out of the printer
- sometimes a record appears on one page in Preview mode, but gets
bumped to the next on the printed paper. (

Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


Reply With Quote
  #3  
Old   
zimbabwhat@gmail.com
 
Posts: n/a

Default Re: Display number of records per page? - 09-26-2006 , 07:46 AM



Thanks a lot for the response. Just to give it a try, which script step
would allow me to calculate how many records are on a page, after I'd
entered Preview mode?


Reply With Quote
  #4  
Old   
FP
 
Posts: n/a

Default Re: Display number of records per page? - 09-26-2006 , 05:26 PM



In FM7&8 the command is Get ( PageNumber ).
However, what you're trying to do is not so simple.
You'll need to create a new text field and put it in the footer of the
list. Then you'll have to enter the text "Records 1 - 11" in that text
field in record 11 (the last one displayed on that page). To display
"Records 2-20" on the second page you'll have to enter the text in the
new text field in record 20 ... etc.

Entering preview mode and then back to browse mode to write the data
into the records could be time consuming, you may want to rethink this
idea.

zimbabwhat (AT) gmail (DOT) com wrote:
Quote:
Thanks a lot for the response. Just to give it a try, which script step
would allow me to calculate how many records are on a page, after I'd
entered Preview mode?


Reply With Quote
  #5  
Old   
Helpful Harry
 
Posts: n/a

Default Re: Display number of records per page? - 09-28-2006 , 01:49 AM



In article <1159274784.289156.31610 (AT) k70g2000cwa (DOT) googlegroups.com>,
zimbabwhat (AT) gmail (DOT) com wrote:

Quote:
Thanks a lot for the response. Just to give it a try, which script step
would allow me to calculate how many records are on a page, after I'd
entered Preview mode?
Unfortunately it's rather a complicated script that has to loop through
all the records backwards flipping between Preview and Browse modes ...
and thanks to the bug, there's no guarantee that it'll actually give
the correct results. (

Basically the script to give each record the page number it (possibly)
appears on is:

Find Records
Loop
Go to Last Record
Enter Preview Mode
Go to Last Page
Get Page Number and store with record
Enter Browse Mode
Omit last record
Exit Loop when all records have been omitted
End Loop

Within this you'd need to work out when the page number changes and
store the "Records X - Y" text in another field. (It's probably easiest
to use a separate table to store these and link them vai a relationship
based on the page number).

BUT it's really not worth wasting any time trying it.

I used it in one database to calculate a Table of Contents and Index
for a directory, but it's slow and because some records can preview on
a page different to what they actually print on, you end up with
incorrect page numbers in some places.


Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


Reply With Quote
  #6  
Old   
zimbabwhat@gmail.com
 
Posts: n/a

Default Re: Display number of records per page? - 10-03-2006 , 09:25 PM



Thanks a lot Helpful Harry. I think I'll give it a try if I have the
time, but I see what you mean that it's a less than ideal - or,
potentially unusable - solution.

Helpful Harry wrote:
Quote:
In article <1159274784.289156.31610 (AT) k70g2000cwa (DOT) googlegroups.com>,
zimbabwhat (AT) gmail (DOT) com wrote:

Thanks a lot for the response. Just to give it a try, which script step
would allow me to calculate how many records are on a page, after I'd
entered Preview mode?

Unfortunately it's rather a complicated script that has to loop through
all the records backwards flipping between Preview and Browse modes ...
and thanks to the bug, there's no guarantee that it'll actually give
the correct results. (

Basically the script to give each record the page number it (possibly)
appears on is:

Find Records
Loop
Go to Last Record
Enter Preview Mode
Go to Last Page
Get Page Number and store with record
Enter Browse Mode
Omit last record
Exit Loop when all records have been omitted
End Loop

Within this you'd need to work out when the page number changes and
store the "Records X - Y" text in another field. (It's probably easiest
to use a separate table to store these and link them vai a relationship
based on the page number).

BUT it's really not worth wasting any time trying it.

I used it in one database to calculate a Table of Contents and Index
for a directory, but it's slow and because some records can preview on
a page different to what they actually print on, you end up with
incorrect page numbers in some places.


Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


Reply With Quote
  #7  
Old   
Remi-Noel Menegaux
 
Posts: n/a

Default Re: Display number of records per page? - 10-04-2006 , 03:33 AM



It's not an elegant way and it does not fully answer your request, but it
has the merit of being extremely simple : you may add to the left of body
part in layout mode the characters "@@" (without the quotes) that will give
the rank of the present record, thus a quick look at the beginning and the
end of each page may answer your request (if you substract those 2 numbers
mentally, hum !!!).
Just my 2 cts.
Remi-Noel
PS : I once made in FMP6 a "carried_over_totals.fp5" example which worked
pretty well but not in every circumstance. I just tried to use that
technique to calculate the number of records per page (by putting amount = 1
in my file) but I countn't make it work. If someone ever wants to make a try
and do better than me, I can send him my original little file (privately of
course at rnmenegaux (AT) free (DOT) fr).


<zimbabwhat (AT) gmail (DOT) com> a écrit dans le message de news:
1159928738.437345.277850 (AT) i3g200...oglegroups.com...
Quote:
Thanks a lot Helpful Harry. I think I'll give it a try if I have the
time, but I see what you mean that it's a less than ideal - or,
potentially unusable - solution.

Helpful Harry wrote:
In article <1159274784.289156.31610 (AT) k70g2000cwa (DOT) googlegroups.com>,
zimbabwhat (AT) gmail (DOT) com wrote:

Thanks a lot for the response. Just to give it a try, which script step
would allow me to calculate how many records are on a page, after I'd
entered Preview mode?

Unfortunately it's rather a complicated script that has to loop through
all the records backwards flipping between Preview and Browse modes ...
and thanks to the bug, there's no guarantee that it'll actually give
the correct results. (

Basically the script to give each record the page number it (possibly)
appears on is:

Find Records
Loop
Go to Last Record
Enter Preview Mode
Go to Last Page
Get Page Number and store with record
Enter Browse Mode
Omit last record
Exit Loop when all records have been omitted
End Loop

Within this you'd need to work out when the page number changes and
store the "Records X - Y" text in another field. (It's probably easiest
to use a separate table to store these and link them vai a relationship
based on the page number).

BUT it's really not worth wasting any time trying it.

I used it in one database to calculate a Table of Contents and Index
for a directory, but it's slow and because some records can preview on
a page different to what they actually print on, you end up with
incorrect page numbers in some places.


Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)




Reply With Quote
  #8  
Old   
Bill Marriott
 
Posts: n/a

Default Re: Display number of records per page? - 10-04-2006 , 04:43 AM



There is an easy way to do this if you are happy to have the label appear in
the footer.

Go to layout mode. Start a text block in the header part. Press return a
bunch of times until you've created a text block about 11 inches high, then
type "Records @@ -" and set the block right-justified.

[If you need to create room for this tall, skinny text block, then add a
subsummary part that you do not intend to use.]

Place a second text block starting in the footer. type simply "@@" in this
block.

You will need to tweak the alignment of the two text blocks a bit, but it
won't be too difficult to give the appearance of a single, neat line of text
at the bottom of the page.

This works because block 1 is showing the record number in effect at the top
of the page, and the block 2 is showing the one in effect at the bottom.
Layout objects starting in the header can "hang down" into other parts and
simply print as part of the background of the page.

If this description is not clear enough I'll be happy to provide an
illustration and/or sample file.

<zimbabwhat (AT) gmail (DOT) com> wrote

Quote:
I want to put something like "Records 1-11" on the first page, "Records
12-20" on the second page, and so on, of a printed layout that has a
variable number of records per page. Is this possible? Thanks!




Reply With Quote
  #9  
Old   
Helpful Harry
 
Posts: n/a

Default Re: Display number of records per page? - 10-04-2006 , 04:40 PM



In article <JrydnZmaWcqmH77YnZ2dnUVZ_tCdnZ2d (AT) comcast (DOT) com>, "Bill
Marriott" <wjm (AT) wjm (DOT) org> wrote:

Quote:
There is an easy way to do this if you are happy to have the label appear in
the footer.

Go to layout mode. Start a text block in the header part. Press return a
bunch of times until you've created a text block about 11 inches high, then
type "Records @@ -" and set the block right-justified.

[If you need to create room for this tall, skinny text block, then add a
subsummary part that you do not intend to use.]

Place a second text block starting in the footer. type simply "@@" in this
block.

You will need to tweak the alignment of the two text blocks a bit, but it
won't be too difficult to give the appearance of a single, neat line of text
at the bottom of the page.

This works because block 1 is showing the record number in effect at the top
of the page, and the block 2 is showing the one in effect at the bottom.
Layout objects starting in the header can "hang down" into other parts and
simply print as part of the background of the page.

If this description is not clear enough I'll be happy to provide an
illustration and/or sample file.
Well that's just cheating!! ;o)

That should work and is certainly easier for the original question than
the looping method, especially due to the bug.

I always forget that you can push bits across Part boundaries and they
still print.

Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


Reply With Quote
  #10  
Old   
zimbabwhat@gmail.com
 
Posts: n/a

Default Re: Display number of records per page? - 10-28-2006 , 07:47 PM



Thanks a lot for this tip!

Bill Marriott wrote:
Quote:
There is an easy way to do this if you are happy to have the label appear in
the footer.

Go to layout mode. Start a text block in the header part. Press return a
bunch of times until you've created a text block about 11 inches high, then
type "Records @@ -" and set the block right-justified.

[If you need to create room for this tall, skinny text block, then add a
subsummary part that you do not intend to use.]

Place a second text block starting in the footer. type simply "@@" in this
block.

You will need to tweak the alignment of the two text blocks a bit, but it
won't be too difficult to give the appearance of a single, neat line of text
at the bottom of the page.

This works because block 1 is showing the record number in effect at the top
of the page, and the block 2 is showing the one in effect at the bottom.
Layout objects starting in the header can "hang down" into other parts and
simply print as part of the background of the page.

If this description is not clear enough I'll be happy to provide an
illustration and/or sample file.

zimbabwhat (AT) gmail (DOT) com> wrote in message
news:1159221133.909518.49870 (AT) i42g2000cwa (DOT) googlegroups.com...
I want to put something like "Records 1-11" on the first page, "Records
12-20" on the second page, and so on, of a printed layout that has a
variable number of records per page. Is this possible? Thanks!



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.