Focal Point
<Solved>How to create a compound report with summary and detail together?

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

September 30, 2011, 10:05 AM
EdHou
<Solved>How to create a compound report with summary and detail together?
Hi,

I am trying to create a compound report with user id and total on the first line, then all detail under that. However, I can’t get detail match with summary. For example, use GGSALES table, I get report as following:

Page 1

Product ID Unit Sales Dollar Sales
C141 xxxxxx xxxxxxx (Total)

Product ID Date Unit Sales Dollar Sales
C141 xxxxxxxx xxxxxxxx xxxxxxx (Detail)
C141 xxxxxxxx xxxxxxxx xxxxxxx
C141 xxxxxxxx xxxxxxxx xxxxxxx

Page 2

Product ID Unit Sales Dollar Sales
C142 xxxxxx xxxxxxx (Total)

Product ID Date Unit Sales Dollar Sales
C141 xxxxxxxx xxxxxxxx xxxxxxx (Detail)
C141 xxxxxxxx xxxxxxxx xxxxxxx
C141 xxxxxxxx xxxxxxxx xxxxxxx

Since detail still display C141, I don’t need total on page 2 or at least if total line can display C141 will be good.

In my real report, I need User ID match total and detail. If someone can show me how to do this with GGSALES, then I can figure out how to do my real report.

Next question, in my real report, my total line is more than one line. How to split line without using “subfooting”? If take GGSALES as an example, I can assume something as following:

Page 1

Product ID Category Product Unit Sales Dollar Sales
C141 xxxxxx xxxxxx xxxxxx xxxxxxx (Total)
State City Store ID Budget Units Budget Dollars
Xx xxxxx xxxxx xxxxxxxx xxxxxxxx

Product ID Date Unit Sales Dollar Sales
C141 xxxxxxxx xxxxxxxx xxxxxxx (Detail)
C141 xxxxxxxx xxxxxxxx xxxxxxx
C141 xxxxxxxx xxxxxxxx xxxxxxx

How to create a report as above?


Ed
(WebFocus 7611)

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


WebFOCUS 8.0.09
WebFOCUS 7.7.05
DBMS: Oracle 11g
all output (Excel, HTML, PDF)
September 30, 2011, 12:06 PM
Don Garland
 SET BYDISPLAY = ON
TABLE FILE GGSALES
PRINT 
     'GGSALES.SALES01.UNITS'
     'GGSALES.SALES01.DOLLARS'
BY 'GGSALES.SALES01.PCD' NOPRINT
BY 'GGSALES.SALES01.PRODUCT'
BY 'GGSALES.SALES01.REGION'
BY 'GGSALES.SALES01.ST'
BY 'GGSALES.SALES01.CITY'
BY 'GGSALES.SALES01.STCD'
BY 'GGSALES.SALES01.DATE'
HEADING
"Product ID <PCD Total Units:<TOT.UNITS Total Dollars: <TOT.DOLLARS"
FOOTING
""
ON TABLE SET PAGE-NUM OFF 
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=9,
$
TYPE=TITLE,
     STYLE=BOLD,
$
TYPE=TABHEADING,
     SIZE=12,
     STYLE=BOLD,
$
TYPE=TABFOOTING,
     SIZE=12,
     STYLE=BOLD,
$
TYPE=HEADING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=1,
     SIZE=12,
     STYLE=BOLD,
$
TYPE=HEADING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=2,
     SIZE=12,
     STYLE=BOLD,
$
TYPE=HEADING,
     LINE=1,
     OBJECT=TEXT,
     ITEM=3,
     SIZE=12,
     STYLE=BOLD,
$
TYPE=HEADING,
     LINE=1,
     OBJECT=FIELD,
     ITEM=1,
     SIZE=12,
     STYLE=BOLD,
$
TYPE=HEADING,
     LINE=1,
     OBJECT=FIELD,
     ITEM=2,
     SIZE=12,
     STYLE=BOLD,
$
TYPE=HEADING,
     LINE=1,
     OBJECT=FIELD,
     ITEM=3,
     SIZE=12,
     STYLE=BOLD,
$
TYPE=SUBHEAD,
     SIZE=10,
     STYLE=BOLD,
$
TYPE=SUBFOOT,
     SIZE=10,
     STYLE=BOLD,
$
TYPE=SUBTOTAL,
     BACKCOLOR=RGB(210 210 210),
$
TYPE=ACROSSVALUE,
     SIZE=9,
$
TYPE=ACROSSTITLE,
     STYLE=BOLD,
$
TYPE=GRANDTOTAL,
     BACKCOLOR=RGB(210 210 210),
     STYLE=BOLD,
$
ENDSTYLE
END
 

September 30, 2011, 12:14 PM
njsden
As far as I can see, both reports should be sorted BY the same field and should also be set as "coordinated" in compound composer, that way you would always get C141 summary along with C141 details in one page, C142 summary with C142 details in their own page and so on.

About your other question, I don't think you can split a SUBTOTAL/TOTAL in more than one line .. at least not voluntarily. Those "special" total lines need to be achieved with SUBFOOT which obviously requires a bit more effort in styling (and does not support inner borders).



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.
September 30, 2011, 03:26 PM
EdHou
My real report is more complicated. Thank you for some hints.


WebFOCUS 8.0.09
WebFOCUS 7.7.05
DBMS: Oracle 11g
all output (Excel, HTML, PDF)