Focal Point
[SOLVED] Issues with placement of Report's Total

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

March 19, 2015, 11:05 AM
SeyedG
[SOLVED] Issues with placement of Report's Total
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,

Seyed

This 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.


WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
March 20, 2015, 05:37 PM
njsden
quote:
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.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.