Focal Point
[CASE-OPENED] PDF - Display Subhead portions at the beginning of each page

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

September 10, 2015, 07:03 AM
SriAravind
[CASE-OPENED] PDF - Display Subhead portions at the beginning of each page
I need to display all the subhead portions at the beginning of each page in PDF format report.Below is sample code:
  
DEFINE FILE CAR
  ACCT/A9='Account #';
  ACC_HDR/A5='Acc #';
  ACCT_NM/A12='Account Name';
  AC_HDR/A4='Acc2';
  SHRS1/A20='Shares1';
  SHRS2/A20='Shares2';
  SHRS3/A20='Shares3';
  SHRS4/A20='Shares4';
  HOME/A10='Home Phone';
  WORK/A10='Work Phone';
  FFRM1_TXT/A4000 = 'Terms: 08/14/15 14:08:08 DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAIL. ';
  FFRM2_TXT/A4000 = 'Terms: 08/14/15 14:08:08 DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAIL. ';
  FFRM3_TXT/A4000 = 'Terms: 08/14/15 14:08:08 DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAILY DAIL. ';
END
TABLE FILE CAR
PRINT
	CAR			AS ''
	CAR			AS ''
	CAR			AS ''
	CAR			AS ''
	RETAIL_COST	AS ''
	RETAIL_COST	AS ''
	RETAIL_COST	AS ''
	RETAIL_COST	AS ''
	CAR			AS ''
	CAR	AS ''
AND COMPUTE ROWCNT/I9 = LAST ROWCNT + 1; NOPRINT
BY  COUNTRY NOPRINT
BY TOTAL ROWCNT NOPRINT
ON ROWCNT SUBHEAD 
"Description<+0>Description<+0> <+0> <+0> <+0> <+0>Description<+0>Description<+0>Description"
"<COUNTRY<COUNTRY <+0> <+0> <+0> <COUNTRY<COUNTRY<COUNTRY"
"<FFRM1_TXT"
"<FFRM2_TXT"
"<FFRM3_TXT"
"<ACCT<ACC_HDR<ACCT_NM<AC_HDR<SHRS1<SHRS2<SHRS3<SHRS4<HOME<WORK"
WHEN COUNTRY NE LAST COUNTRY OR TABPAGENO NE LAST TABPAGENO;

ON TABLE SUBHEAD
"Sample Report<+0> <+0> <+0>As of Date: 08/27/15 <+0> <+0>Run Date: 08/27/15"

ON COUNTRY SUBFOOT
""
ON TABLE PCHOLD AS OUTPUT FORMAT PDF
ON TABLE SET STYLE *

 UNITS=IN,LEFTMARGIN=0.5,RIGHTMARGIN=0.5,TOPMARGIN=0.5,BOTTOMMARGIN=0.5,SQUEEZE=ON,PAGESIZE=LEGAL,ORIENTATION=LANDSCAPE,$
TYPE=REPORT,GRID=OFF,FONT='AVENIR35',SIZE=8,COLOR='BLACK',BACKCOLOR='NONE',STYLE=NORMAL,
     LEFTGAP=0.034,  RIGHTGAP=0.034,  BOTTOMGAP=0.034,  TOPGAP=0.034,
     BORDER=LIGHT,BORDER-STYLE=SOLID,BORDER-COLOR=RGB(204 204 204),	
$

TYPE=REPORT, WRAP=1.234000,$
TYPE=TABHEADING, STYLE=BOLD,
JUSTIFY=LEFT, BORDER=OFF,$
TYPE=TABHEADING,     LINE=1,          ITEM=1,     SIZE=10,     WRAP=6,$
TYPE=TABHEADING,     LINE=1,          ITEM=4,     SIZE=10,     $
TYPE=TABHEADING,     LINE=1,          ITEM=6,     SIZE=10,     $

TYPE=SUBHEAD,BY =2,LINE = 1,STYLE = BOLD,COLSPAN=7,BACKCOLOR=RGB(236 241 247),
BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT, BORDER-TOP=LIGHT, BORDER-BOTTOM=LIGHT, $

