I want to have each Condition Graphics report go to a different file. So I close the main report file in order to open another one for the CG report then later open the main report again with /APPEND. The only problem is the page number gets incremented by two each time this maneuver is done.


This page numbering problem is not the fault of CG or the main program; rather it has to do with switching output files. The page number is retained even when the report is turned off. And when a new report is opened the page number is incremented for the new page heading. This normally works fine, allowing you to distribute your report to several files with a continuous page numbering. However when you want to discard some pages (as you are doing with the .PF from CG) you have to take control of the page number variable by means of the /P parameter on the REPORT command. This allows you to set the page number you want a report to begin with.

The technique involves defining your own page number variable, such as,


Then when you open a report you can use it to set the initial page number:

REPORT abc /P:{Page1}

In order to increment Page1 you can make use of the PAGES system variable:

SET Page1 = {Page1} PLUS {PAGES}

You will need to do this also before PAGES gets set to zero by certain other commands such as SUBTITLE (see PAGES in the VARIABLE command Help).

Copyright (C) 2011 Creative Systems, Inc.