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

Conditional multiple printing, non-default printer


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

Recommended Posts

Posted

Hey all

I'm trying to get this print script to print 1 report, and 2 additional reports if certain conditions are met.. both additional reports rely on seperate conditions.

The thing is.. one of the computers that needs to use this script has to select a non-default printer to print from.. and so after choosing the printer for the first report, the additional reports print out through the default printer for that computer. The process was to be automated so that you just print the 1st report and the additional reports will be printed as well without the need for anymore additional human input; for efficiency.

The script works fine if it's all going through the default printer. It doesn't really help that I don't fully understand storing print settings and the whole keep/replace thing.. but really all i need is for filemaker to use the printer that was last selected for the duration of the script.

A description of how things are set up..

We have 2 offices. Filemaker is served from one location, and from our other office is the computer that is using Filemaker via Terminal Service on the server. This method was necessary.. client software at the remote office accessing Filemaker via VPN is just too slow at the moment, and by using Terminal Service on that particular computer, Filemaker just runs a lot faster. We can't really set the server's default printer to the printer at the remote office, since we also use the server's printer for printing out diagnostic reports(I work at a sleep clinic). So this remote computer has to manually select the printer on their end to print from each time.. otherwise it gets printed on the wrong printer.. in the wrong office. With the use of this script in question.. the first report prints at the remote location.. while the 2 additional reports would autmomatically print to the wrong office. Hope that made sense.

Here's what I have..

#Enter Browse Mode []

#Go to Layout ["FIRST REPORT"(PatientDatabase)]

#Show All Records

#Omit Record

#Show Omitted Only

#Print Setup [Restore; No dialog]

#Enter Preview Mode [Pause]

#Print []

#If [${PatientDatabase}::FieldToCheckForCondition = "ConditionMet"]

#__Enter Browse Mode []

#__Go to Layout ["SECONDREPORT" (PatientDatabase)]

#__Enter Preview Mode []

#__Print [No dialog]

#End If

#If [isEmpty(${PatientDatabase}::2NDFIELDCONDITIONCHECK)]

#__Go to Layout [original layout]

#__Enter Browse Mode []

#Else

#__If [${PatientDatabase}::2NDFIELDCONDITIONCHECK = "CONDITIONMET"]

#_______________________/* if the field isn't empty, it checks for a particular

#_______________________value, if matched the script exits */

#____Go to Layout [original layout]

#____Enter Browse Mode []

#__Else /* any other value for the field triggers the 3rd report to print */

#____Enter Browse Mode []

#____Go to Layout ["THIRDREPORT" (PatientDatabase)]

#____Enter Preview Mode []

#____Print [No dialog]

#__End If

#End If

#Go to Layout [original layout]

#Enter Browse Mode[]

Upgrading to Filemaker Pro 7 soon(the above script was taken from a Pro 7 trial.. still won't work in Pro 6), that will hopefully speed things up between the two offices so that we wouldn't need the fancy remote connection.. but in the meantime I'd like to try and get this to work..

a noob,

gillz

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