Jump to content

print certain set of records in relational DB


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

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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