Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Alpahbetical listing in booklet form.


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

Recommended Posts

I have a list of 30 - 600 people in a pictorial booklet lets just say 30 for now. They are sorted alphabetical.

This is the output I need filemaker 7 to do.

3 record per page. On page 1 we would have A on the top left and Z on the right bottom of page. What would be the best way to sort this.. I have a pictorial directory number field I would like to sort. I am close to a good sort using some calculations and scripting to paste a sort order numer into the pictorial directory number field but the right records are top to bottom and I need them to be bottom to top.

Page = 1 -- Left Record = 1 -- Right Record = 28

Page = 1 -- Left Record = 2 -- Right Record = 29

Page = 1 -- Left Record = 3 -- Right Record = 30

Page = 2 -- Left Record = 4 -- Right Record = 25

Page = 2 -- Left Record = 5 -- Right Record = 26

Page = 2 -- Left Record = 6 -- Right Record = 27

Page = 3 -- Left Record = 7 -- Right Record = 22

Page = 3 -- Left Record = 8 -- Right Record = 23

Page = 3 -- Left Record = 9 -- Right Record = 24

Page = 4 -- Left Record = 10 -- Right Record = 19

Page = 4 -- Left Record = 11 -- Right Record = 20

Page = 4 -- Left Record = 12 -- Right Record = 21

Page = 5 -- Left Record = 13 -- Right Record = 16

Page = 5 -- Left Record = 14 -- Right Record = 17

Page = 5 -- Left Record = 15 -- Right Record = 18

Here is some code that does what I want done but I need to translate it to Filemaker...

Code:

Module Module1

Sub Main()

Dim recordCount As Integer = 30

Dim recordsPerPage As Integer = 3

Dim pageCount As Integer

Dim leftRecordNumber As Integer

Dim rightRecordNumber As Integer

Dim pageNumber As Integer = 1

Dim recordIndex As Integer = 1

pageCount = recordCount / (2.0 * recordsPerPage)

If recordCount Mod (2.0 * recordsPerPage) <> 0 Then

pageCount += 1

End If

Console.WriteLine("Page Count = " & CStr(pageCount))

While pageNumber <= pageCount

For recordIndex = 1 To recordsPerPage

leftRecordNumber = (recordsPerPage * pageNumber) - RecordsPerPage + recordIndex

rightRecordNumber = recordCount - (recordsPerPage * pageNumber) + recordIndex

Console.WriteLine("Page = " & CStr(pageNumber) & " -- Left Record = " & CStr(leftRecordNumber) & " -- Right Record = " & CStr(rightRecordNumber))

Next

pageNumber += 1

End While

Console.ReadLine()

End Sub

End Module

Anyone have a way to make this work for me in Filemaker?

I do appreciate it very much.

Mark Jones

Link to comment
Share on other sites

Create two numeric fields: SortOrder and DisplayOrder.

Set up your print layout to display in two columns. Set the options on the body part of the layout to page break after every 3 records.

You will need to ensure that you have an exact multiple of 3 records in your file. If not, then add one or two blank records.

Make a 5 step script to do this:

1. Sort the records alphabetically.

2. Use the replace command to set SortOrder to serial numbers starting at 0 and incrementing by one.

3. Use the replace command to set DisplayOrder using the formula:

Let([

Group = Div( SortOrder;3);

NoOfGroups = Div(Get ( TotalRecordCount )-1;3);

NoOfPages = Round(NoOfGroups/2;0)

];

Case(Group>NoOfPages; 0.5 + NoOfGroups-Group; Group)*100 + Mod(SortOrder;3))

4. Sort the file on the DisplayOrder field.

5. Print

Link to comment
Share on other sites

It doesnt seem to be working. I triple checked for errors and all I get is the same alpha order. The Display order field shows the numbers but they are the same order as the alpha listing.

Did I miss something.

Mark Jones

Link to comment
Share on other sites

The file is locked so I couldn't get to the define fields to look at the calculations. It looks like it right on track.. Can you resend a unlocked file?

Thanks.

Mark Jones

Link to comment
Share on other sites

