Joe A Posted February 22, 2005 Posted February 22, 2005 Can't figure out how to print one layout in Portrait and another in Landscape without using printer setup for each. Is there any way FM will save printer setup with individual layout (or is there a script)?
BobWeaver Posted February 22, 2005 Posted February 22, 2005 Sadly, no. I had the same situation a couple of years ago and was never able to resolve it.
comment Posted February 22, 2005 Posted February 22, 2005 I believe the Page Setup script step can restore the last used Page Setup parameters - same as in Sort, Find, Export and Import.
BobWeaver Posted February 22, 2005 Posted February 22, 2005 That's what I had thought at the time, I had one print script with one page setup (portrait), and another script with another page setup (landscape), but whenever I printed, it would use the page orientation from the most recent print operation, not the one supposedly saved with the script. I was using FM5.5 on Mac OS9 at that time. However, I just tried it again with FM 6 on OSX and it works okay now. So, it may have just been a problem in older versions.
gdurniak Posted February 22, 2005 Posted February 22, 2005 The page setup script step does work in all versions, but ... you must have separate scripts for portrait and landscape, AND separate scripts for OS9, OSX, and Windows. That's a total of 6. Use "status (current platform)" to run the right one I read once that "page setup" is able to save both mac and windows setups in the same script, but I have found this not to work
comment Posted February 22, 2005 Posted February 22, 2005 I am glad someone knows this inside and out, because I have a follow up question: I need to make a runtime. Both Page Setup and Print have to be performed without dialog. Specifically, the page size and orientation and the number of copies printed must not be interfered with. Can I distribute such solution by email, when I don't know in advance which printer the user has (and some may have multiple printers)? This will be in v.4 on Windows.
-Queue- Posted February 22, 2005 Posted February 22, 2005 You should be able to, as long as each Print step includes a Print Setup in the same script. The Print settings are stored with the Print Setup, so having a Print step by itself in a script leads to chaos. What I do is create separate scripts for each Setup-Print combination--one for Portrait - Records Being Browsed - 1 copy, Portrait - Records Being Browsed - 10 copies, Portrait - Current Record, Landscape - Records Being Browsed, etc. Each script looks like If [not global] Print Setup [Restore, No dialog] Else Print [No dialog] End If Then, all other scripts set global to 0 and call the appropriate script when they want to perform a Print Setup, then set global to 1 and call it again. Also, if you include a script that only contains a Print Setup [ ] step and attach it to a 'Change Printer' button in your prefs file, users can change their default FM printer before running a particular report, and you can keep the No dialog portion of Print in your Setup/Print scripts, so that they cannot accidentally change the settings and screw themselves up.
BobWeaver Posted February 22, 2005 Posted February 22, 2005 Ahhh yes, now Comment's question reminds me of the source of my original problem. I had to distribute my solution to users who had different printers. There was no way for FM to remember the page orientation when the printer was different from the one originally configured and saved with the script. The only way around this was to have page setup scripts for every different brand of printer that may be used. Don't know if that was ever fixed with version 7.
-Queue- Posted February 22, 2005 Posted February 22, 2005 I haven't had that problem on Windows, unless you're referring to detailed setups, where one printer may have more capabilities than another (e.g., scaling) and using a less capable printer results in a default value for that printer. Otherwise, we've had no problems installing new printers of varying brands at 10 satellite locations and using them immediately. I would have shot myself a long time ago if that were the case. Was it only a problem for you on Macs?
Vaughan Posted February 22, 2005 Posted February 22, 2005 I've always thought the solution to this problem is to have some scriptable way to save the current page setup, without users having to edit the scripts in Scriptmaker itself. Then when a solution is first installed a "calibration" process is run where users setup the tall and wide page orientations for their preferred printer.
comment Posted February 22, 2005 Posted February 22, 2005 Thanks, -Queue-, Bob and Vaughan. Vaughan: can you elaborate on "some scriptable way to save the current page setup"? I don't quite see how that would work with a runtime.
comment Posted February 22, 2005 Posted February 22, 2005 Upon re-read, I am not sure I get it: If [not global] Print Setup [Restore, No dialog] Else Print [No dialog] End If Then, all other scripts set global to 0 and call the appropriate script when they want to perform a Print Setup, then set global to 1 and call it again. So the first call does: Print Setup [Restore, No dialog] Then the second call does: Print [No dialog] How is that different from plain: Print Setup [Restore, No dialog] Print [No dialog]
-Queue- Posted February 22, 2005 Posted February 22, 2005 If you don't want your users to preview the printout or set the total number of pages in a global, etc., then there is no difference. This just gives you the flexibility to do whatever you like in between the steps instead of being forced to perform them consecutively.
Vaughan Posted February 23, 2005 Posted February 23, 2005 "Vaughan: can you elaborate on "some scriptable way to save the current page setup"? I don't quite see how that would work with a runtime." I'm mixing requirements with interface here, which I know the engineering people *hate* but... for the exercise: An enhanced Page Setup script step, with an option to "update stored page setup" based on a calculation. You can then have a field that saved the current page setup into the Page setup script step, without needing developer access or needing to edit the script in Scriptmaker.
comment Posted February 23, 2005 Posted February 23, 2005 Is this a Windows thing? Ignoring for the moment the fact that this will be in version 4 - even in v.7 I don't see "enhanced Page Setup script step", and no option to "update stored page setup". Or did I misunderstand completely (again!), and you are talking about a requested feature?
Joe A Posted February 23, 2005 Author Posted February 23, 2005 I'm confused on how to setup the "global" field. Never used it before. I created a global field and a script as described above. Where and how do you specify non-global (1) and global (2)? FM4
-Queue- Posted February 23, 2005 Posted February 23, 2005 It would be a global number field that you treat as a boolean. When a script sets the global to zero, the If [not global] test returns true and performs the Print Setup. When a script sets the global to one, If [not global] is false, and the Print step is then performed.
Joe A Posted February 23, 2005 Author Posted February 23, 2005 It would be a global number field that you treat as a boolean. When a script sets the global to zero, the If [not global] test returns true and performs the Print Setup. When a script sets the global to one, If [not global] is false, and the Print step is then performed. At the last step but stuck. Created a boolean global field but I don't know how to make the script use it in the "if" condition. Do you place the global field on the layout and enter either 1 or 0? I only want to print a report layout in landscape and the other layouts in portrait. P.S. Great SV site
-Queue- Posted February 23, 2005 Posted February 23, 2005 The script that is calling the print setup/print sub-script would set the global to the necessary value (0 or 1) and then call the sub-script. This may be more complicated than you need, but it should work.
Recommended Posts
This topic is 7214 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 accountSign in
Already have an account? Sign in here.
Sign In Now