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

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

Recommended Posts

Posted

How does one scritp a button to do a report on a single record.

If I am browsing the records of 20 records, and want to print only the one I am looking at, how do I make it do a print preview of that report without showing/printing all reports?

Posted (edited)

On the Mac, it is a drop down menu option in the print dialog box. I'm sure there is a similar option on Windows.

Menu >> File >> Print >> Copies and Pages >> FileMaker >> check the box Current Record.

You can also do this using a script.

Script Step

Print >> Specify Print Options >> Copies and Pages >> FileMaker >> Check the box "Current Record"

This is covered in the [color:blue]Online Help under [color:blue]Printing records (the online help is available when you have FileMaker open.

HTH

Lee

Edited by Guest
Posted

Thanks Lee,

My problem is this is a desktop distributed app with runtime. So I need to have the report of the current window being browsed shown and not all reports. So if you have 5 records, but want to print record #1, if you are looking at that record in the form view, click a button to print, it will open that specific record only in preview mode and then print it. My problem is all records are showing in preview, yet the printing is only doing the record I want. How do I have only the record being browsed show and not all records?

I did a script doing a custom search by name or case number, but my client wants there to be a print current record report as well, not showing all but rather just the one.

Posted

I'm confused about this a little. You know that you can script printing the current record, right?

The problem is, that the user needs to be ON the record to be printed, if they are in List or Table View. I would be tempted to have the button script to take them to a Form View to verify the record to be printed, and then print from it.

Lee

Posted

That is my problem, while in the form view, the user clicks the button, then it opens the report showing ONLY the record they were on in form view, then when they hit continue, it will print. But in the record view, it shows all records, I just want the one they were on in form view to be shown.

Posted (edited)

ok, your report is call for all records.

a new button might be in order for just the current record.

you might use the

Find all records

Omit

Find Omitted

Print

Or, create a new button that does not do the script for the report, and prints only the current record.

Lee

Edited by Guest
Posted

FileMaker always shows the found set in Preview mode. So you need a found set of just the current record. But then you lose the user's found set, which would be annoying. Probably the easiest way to do this is to use a script to create a new window, isolate the current record, print, then close the window. In its simplest form (pseudo code):)

New Window

Show All Records

Omit Record

Show Omitted Only

Toggle Status Area [ Show ] // they need this to see "Continue"

Preview [ Pause ]

Print

Close Window [ current ]

To get fancier you might want to check that the window isn't already open (though it shouldn't be). You may want to start off with Allow User Abort ["Off"], so it doesn't show a Cancel button; canceling would leave them stranded. If the Print does not have [x] Perform without dialog, then they can always cancel the print at that point. Or you can show the Cancel, then trap for an error, and return them to the original layout; either way.

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