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

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

Recommended Posts

Posted

I'm making a script that among other things, adds page numbers. When I run the [print] command, it tries to print the whole record instead of the specific page on I'm, when I need to print on a page-by-page basis to get the page numbers to work out. How can I do this? Thanks!

Simplified version of my script that isolates the problem. The problem really lies with teh Print [] part I think, but I included other parts to show why I need to print each page separately. (If there's an easier way to do this, I'm all ears)

Enter Browse Mode []

Go to Record/Request/Page [First]

Loop

Set Variable [$page; value:0]

Loop

Enter Preview Mode []

Go to Layout ["Report" (Main table2)]

Set Variable [$page; Value:$page+1]

Set Field [Main table2::Page Number;$page]

Print []

Go to Record/Request/Page [Next]

End Loop

Enter Browse Mode

Go to Record/Request/Page [Next]

End Loop

How would I get the Print [] function to just print out the current page. Also, am I correct to assume that Next record/request/page makes it change the current page if you're in preview mode?

Posted

Go to layout mode and insert the page number symbol. This is:

##

Now when in preview mode or when printing, it will display the page number for you.

Posted (edited)

Read through that earlier trying to find the problem. Here's the sample you posted:

Run it as a loop using a Self Join relationship

Go to Layout ["PrintLayout"]

Show All Records

Go to Record/Request/Page [First]

Loop

Go to Related Record [show, "FileSelfJoin"]

Enter Preview Mode []

Go to Record/Request/Page [Last]

Set Field [gReportPgs, Status ( CurrentPageNumber )]

Print []

###

Enter Browse Mode

Show All Records

Go to Record/Request/Page [Next, Exit After Last]

End Loop

What does putting ### after print do? Does that tell it to print only the active page? Also, what's the purpose of Show All Records? What does the self-join bit do? I appreciate the help, I'm just still real murky on this.

Is having a loop script the best/only way to print out per-record page numbers? (Also needed to correctly print from an overflow layout if the record is longer than 12 pages) How would I do it otherwise? Is it possible to make the print[] command print only the active page? Thanks!

Edited by Guest
Posted

No the ### was just for spacing. When you print, there is an option for printing current record only at the top of the print dialog box.

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