Thanks guys. The files open just fine and they both work perfectly. I don't know why the other file wouldn't open. I have never had one act like that before.

I will glean what you have shared and get er done. I do appreciate it very much.

This forum is one of the best online. I have been helped so many times by the great ideas and help that is shown here.

Now to the task at hand.

Mark Jones

Link to comment
Share on other sites

Hi guys. Well you did such a good job telling me how to sort and print the Top page of the booklet and I got to thinking

I wonder if you could figure out a sort for bothsides and a script to get it to pause between sorts.

This is way beyond my abilities. What do you think? Here is the layout specifics.

Booklet Printing. Front and Back Pages. Need a pause between Backside and Frontside to reposition the paper in the printer.

0 to 1000 records possible in this case 36 records

The first sort will be alaphbetical.

3 records per page each side.

Page Count = 6

BackSide

Page = 1 -- Left Record = 34 -- Right Record = 1

Page = 1 -- Left Record = 35 -- Right Record = 2

Page = 1 -- Left Record = 36 -- Right Record = 3

FrontSide

Page = 2 -- Left Record = 4 -- Right Record = 31

Page = 2 -- Left Record = 5 -- Right Record = 32

Page = 2 -- Left Record = 6 -- Right Record = 33

BackSide

Page = 3 -- Left Record = 28 -- Right Record = 7

Page = 3 -- Left Record = 29 -- Right Record = 8

Page = 3 -- Left Record = 30 -- Right Record = 9

FrontSide

Page = 4 -- Left Record = 10 -- Right Record = 25

Page = 4 -- Left Record = 11 -- Right Record = 26

Page = 4 -- Left Record = 12 -- Right Record = 27

BackSide

Page = 5 -- Left Record = 22 -- Right Record = 13

Page = 5 -- Left Record = 23 -- Right Record = 14

Page = 5 -- Left Record = 24 -- Right Record = 15

FrontSide

Page = 6 -- Left Record = 16 -- Right Record = 19

Page = 6 -- Left Record = 17 -- Right Record = 20

Page = 6 -- Left Record = 18 -- Right Record = 21

Here is the code you guys came up with that works great for oneside printing...

Let([

total=Get (FoundCount);

split = Div (total ;2) ;

groups=Div(total ; 3 ) ;

group= Div(RecordSortOrder -1 ; 3)

];

Case (

RecordSortOrder <=split;

group;

groups - group - 1

)

)

Is two sided printing possible? With a script?

Your help is appreciated. I have a Royal Ranger Leaders Pictorial Booklet (church boyscout Leaders)and it changes

quite often. It would be nice to be able to print off a booklet with the click of a button. We use the proceeds to put

improvements on a campground for the boys.

Thanks for your good work.

Mark Jones

Link to comment
Share on other sites

A Windows-toting friend was showing me a printer driver he DL'ed that would do this kind of thing, and more, from any application.

I can't really delve into a native FM solution now, but it seems like even groups should print before odd ones (the first group being 0). If so, you can add another calc field (result is number) =

Mod ( cGroup ; 2 )

Now find records where this field = 0 and print them. Then find omitted and print the other side (sorting appropriately after every find, of course).

Link to comment
Share on other sites

Speaking of printer drivers, I know that the last Adobe Postscript driver that I downloaded from Adobe for Mac OS8/9, had the ability duplex print on any PS printer. Of course, if you don't have a PS printer that's not much help. As for printing even or odd pages first, the Adobe driver would ask the user two questions:

1. Do you load the paper printable side up or down?

2. Does the paper come out of the printer printed side up or printed side down?

The answers to those questions will determine whether you print even or odd pages first, and whether you print normal or reverse order.

To do the same thing in Filemaker, we need to know the same info.

Link to comment
Share on other sites

I am not sure what you're after with the paper up/down thing. Here's the thing that does the split between passes. If the second pass needs to be printed in reverse order of pages, it is a simple matter of reversing the main sort order. One could even set up a global flag to handle various printers - but I am not getting into that, nor page numbering.

bookletPrinter.fp7.zip

Link to comment
Share on other sites

