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

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

Recommended Posts

Posted

I guess it's fun to be called a "newbie" by the list software. Been programming 25 years, since junior high, paper tape, punch cards, TeleType and DecWriters, BASIC, Fortran IV, WATFOR, APL, Burroughs Extended Algol, Lisp, Pascal, C, C++, ...

Anyway, here is my problem. It's multi-disciplinary because it includes scripts, layouts, fields, relationships, the works. So apologies for not knowing into which forum to place this question.

I am trying to create a letter to parents of campers in Ukrainian. The layout is stored in file >master<, which has relationships to files >families< and >children<. The scripts are in >master< as well.

Part of my layout is static Ukrainian text. No problem here.

Part of the layout is global fields stored in file >master<. These fields are built up, word by word or phrase by phrase, from various fields, mainly in >children<. Due to the complexity of Ukrainian grammar, this is complicated, but it is working. No problem here either.

Part of the layout is a portal, directly showing records in the >children< file by a "byFamily" relationship, thus showing multiple childrens' records at once. this works too, for display.

There are 3 scripts in a hierarchy. The top-level script (script I) chooses the (this year, 111) records representing families with kids registered for this year. It then loops record by record, calls script II, and prints. Script II handles all of the tasks to get the proper fields visible, etc., all except creating that complicated, custom, Ukrainian text message, which is a per-child task anyway. It (script II) calls script III, once per child, to append that child's info onto the entire message.

...[Why this method? Only 1 text global is used, stored in >master<, rather than

...450 text fields, one per child, that shortly (when more kids are registered,

...or when one withdraws) will contain obsolete information. Yes, it does

...make it slower. Moore's law should not be forgotten, however.]

All is well up to this point. The layout displays nicely on the screen.

However, when I go to print, the global fields from >master< print as expected, with the appropriate kid's name, etc.; but, the fields within the portal (byFamily::, and the other fields with other relationships (families::tel_home, etc.) display not the _n_th kid's information and his/her

parents' information, but consistently show the FIRST kid's and parents' information.

At one point, I ended on the 10th family in the found set (of 111 families). Just for kicks, having canned the script, I did a manual print (meaning, File/Print...). Same problem. I did a manual print and specified that I want to print pages 10 through 10 ... printed properly.

HELP! What is going on? What did I do wrong? Why is my printout not WYSIWYG? How can I, from within the script, print just the current page?

BTW, a slightly related question ... Print Setup[Restore] ... does this restore only the paper type, orientation, etc., or also the printer name etc.? I.e. do I need a new script for each printer type I may ever use?

Thanks much for any help!

- -

Mark

Posted

Some answers:

Never print portals. That's not an absolute, but pretty nearly so. Portals weren't designed to be printed. When printing related fields without a portal, it'll always go to the 1st related record for print info. Chances are you'll need to print from the related file -- in a one-to-many relationship, it's almost always better to print from the "many" side.

Regarding WYSIWYG, I'll bet long odds you're on a Windows machine, and Windows has WYSIWYG issues, especially with Filemaker.

Regarding printing the correct record(s), if you print just the "current record", rather than a certain page from "records being browsed", you'll be better off -- and may avoid some of those WYSIWYG issues. One way to script this is to create a loop, starting from the first record, printing the current record, going to the next record, etc. You could also create two global number fields for the first and last records you want to print.

--------------

I hope some of this is helpful.

Dan

Posted

The reason for printing the portal was so that I could create one invoice per family, that invoice showing all children. The portal is the easiest (only?) way of doing that.

Yes, Windoze machine. Filemaker for Linux out yet? :-)

I am trying to do exactly that, print the current record. However, neither

my Print Setup nor my Print dialog boxes show that option, and thus, presumably, I can't save that for the [Restore] option in the script ...

--

Mark

Posted

Rather than printing the portal, create a sub-summary part in the related file when sorted by, say, "family". Then have a script perform the sort, go to preview mode, pause, then print -- while paused, you can see which page(s) to print. Or you can have the script perform a find in the related file before sorting, so that you just print all the pages.

Your print dialog box should have a way to print the current record -- check all the buttons and pop-up menus for other settings.

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