TYPE=SUBHEAD,     BY=2,$
TYPE=SUBHEAD,     BY=2,     LINE=1,     OBJECT=TEXT,     ITEM=1,     COLSPAN=1,     STYLE=BOLD,     JUSTIFY=LEFT,WRAP=1.500000,BORDER-TOP=LIGHT,$
TYPE=SUBHEAD,     BY=2,     LINE=1,     OBJECT=TEXT,     ITEM=2,     COLSPAN=1,     STYLE=BOLD,     JUSTIFY=LEFT,WRAP=1.500000,$
TYPE=SUBHEAD,     BY=2,     LINE=1,     OBJECT=TEXT,     ITEM=3,     COLSPAN=1,     STYLE=BOLD,     JUSTIFY=LEFT,WRAP=1.500000,$
TYPE=SUBHEAD,     BY=2,     LINE=1,     OBJECT=TEXT,     ITEM=4,     COLSPAN=1,     STYLE=BOLD,     JUSTIFY=LEFT,WRAP=1.500000,$
TYPE=SUBHEAD,     BY=2,     LINE=1,     OBJECT=TEXT,     ITEM=5,     COLSPAN=1,     STYLE=BOLD,     JUSTIFY=LEFT,WRAP=1.500000,$
TYPE=SUBHEAD,     BY=2,     LINE=1,     OBJECT=TEXT,     ITEM=6,     COLSPAN=1,     STYLE=BOLD,     JUSTIFY=LEFT,WRAP=1.500000,$
TYPE=SUBHEAD,     BY=2,     LINE=1,     OBJECT=TEXT,     ITEM=7,     COLSPAN=1,     STYLE=BOLD,     JUSTIFY=LEFT,WRAP=1.500000,$
TYPE=SUBHEAD,     BY=2,     LINE=1,     OBJECT=TEXT,     ITEM=8,     COLSPAN=2,     STYLE=BOLD,     JUSTIFY=LEFT,WRAP=1.500000,$
TYPE=SUBHEAD,     BY=2,     LINE=1,     OBJECT=TEXT,     ITEM=9,     COLSPAN=2,     STYLE=BOLD,     JUSTIFY=LEFT,WRAP=1.500000,$

TYPE=SUBHEAD,     BY=2,     LINE=2,     OBJECT=TEXT,     ITEM=1,     COLSPAN=1,     STYLE=NORMAL,    JUSTIFY=LEFT,WRAP=1.500000,$
TYPE=SUBHEAD,     BY=2,     LINE=2,     OBJECT=TEXT,     ITEM=2,     COLSPAN=1,     STYLE=NORMAL,    JUSTIFY=LEFT,WRAP=1.500000,$
TYPE=SUBHEAD,     BY=2,     LINE=2,     OBJECT=TEXT,     ITEM=3,     COLSPAN=1,     STYLE=NORMAL,    JUSTIFY=LEFT,WRAP=1.500000,$
TYPE=SUBHEAD,     BY=2,     LINE=2,     OBJECT=TEXT,     ITEM=4,     COLSPAN=1,     STYLE=NORMAL,    JUSTIFY=LEFT,WRAP=1.500000,$
TYPE=SUBHEAD,     BY=2,     LINE=2,     OBJECT=TEXT,     ITEM=5,     COLSPAN=1,     STYLE=NORMAL,    JUSTIFY=LEFT,WRAP=1.500000,$
TYPE=SUBHEAD,     BY=2,     LINE=2,     OBJECT=FIELD,    ITEM=1,     COLSPAN=1,     STYLE=NORMAL,    JUSTIFY=LEFT,WRAP=1.500000,$
TYPE=SUBHEAD,     BY=2,     LINE=2,     OBJECT=FIELD,    ITEM=2,     COLSPAN=1,     STYLE=NORMAL,    JUSTIFY=LEFT,WRAP=1.500000,$
TYPE=SUBHEAD,     BY=2,     LINE=2,     OBJECT=FIELD,    ITEM=3,     COLSPAN=1,     STYLE=NORMAL,    JUSTIFY=LEFT,WRAP=1.500000,$
TYPE=SUBHEAD,     BY=2,     LINE=2,     OBJECT=FIELD,    ITEM=4,     COLSPAN=2,     STYLE=NORMAL,    JUSTIFY=LEFT,WRAP=1.500000,$
TYPE=SUBHEAD,     BY=2,     LINE=2,     OBJECT=FIELD,    ITEM=5,     COLSPAN=2,     STYLE=NORMAL,    JUSTIFY=LEFT,WRAP=1.500000,$

TYPE=SUBHEAD,     BY=2,     LINE=3,     COLSPAN=10,   STYLE=NORMAL,    JUSTIFY=LEFT,   WRAP=13.00,$

TYPE=SUBHEAD,BY =2,LINE = 6,STYLE = BOLD,COLSPAN=7,BACKCOLOR=RGB(236 241 247),
BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT, BORDER-TOP=LIGHT, BORDER-BOTTOM=LIGHT,
$

