Focal Point
[SOLVED] page numbering

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

July 29, 2009, 06:55 PM
Aneela
[SOLVED] page numbering
I am having problems getting the page numbering correct on my pdf report. I have replicated the problem using the century sales table. It shows there are 71 pages but the 'TABLASTPAGE' shows page 69 and if you go to page 70 -- it shows "Page 70 of 69". The problem seems to be connected to me using summarize and the # of rows in the headings -- both of which I need to do. Is there a way to get this to work?

TABLE FILE CENTURYSALES
PRINT LINEPRICE
QUANTITY
SHIPPINGCOST
COMPUTE PCT_PRICE/D12.2BC% = (SHIPPINGCOST/LINEPRICE) * 100 ; AS 'CALC, OF , SHIPPINGCOST,/LINEPRICE'
BY PRODUCTNUM NOPRINT
BY PRODUCTNAME


IF RECORDLIMIT EQ 2000

" "
"ReportName "
"REPORT_DESC"
"P_HEADING"
"PROP_HEAD"
" "

ON PRODUCTNAME SUMMARIZE AS 'TOTAL: '
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON

ON TABLE SUBFOOT
"Column Description:"
"% of Total Room Revenue: Room revenue divided by total room revenue"
"% of Total Stays: Stays divided by total stays"
"Stays: Number of stays = Count of stays"
"Room Nights: Gross (total number of active) room nights = Count of gross room nights"
"PCR Code/Name: Preferred company rate (PCR) code and name of the company"
"Room Revenue: Occupied room revenue"
" "
" "
" "
" "
" "
"Page 'TABPAGENO' "


FOOTING BOTTOM
" "
"CurrencyTxt"
"SecurityLevelDSC"
"Report Run Date: ReportDateTimeStamp"
"ReportLocation"
"Page 'TABPAGENO' of 'TABLASTPAGE'"

ON TABLE SET STYLE *
TYPE = REPORT, FONT='ARIAL', SIZE=8, PAGESIZE= LEGAL , LEFTMARGIN=0.250000, RIGHTMARGIN=0.0500000,
ORIENTATION = LANDSCAPE,SQUEEZE=ON, BOTTOMMARGIN = 0.00, TOPMARGIN = 0.00,$

TYPE=HEADING, JUSTIFY=CENTER,$
TYPE=SUBHEAD, SIZE=9, STYLE=BOLD, BACKCOLOR=RGB(221 202 94),$
$-----------------------------------------------------------------------------------------------------
$ Column Title Settings
$-----------------------------------------------------------------------------------------------------
TYPE=TITLE, STYLE=UNDERLINE+BOLD, COLOR=BLACK, JUSTIFY=CENTER, BORDER-BOTTOM=LIGHT,$
TYPE=TITLE, BACKCOLOR=RGB(198 219 255),$
$-----------------------------------------------------------------------------------------------------
$ Report Data Settings
$-----------------------------------------------------------------------------------------------------
TYPE= DATA, BACKCOLOR=( 'WHITE' RGB(221 221 221) ), TOPGAP=0.0138, BOTTOMGAP=0.027778,$
TYPE= DATA, FONT= 'ARIAL', SIZE=8,$
TYPE= DATA, BORDER-RIGHT=LIGHT, BORDER-LEFT=LIGHT,$
$-----------------------------------------------------------------------------------------------------
$ Subfoot Settings
$-----------------------------------------------------------------------------------------------------
TYPE=SUBFOOT, SIZE=9, STYLE=BOLD, BACKCOLOR=RGB(198 219 255),$
$-----------------------------------------------------------------------------------------------------
$ Page Footing Settings
$-----------------------------------------------------------------------------------------------------
TYPE=FOOTING, BOTTOMGAP=0.05, TOPGAP=0.009, SIZE=8, STYLE=NORMAL,$
TYPE=FOOTING, LINE=6, FONT='ARIAL', SIZE=8, JUSTIFY=CENTER,$
$-----------------------------------------------------------------------------------------------------
$ Table Footing Settings -- on the last page only
$-----------------------------------------------------------------------------------------------------
TYPE=TABFOOTING, JUSTIFY=LEFT,$
TYPE=TABFOOTING, STYLE=BOLD, COLOR=BLUE, JUSTIFY=LEFT, SIZE=7,$
TYPE=TABFOOTING, LINE=50, STYLE=NORMAL, COLOR=BLACK, JUSTIFY=CENTER, FONT='ARIAL', SIZE=8,$
$-----------------------------------------------------------------------------------------------------
$-----------------------------------------------------------------------------------------------------
$ Total and Subtotal Settings
$-----------------------------------------------------------------------------------------------------
TYPE=SUBTOTAL, BORDER-TOP=HEAVY, BORDER-BOTTOM=HEAVY, BACKCOLOR=RGB(198 219 255), STYLE=BOLD,
TOPGAP=0.055556, BOTTOMGAP=0.055556,$
TYPE=GRANDTOTAL, BORDER-TOP=HEAVY, BORDER-BOTTOM=HEAVY, BACKCOLOR=RGB(198 219 255), STYLE=BOLD,
TOPGAP=0.055556, BOTTOMGAP=0.055556,$
ENDSTYLE
END
-RUN
-EXIT

