Focal Point
[CLOSED] Manually setting the first page number in compound documents

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3017026276

September 11, 2014, 10:29 AM
srizzo123
[CLOSED] Manually setting the first page number in compound documents
Hi everyone,

I am trying to create a PDF report for a client composed of 8 different compound documents, each populating a section of the final report. I am merging the PDF outputs into the final report using an external tool (PDF Merge Tool). What I would like to do is to number the pages according to their position in the final document. I can do a preliminary run of the reports to find out how many pages will be in each section (does not need to be dynamic), so all I need is to set the starting page number for each section. Unfortunately, I haven't been able to figure out how to do that (and haven't found anything searching on the forum), and was wondering whether anyone else has run into this problem.

Page numbers were added into the page master for each individual compound document using

 <ibi-page-number/> 


My first thought was to hard-code page numbers in the appropriate number of overflow pages, but two of the compound documents are coordinated on (different) sort fields with multiple page layouts in each, making things more complicated.

Thanks in advance for your help!

Best,

Stephen

This message has been edited. Last edited by: <Kathryn Henning>,


WEBFOCUS 8.0.0.5
Windows 7
HTML, PDF, Excel output
September 11, 2014, 10:48 AM
Dave
srizzo123

From the developerstudio help:

FOCFIRSTPAGE
The FOCFIRSTPAGE parameter assigns a page number to the first page of output.

The syntax is:

SET FOCFIRSTPAGE = {n|1|&FOCNEXTPAGE}
where:

n
Is the number to be assigned to the first page of output. Valid values are integers with one to six characters. 1 is the default value.

&FOCNEXTPAGE
Is a variable whose value is determined by the last page number used by the last report. Its value is one more than the last page number used in the last report.


_____________________
WF: 8.0.0.9 > going 8.2.0.5
September 11, 2014, 11:42 AM
j.gross
quote:
determined by the last page number used by the last report

But note that (at least in some versions) &FOCNEXTPAGE is initially zero.
September 11, 2014, 11:48 AM
srizzo123
Thanks for the feedback. Unfortunately as far as I can tell, FOCFIRSTPAGE does not work for compound documents. For example, try running the following:

 
*-HOLD_SOURCE
-* File test
SET FOCFIRSTPAGE = 2
SET HTMLARCHIVE=ON
COMPOUND LAYOUT PCHOLD FORMAT PDF
UNITS=IN, $
SECTION=section1, LAYOUT=ON, METADATA='prop_with_names^Margins_Left=0.5^Margins_Top=0.5^Margins_Right=0.5^Margins_Bottom=0.5^thumbnailscale=4', MERGE=OFF, ORIENTATION=PORTRAIT, PAGESIZE=Letter, SHOW_GLOBALFILTER=OFF, $
PAGELAYOUT=ALL, NAME='Page Master', $
OBJECT=STRING, NAME='text2', TEXT='<font face="TREBUCHET MS" size=10><ibi-page-number/></font>', POSITION=(1.000 1.000), MARKUP=ON, WRAP=ON, DIMENSION=(1.000 0.200),  METADATA='WORD-WRAP: break-word; FONT-SIZE: 10pt; HEIGHT: 0.2in; FONT-FAMILY: Trebuchet MS; WIDTH: 1in; POSITION: absolute; LEFT: 1in; Z-INDEX: 2; TOP: 1in', $
COMPONENT='DfltCmpt1', POSITION=(0 0), DIMENSION=(0 0),  $
PAGELAYOUT=1, NAME='Page layout 1', text='Page layout 1', TOC-LEVEL=1, BOTTOMMARGIN=0.5, TOPMARGIN=0.5, METADATA='BOTTOMMARGIN=0.5,TOPMARGIN=0.5,LEFTMARGIN=0,RIGHTMARGIN=0,', $
OBJECT=STRING, NAME='text1', TEXT='<font face="TREBUCHET MS" size=10>Enter text</font>', POSITION=(1.667 -9.417), MARKUP=ON, WRAP=ON, DIMENSION=(0.750 0.167),  METADATA='WORD-WRAP: break-word; FONT-SIZE: 10pt; HEIGHT: 0.167in; FONT-FAMILY: Trebuchet MS; WIDTH: 0.75in; POSITION: absolute; LEFT: 1.667in; Z-INDEX: 1; TOP: -9.417in', $
COMPONENT='DfltCmpt2', POSITION=(0 0), DIMENSION=(0 0),  $
PAGELAYOUT=2, NAME='Page layout 3', text='Page layout 3', TOC-LEVEL=1, BOTTOMMARGIN=0.5, TOPMARGIN=0.5, METADATA='BOTTOMMARGIN=0.5,TOPMARGIN=0.5,LEFTMARGIN=0,RIGHTMARGIN=0,', $
COMPONENT='DfltCmpt3', POSITION=(0 0), DIMENSION=(0 0),  $
END
SET COMPONENT='DfltCmpt1'
TABLE FILE SYSCOLUM
" "
SUM TBNAME NOPRINT
IF READLIMIT EQ 1
ON TABLE SET PREVIEW ON
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
END
SET COMPONENT='DfltCmpt2'
TABLE FILE SYSCOLUM
" "
SUM TBNAME NOPRINT
IF READLIMIT EQ 1
ON TABLE SET PREVIEW ON
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
END
SET COMPONENT='DfltCmpt3'
TABLE FILE SYSCOLUM
" "
SUM TBNAME NOPRINT
IF READLIMIT EQ 1
ON TABLE SET PREVIEW ON
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
object=line, position=(-1 -1), endpoint=(-2 -2), $
END
COMPOUND END




WEBFOCUS 8.0.0.5
Windows 7
HTML, PDF, Excel output