All, I am having issues with placing a total at the end of a PDF report. If I don’t add page numbers, the total appear at the end of the report which is what I want. However, if I add page numbers, the total appear on a new page by itself. If I change the report’s format to HTML, then page number appears before the total even when I set the footing to appear at the bottom of the page. Does anyone have any suggestions?
Here is the code:
TABLE FILE CAR
PRINT
CAR.COMP.CAR
CAR.ORIGIN.CNTR
BY LOWEST CAR.ORIGIN.COUNTRY
ON CAR.ORIGIN.COUNTRY SUBTOTAL AS '*TOTAL'
FOOTING BOTTOM
"<TABPAGENO"
ON TABLE SUBFOOT
"Total Number of Cars <ST.CNTR"
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
-*ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = endeflt,
$
TYPE=REPORT,
GRAPHCOLOR='GREEN',
$
TYPE=REPORT,
OBJECT=MENU,
COLOR='WHITE',
HOVER-COLOR=RGB(66 70 73),
BACKCOLOR=RGB(102 102 102),
HOVER-BACKCOLOR=RGB(218 225 232),
BORDER-COLOR='WHITE',
$
TYPE=REPORT,
OBJECT=STATUS-AREA,
COLOR='WHITE',
BACKCOLOR=RGB(102 102 102),
$
TYPE=REPORT,
OBJECT=CURRENT-ROW,
HOVER-BACKCOLOR=RGB(218 225 232),
BACKCOLOR=RGB(200 200 200),
$
TYPE=REPORT,
OBJECT=CALC-AREA,
COLOR='WHITE',
BACKCOLOR=RGB(102 102 102),
$
ENDSTYLE
END
Thanks,
SeyedThis message has been edited. Last edited by: SeyedG,
WebFOCUS 8.0.09 App Studio 8009 Linux Kernel-2.6 DBMS: Oracle 11g all output (Excel, HTML, AHTML, PDF)
March 19, 2015, 11:48 AM
Alan B
This behaviour is correct and described in the documentation. This is because you are using ON TABLE SUBFOOT.
Create a major single value sort and use that for the SUBFOOT:
DEFINE FILE CAR
DUMMY/A1 = ' ';
END
TABLE FILE CAR
PRINT
CAR.COMP.CAR
CAR.ORIGIN.CNTR
BY DUMMY NOPRINT
BY LOWEST CAR.ORIGIN.COUNTRY
ON CAR.ORIGIN.COUNTRY SUBTOTAL AS '*TOTAL'
FOOTING BOTTOM
"<TABPAGENO"
ON DUMMY SUBFOOT
"Total Number of Cars <ST.CNTR"
.
.
.
Alan. WF 7.705/8.007
March 20, 2015, 12:26 PM
SeyedG
Hi Alan, Thank you very much for your input. Your solution resolves issues with my first report. However, I will be creating other reports for our customers that will have to be bursted by name which is a primary sort. I am guessing, that having a dummy primary sort will create problems in RC and bursting will fail. I just read the documentation for ReportCaster, and second by field only applies to Graphs.
Thanks again,
Seyed
WebFOCUS 8.0.09 App Studio 8009 Linux Kernel-2.6 DBMS: Oracle 11g all output (Excel, HTML, AHTML, PDF)
March 20, 2015, 05:04 PM
Mighty Max
You could try calculating the total and append it to the data using MORE or FILEDEF (APPEND.
Originally posted by SeyedG: I will be creating other reports for our customers that will have to be bursted by name which is a primary sort. I am guessing, that having a dummy primary sort will create problems in RC and bursting will fail.
Well, not necessarily. If you are bursting a report by "name" then I assume you want to display your TOTAL corresponding to the "name" being processed, don't you? In that case, no dummy field is needed. Having an ON NAME SUBFOOT should take care of it for you.