June 18, 200718 yr 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?
June 18, 200718 yr 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.
June 18, 200718 yr Author I also need the page number per record, so it starts each record at page 1.
June 18, 200718 yr Author 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 June 18, 200718 yr by Guest
June 18, 200718 yr 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.
June 18, 200718 yr Author I'm trying to print current page only so the per-record page numbers will work
Create an account or sign in to comment