As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at firstname.lastname@example.org and provide your corporate email address, company, and name.
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
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,$
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.
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
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
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.
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.
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005