This message has been edited. Last edited by: Kerry,


WebFocus 7.1.3
Developer studio 7.6.4
Windows
Excel, HTML and PDF
July 29, 2009, 07:49 PM
Darin Lee
If you use SET PRINTPLUS=ON, does that solve your problem? That setting seems to resolve a lot of issues with the correct calculation of pages and page-size.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
July 30, 2009, 07:12 AM
tlbrydie2
I've encountered this issue before...and when it did I simply reversed the label names.

Instead of:
"Page 'TABPAGENO' of 'TABLASTPAGE'"  


I did this:
"Page 'TABLASTPAGE'of 'TABPAGENO' "  


worked for me with no problems...give it a try.




Prod: WebFOCUS 7.6.10 MRE
Oracle/Sybase
Test: DevStudio 7.6.6
WF Server 7.6.6
Report Caster 7.6.6
Web Server - Tomcat
MS Windows XP SP2
Output: HTML, Excel 2000 , PDF, CSV, DOC

July 30, 2009, 10:25 AM
Aneela
Hi Darin and tlbrydie2,
Thanks for the suggestions -- I tried both of them and niether worked for me.Please let me know if anyone else has any suggestions.
Thanks,
Aneela


WebFocus 7.1.3
Developer studio 7.6.4
Windows
Excel, HTML and PDF
July 30, 2009, 11:25 AM
tlbrydie2
So what results are you getting?




Prod: WebFOCUS 7.6.10 MRE
Oracle/Sybase
Test: DevStudio 7.6.6
WF Server 7.6.6
Report Caster 7.6.6
Web Server - Tomcat
MS Windows XP SP2
Output: HTML, Excel 2000 , PDF, CSV, DOC

August 03, 2009, 01:10 PM
Aneela
Hi Timothy,

Thanks for your help. I was able to find the problem -- I opened a ticket with ibi and they thought it was because I was using borders in the stylesheet -- but after a little more digging I found it was using the underline that was causing the problem -- Very unexpected.


TYPE= TITLE, FONT= 'ARIAL', STYLE=BOLD+UNDERLINE, SIZE=8,$

but thanks again for your suggestions


WebFocus 7.1.3
Developer studio 7.6.4
Windows
Excel, HTML and PDF
August 03, 2009, 01:32 PM
Doug
I think this has a lot to do with the use of SUBHEAD / SUBFOOT when they take up more then one line (more on that in another post). What I do to resolve this is to use a variable for the Total Number Of Pages (ex: &TotalPages) instead of "<TABLASTPAGE" and loop through the final report twice, first as ON TABLE HOLD FORMAT PDF and second as "ON TABLE PCHOLD FORMAT PDF" with a "-SET &TOTALPAGES = IF &LOOPCOUNTER EQ 1 THEN 0 ELSE &FOCNEXTPAGE - 1" after the first pass of the loop.