TYPE=SUBHEAD,     BY=2,     LINE=4,     COLSPAN=10,   STYLE=NORMAL,    JUSTIFY=LEFT,   WRAP=13.00,$

TYPE=SUBHEAD,     BY=2,     LINE=5,     COLSPAN=10,   STYLE=NORMAL,    JUSTIFY=LEFT,   WRAP=13.00,$

TYPE=SUBHEAD,     BY=2,     LINE=6,     	 ITEM=1,     COLSPAN=10,     STYLE=BOLD,     JUSTIFY=LEFT,WRAP=1.334000,$
TYPE=SUBHEAD,     BY=2,     LINE=6,          ITEM=2,     COLSPAN=10,     STYLE=BOLD,     JUSTIFY=LEFT,WRAP=1.314000,$
TYPE=SUBHEAD,     BY=2,     LINE=6,          ITEM=3,     COLSPAN=10,     STYLE=BOLD,     JUSTIFY=LEFT,WRAP=1.314000,$
TYPE=SUBHEAD,     BY=2,     LINE=6,          ITEM=4,     COLSPAN=10,     STYLE=BOLD,     JUSTIFY=LEFT,WRAP=1.334000,$
TYPE=SUBHEAD,     BY=2,     LINE=6,          ITEM=5,     COLSPAN=10,     STYLE=BOLD,     JUSTIFY=LEFT,WRAP=1.294000,$
TYPE=SUBHEAD,     BY=2,     LINE=6,          ITEM=6,     COLSPAN=10,     STYLE=BOLD,     JUSTIFY=LEFT,WRAP=1.330000,$
TYPE=SUBHEAD,     BY=2,     LINE=6,          ITEM=7,     COLSPAN=10,     STYLE=BOLD,     JUSTIFY=LEFT,WRAP=1.300000,$
TYPE=SUBHEAD,     BY=2,     LINE=6,          ITEM=8,     COLSPAN=10,     STYLE=BOLD,     JUSTIFY=LEFT,WRAP=1.234000,$
TYPE=SUBHEAD,     BY=2,     LINE=6,          ITEM=9,     COLSPAN=10,     STYLE=BOLD,     JUSTIFY=LEFT,WRAP=1.234000,$
TYPE=SUBHEAD,     BY=2,     LINE=6,          ITEM=10,    COLSPAN=10,     STYLE=BOLD,     JUSTIFY=LEFT,WRAP=1.234000,$

TYPE=DATA, COLUMN=P5, BORDER=LIGHT,JUSTIFY=CENTER,$
TYPE=DATA, COLUMN=P6, BORDER=LIGHT,JUSTIFY=CENTER,$
TYPE=DATA, COLUMN=P7, BORDER=LIGHT,JUSTIFY=CENTER,$
TYPE=DATA, COLUMN=P8, BORDER=LIGHT,JUSTIFY=CENTER,$
TYPE=SUBFOOT,BORDER=OFF,$
ENDSTYLE
END


The above code is not displaying the subhead portions at the beginning(first line) of each page. Instead, it's showing from the second line. When try to include the page number in report display data columns, i noticed that the first line of subsequent pages are displayed with their prior page number.(i.e. first line of second page of the report is showing the page number as 1 instead of 2.)

Any thoughts on how to achieve the subhead portions at the start of each subsequent pages?

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


WebFocus Version 7.7.05
Windows, HTML/PDF/EXL2K/AHTML
September 10, 2015, 09:27 AM
Tony A
quote:
The above code is not displaying the subhead portions at the beginning(first line) of each page.

For that use ON TABLE SET PAGE TOP.

quote:
subhead portions at the start of each subsequent pages?

That would be a heading not a sub-heading or ON [sort field] PAGE-BREAK.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
September 10, 2015, 11:16 AM
SriAravind
Tony, ON TABLE SET PAGE TOP doesn't works as expected. In this case, Subhead portions not only repeats before first line but also comes after first line in second page. Also i'm not expecting to do page-break with heading.

Is there any other way to achieve without page-break.


WebFocus Version 7.7.05
Windows, HTML/PDF/EXL2K/AHTML
September 11, 2015, 03:55 AM
SriAravind
I think there is some problem with the below code:
 
WHEN COUNTRY NE LAST COUNTRY OR TABPAGENO NE LAST TABPAGENO; 


Problem occurs when there is some overflow of records from one page to another.

Any help would be greatly appreciated.


WebFocus Version 7.7.05
Windows, HTML/PDF/EXL2K/AHTML