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

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

Recommended Posts

Posted (edited)

Can someone please tell me why this script (see below) doesn't work?

What it is supposed to do is print the first record in a set, change layouts, go to the next record, then print the remaining records in the set from the new layout, and exit after last record in found set.

To me, this script seems like it should work, but it does not : . It changes layouts as it is supposed to, but it does not seem to perform the loop as it just keeps continually printing the "first" record and never exits the loop. (Thank goodness for Acrobat!)

Go to Layout ["sales Order Page 1 of X" (Sales Order)]

Print Setup [Restore;No Dialog]

Print [Restore;No Dialog]

Go to Layout [sales Order Page X of X] (Sales Order)

Loop

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

Print Setup [Restore; No Dialog]

Print [Restore; No Dialog]

End Loop

Loop

Any Help would be appreciated. This is the last piece in a long puzzle.

Steve

Edited by Guest
Posted

Is the setting for the print script step set for "Current" record or current found set?

Try and turning on the dialog box for the print step inside the loop and watch and see what it is defaulting to.

Posted (edited)

Is the setting for the print script step set for "Current" record or current found set?

Try and turning on the dialog box for the print step inside the loop and watch and see what it is defaulting to.

That was mosst of it! It prints right, but does not exit after last, it keeps looping through. Almost there!I didn't think I needed to turn on "Records Being Browsed" because I thought it was "Stepping through" the "Current Records."

Thanks for this much of it!

Steve

Edited by Guest
Posted

You could set a variable at the beginning of the script to give you a record count then setup an exit loop condition if the current record ≥ to your variable.

Posted

You could set a variable at the beginning of the script to give you a record count then setup an exit loop condition if the current record ≥ to your variable.

I understand what you are saying, but isn't the step "exit after last" supposed to handle that?

Steve

Posted

Since your Print dialog can either print an individual record or the entire found set (regardless of whether your layout is Form or List), why are you looping at all?

If you don't want that first record to print in your second group set, you might simply omit it after its print, then switch to your second layout and print the remaining set. If you are using a calculation to display the total number of pages, you could adjust it by just adding 1.

I believe that, looping through your record set and printing each one individually would be slower than letting your Print dialog print them all in one whack. But we need to know what you're doing here. :wink2:

LaRetta

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