I was probably just getting carried away. The reason for needing to know the paper position is so that you can take the printed pages out of the printer in a stack and reinsert them into the printer to print the second side without having to re-order the pages. Depending on the orientation of the paper, the output stack may be in reverse order. Running them through again to print the second side, will reverse them a second time, leaving the final order correct, but in that case, the printer must print the second side in reverse order. I wasn't sure if Mark was taking that into account.

As it turns out in this case, with two pages on each side of the sheet, the problem corrects itself. As you had mentioned earlier, its only necessary to print using the even page numbers as the print order (and by page number, I mean 4 per sheet, not 2) and pause after half are printed, then print the rest. Mark's last example is really 12 pages in the final bound booklet. So, the page order in printing would be:

2 & 11

4 & 9

6 & 7

Pause

8 & 5

10 & 3

12 & 1

Link to comment
Share on other sites

Hey guys that did the trick. It did fool me at first as I didn't figure the resort of the printed pages. After I messed with it I saw Bob's post and said..yes thats what I did...I put a reminder in the script to reorder the printed output from top to bottom.

Bob can you download comments file and add your calcuation to it like he added yours. Comment's method of sending the file makes it so much easier to adapt it into my solution.

Thanks to both of you. The examples and ideas made it work.

Mark Jones

Link to comment
Share on other sites

Printer Driver that does booklets... I went out to Download.com and twocows.com and downloaded and installed 4 different programs. None really did what I was wanting it to do. They are designed for full page layouts and don't get close to the right size of this booklet format.

We are very close to having this done. The paper sort would be nice if I only had to pull it out turn it around and put it back in but as it is I can put show messages to remind one to do what needs to be done. I am delighted it does the job. I think that is great!

Mark Jones

Link to comment
Share on other sites

You need to change - permanently - the sort order in the script of the second pass. Then you will be able to run script one, reverse the paper and run script two.

Ha! Your making my brain stretch here.

In second pass script. You have after initializing the RecordSortOrder field...

Let ( [

total = Get ( FoundCount ) ;

split = Div ( total ; 2 ) ;

groups = Div ( total ; 3 ) ;

group = Div ( table::RecordSortOrder - 1 ; 3 )

] ;

Case (

table::RecordSortOrder <= split ;

group ;

groups - group - 1

)

)

The Next Script Step...

Let ( [

total = Get ( FoundCount ) ;

split = Div ( total ; 2 ) ;

groups = Div ( total ; 3 ) ;

group = Div ( table::RecordSortOrder - 1 ; 3 )

] ;

table::RecordSortOrder > split

)

Permantly change which sort order? I am so out of my league here. I feel like a cow looking at a new fence post... HELLO!!!! But I am ready to chew more cud to get er done.

Thanks guys for your hardwork and leading here. Just for a break look what I get to organize and run this Saturday. The event saturday will be several times larger than these pictures show.

http://readyrangers.tzo.com/Rangermobile2002.htm

Mark Jones

Link to comment
Share on other sites

There is a section marked #RESHUFFLE RECORDS. The first step there is Sort Records. Select it and click Specify... In the Sort Order window, select the topmost field Group#, and change the order to descending. That should be it.

like a cow looking at a new fence post...

Now that's very interesting. Where did you pick up this idiom?

Link to comment
Share on other sites

Ha! I come by it naturally. It is a common saying around Missouri for those whom don't have a clue trying to do something....

I changed it as you so directed. I don't have a printer handy right now so will have to test it when I get home. I did add the print script step in the right place. I am delighted to get this working. Last year I was approached to make a booklet layout and collect the data and pictures and print off a master pdf file. In the generic setup of Filemaker I was able to fold the edges in and it made a dandy booklet in the right order. I sent the master in with instructions on how I had it laid out...they didn't change a thing. Simply copied it and made 300 copies of 60 pages stapled in the center with the edges out. To say the least when I saw the first booklet I almost lost my good nature and was on the hi road to a good chewin..but before I could really get wound up I was told... I told them to do it that way.... So now it's a good laugh around the camp fire. It still raised several hundred dollars for the campground and it has helped many a Royal Ranger Leader put the face with the name. Now it will be setup so they can simply copy and staple and get er done.

