September 27, 200025 yr how do I write script to allow me/user to go to a certain layout in a related file, print a certain set of records in full (eg, all records assigned to a certain staff, assuming each staff has a his own set of records). Better still, the script will allow me/user to enter the staff name, and finds those records, then print...etc
September 27, 200025 yr To isolate a set of records in a related file, the fastest and easiest approach is the use the Go to Related Record (show only related records) script step specifying the relationship to those records. For instance, if the primary file is staff and the related file is events, connect the files with the serial number of the staff record. Don't use the staff members name, if you change the name to correct spelling, etc., you will disconnect and orphan all the related records! To recap: use the Go to Related Record script step in a script in the primary file, then execute an external script in the related file to print the records of whatever you have in mind for those records. -bd
September 27, 200025 yr Author i have this set of script, but it will print only 1 record at a time, perhaps I'm missing something?(as you can tell, I'm NEW to scripts) Freeze window Go to related Record [show, (relationship)] perform script[subscript,external "filename"] refresh window
September 28, 200025 yr quote: Originally posted by caseyi: i have this set of script, but it will print only 1 record at a time, perhaps I'm missing something?(as you can tell, I'm NEW to scripts) Freeze window Go to related Record [show, (relationship)] perform script[subscript,external "filename"] refresh window In your script that does the actual printing (in the related file) you have a Print script step. This script step saves certain print settings, including the number of records to print (i.e., current record, records being browsed). You seem to want it to print the records being browsed. What you need to do is go to the related file, choose Print from the File menu, select "Records being browsed" from the lower section of the window. Go ahead an print them and then you can cancel the manual print job. Then go into ScriptMaker and open the script that handles the printing. If you don't already have a line before "Print" that does a "Page Setup" or "Print Setup", add one. Close it by clicking "OK". If you already had the "Page Setup" script step, you will be asked if you want to keep or replace the "Page Setup" settings. Select replace. If you added the "Page Setup" script step, then it doesn't ask, and just saves the settings you have. A number of script steps work like this, including sort and import. The script saves the settings of the sort, page setup, or import that existed when the script was created, and to change it you have to use the technique above. Chuck
Create an account or sign in to comment