Jump to content

Printing Script Problems


Wing
 Share

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

Recommended Posts

Hi, I'm having a problem printing using a script that I wrote to automate a very tedious task.

I have records that need to be printed from different layouts. They also need to be printed in a particuliar order. So, record "1" needs layout "A", record "2" needs layout "B", and record "3" needs layout "C". (There are many many many records but I'm only dealing with three until I get the script worked out.

The script is as follows:

------------------------------

Go to Record/Request/Page [First]

Print Setup []

Loop

Perform Script [sub-scripts, "go to worksheet"]

Print [No dialog]

Go to Record/Request/Page [Exit after last, Next]

End Loop

-------------------

The sub-script above is a scipt I've used throughout the file to take you to the appropriate layout. So far it has worked fine.

What happens is three pages print. Record "1" is on layout "A". This is correct. Record "2" and "3" print on layout "A" as well. They should be on layouts "B" and "C".

It just occured to me that the scrip is not looping, and the print dialog is just printing all three records at once?

Any suggestions would be greatly appreciated!

-wing

Link to comment
Share on other sites

Thanks the script is:

-----------------------

If ["Component Type = "Zone""]

Go to Layout ["Zone Worksheet"]

End If

If ["Component Type = "Area""]

Go to Layout ["Area Worksheet"]

End If

---------------------------

The script continues in exactly the same function. This script is currently attached to buttons that let you navigate through the records. It seems to work fine, but maybe it's confusing this new script.

-wing

Link to comment
Share on other sites

I am guessing you need to set your Print Setup script step to restore so just the current record is printed. Manually choose Print from the File menu. When you see the Print dialog, set it to print the "current record" rather than "records being browsed". When you are done, you actually have to click the Print button to print the document. Once you have printed, enter the first script containing the Print Setup step. Edit the script but then just click the Okay button. You will see a dialog called "Stored Settings" or Keep/Replace. Choose to replace the setting for printing. This will make sure you are always printing the current record rather than the records being browsed.

Link to comment
Share on other sites

This topic is 5651 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
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.