Thanks a bunch. I have to transfere it over to my solution and get it all right and will give you and Bob a report back.

Mark Jones

Link to comment
Share on other sites

like a cow looking at a new fence post...

For some reason my post from yesterday didn't stick. So will bring it up to today.

We use that in Southern Missouri for those that have a job to do and don't have a clue on how to get it done.

I come by that naturally. GRIN!

I printed the booket from your solution and it did the trick and did it wonderfully. So I spent the evening getting ready for a Big Ranger Mobile Race Saturday and adapting your code to my solution. I had a few things I had to figure out with importing scripts. The * in the front and the end of a script was a new one for me. So it took me a while to figure out why those imported scripts didn't work. There are a lot of things to convert mainly table names and field names and I changed the show all records steps. Also the find script steps had to be adjusted.

I am tickled to just have this about wipped. All I need to do is get it to a printer and give it a test...

Your math skills are awesome and the way you do it by sending over a fm7 filen allows guys like me to beable to figure it out and learn a few things at the same time. Thanks for the Good Work.

Mark Jones

Link to comment
Share on other sites

Comment. I understand what you meant by your first statement...a multiple of 6. I was thinking of adding blank records that would bring the count up to the next multipe of 6 and have a container field that would display if the name field was blank.

One solution brings another opportunity. Suggestions?

Mark Jones

Link to comment
Share on other sites

I would probably do this in a separate table - adding dummy records would mess with serial numbers continuity.

So the steps would be:

Find & Sort in the originating table;

Import into PrintBook table;

Loop

Exit Loop If [ not Mod ( Get(FoundCount) ; 6 ) ]

New Record

End Loop

and the rest.

I can't test this now, but it seems it should work.

I am not sure of the role of the container field. Is it to hide something, like labels?

I would rather make the labels calculated, e.g. Case ( not IsEmpty ( Name) ; "Name: " ).

Link to comment
Share on other sites

  • 4 weeks later...

Hi. Comment. I have been busy and had put the booklet on the side burner for a while. I just checked back today and see you have a solution. I just downloaded and will check it out.

The container idea was.... for the records I needed to create to get a multifple of 12 to have a calculation look at the name field and if their was no text it would display a bitmap in it's place to cover that record's layout. For example a bitmap-advertisement or logo.

Will give this new attachement a go. Thanks for the work.

Mark Jones

Link to comment
Share on other sites

I have been looking this over. You have done a nice job. I have a question what is in browse mode the black box that is in the middle of the label. I can't seem to edit it or change it. I think it is the invisible portal you referenced in the previous message. I am new to invisible portals...here we go a NEW FENCE POST!

What I have in mind is using the source layout to import data into and then use your cool, smart scripting and calculations to get the records sorted in the right booklet order and print. Then return back to my solution. I have most of this working and am triping over the invisibile portal.

Thanks for your lead here. I imported records into the source table file and added the 9 data and one container fields. This will fit the need nicely.

I enjoy the learning this stuff. Thanks.

Mark Jones

blackblock.jpg

Link to comment
Share on other sites

Yep, that's a portal all right. By "invisible" I meant it has no fill or border color. Judging from the pic you don't need it, so go to Layout mode, click on the portal creation tool and choose Select All from Edit menu. This will select the portal and allow you to delete it.

Link to comment
Share on other sites

Thank You! I went to 400 scale and was able to finally get a handle to drag the portal bigger. I deleted the first file as I apparently messed the portal up and couldn't grab a handle..the second file had handles at least ones I could see. I have it working great. I spent most of the evening adapting it to my solution and printed off my second booklet. Your a DANDY! It works GREAT and does exactly what I wanted. I basicly am using it as a temporary import file. I export the data from my District Database pictures, text using a script then load the file you created and import my data into the additional fields. I changed the Label layout a bit and added some scripts to it. It works and looks good.

The original solution you made did exactly what I asked for but it didn't dawn on me a whole new math problem would come out of it. I will say I have spent more time on this little project and learned a bunch. I don't have the math ability that you obviously have but I sure wished I did. GRIN!

Thanks again Comment.

Mark Jones

Link to comment
Share on other sites

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