Focal Point
Subtotal only on select coulumns
February 28, 2008, 12:31 PM
jammerSubtotal only on select coulumns
I created a report like the following:
TABLE FILE TEST
SUM
AMT1
AMT2
BY COL1
BY COL2
ON COL1 SUBTOTAL
AMT2 AS ''
ON COL2 SUBTOTAL AS ''
I would expect that:
Subtotal on COL2 would be both AMT1 and AMT2
Subtotal on COL1 would be just AMT1
What I get is only AMT2 subtotaled at both levels (Seems like highest level takes precedence).
(AMT1 - should not be subtotaled at COL1 level sinces it is a mixture of Apples and Oranges)
Am I missing something? How can I get the result I want?
Webfocus 7.6.4
Windows 2003 Server, SQL Server 2005
Excel, HTML , JavaScript ,and PDF.
Reportcaster, BID, Tomcat
February 28, 2008, 12:34 PM
jammerCorretion on what I wrote:
Should be --- Subtotal on COL1 would be just AMT2
Webfocus 7.6.4
Windows 2003 Server, SQL Server 2005
Excel, HTML , JavaScript ,and PDF.
Reportcaster, BID, Tomcat
February 28, 2008, 01:10 PM
smithsJammer,
I suspect that you will need to use subfoot to get what you want. I have created a simple sample using the CAR file that might be helpful for you:
-*?FF CAR
-*-EXIT
TABLE FILE CAR
SUM
WHEELBASE
DEALER_COST
BY COUNTRY
BY CAR
BY SEATS
ON COUNTRY SUBFOOT
"Total: <COUNTRY <+0> <+0><ST.DEALER_COST"
ON CAR SUBFOOT MULTILINES
"Subtotal: <CAR<+0> <ST.WHEELBASE<ST.DEALER_COST"
ON TABLE SUBFOOT
"Grand Total: <+0> <+0> <+0> <ST.DEALER_COST"
ON TABLE SET STYLE *
TYPE=SUBFOOT,
JUSTIFY=RIGHT,
STYLE=BOLD,
HEADALIGN=BODY,$
TYPE=SUBFOOT,
HEADALIGN=BODY,
BY=COUNTRY,
COLOR=BLUE,$
TYPE=SUBFOOT,
HEADALIGN=BODY,
BY=CAR,
COLOR=ORANGE,$
TYPE=TABFOOTING,
JUSTIFY=RIGHT,
STYLE=BOLD,
HEADALIGN=BODY,$
ENDSTYLE
END
Regards,
Sean
------------------------------------------------------------------------
PROD: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
TEST: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
May 14, 2008, 01:54 PM
EWoerleHey I just came across this thread and I'm trying to do the same thing, but in PDF. I noticed that in the stylesheet you utilized "headalign=body" I'm assuming that this tag sets up grids in the subfoot according to the columns that you have in the body of the report. Then the
<+0>
jumps columns so you position into the appropriate columns. When I do this in PDF it doesn't seem to hold the grid. Is there another command that I can use that would create and retain the grid within a pdf report?
Eric Woerle
WF 7.6.7 Reportting Server
ETL 7.6.10
Dev Studio 7.6.7
May 14, 2008, 02:41 PM
smithsEric,
You need to use the POSITION keyword in your stylesheet.
I have changed the code to handle PDF:
TABLE FILE CAR
SUM
WHEELBASE
DEALER_COST
BY COUNTRY
BY CAR
BY SEATS
ON COUNTRY SUBFOOT
"Total: <COUNTRY <+0> <+0><ST.DEALER_COST"
ON CAR SUBFOOT MULTILINES
"Subtotal: <CAR<+0> <ST.WHEELBASE<ST.DEALER_COST"
ON TABLE SUBFOOT
"Grand Total: <+0> <+0> <+0> <ST.DEALER_COST"
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=SUBFOOT,
JUSTIFY=LEFT,
STYLE=BOLD,
HEADALIGN=BODY,$
TYPE=SUBFOOT,
BY=COUNTRY,
COLOR=BLUE,$
TYPE=SUBFOOT,
BY=COUNTRY,
OBJECT=FIELD,
ITEM=2,
POSITION=DEALER_COST,
JUSTIFY=RIGHT,$
TYPE=SUBFOOT,
BY=CAR,
COLOR=ORANGE,$
TYPE=SUBFOOT,
BY=CAR,
OBJECT=FIELD,
ITEM=2,
POSITION=WHEELBASE,
JUSTIFY=RIGHT,$
TYPE=SUBFOOT,
BY=CAR,
OBJECT=FIELD,
ITEM=3,
POSITION=DEALER_COST,
JUSTIFY=RIGHT,$
TYPE=TABFOOTING,
JUSTIFY=LEFT,
STYLE=BOLD,$
TYPE=TABFOOTING,
OBJECT=FIELD,
ITEM=1,
POSITION=DEALER_COST,
JUSTIFY=RIGHT,$
ENDSTYLE
END
Regards,
Sean
------------------------------------------------------------------------
PROD: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
TEST: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
May 14, 2008, 06:13 PM
EWoerleSean,
Thanks for the tip on that POSITION Keyword. Thats exactly what I was looking for.
Eric
Eric Woerle
WF 7.6.7 Reportting Server
ETL 7.6.10
Dev Studio 7.6.7
May 15, 2008, 09:58 AM
mgrackinGetting back to the original issue of this thread, IBI made changes to the WF product to allow finer control of SUBTOTALs, specifically allowing you to do what you are looking to do without SUBFOOTs or so it seems. Grab the manual and read about how to do different SUBTOTALing with seperate SUBTOTAL statements. Using SUBFOOTs will work just fine. I just thought I would give you a heads up to the capabilities of SUBTOTALing.
Thanks!
Mickey
| FOCUS/WebFOCUS 1990 - 2011 |
May 16, 2008, 04:16 PM
jammerMickey - On what version was this enhancement made. I'm on 7.63 - I could not get it to work. (Which manual - "Create Reports with Graphical Tools?)
I got around this be making the color of those subtotals I did not want to show the same as the background - but obviously that was a work around. (Using Subfoot - caused another difficulty)
Thanks!
JohnA
Webfocus 7.6.4
Windows 2003 Server, SQL Server 2005
Excel, HTML , JavaScript ,and PDF.
Reportcaster, BID, Tomcat
May 16, 2008, 04:30 PM
mgrackinI am using WF713 and it is in this release. I was referring to the 'Creating Reports with WebFOCUS Language' manual.
Look at the SET SUMMARYLINES command beginning on page 282 of the WF761 manual.
Thanks!
Mickey
| FOCUS/WebFOCUS 1990 - 2011 |
May 18, 2008, 12:51 PM
jammerMickey - thanks
I normally look at both manuals because I know 'Creating Reports with WebFOCUS Language' has more than 'Creating Reports with Graphical Tools'. I somehow missed SET SUMMARYLINES. I'll give it a try!
I am also curious what havoc this will create when I go to GUI mode in DEV STUDIO. Can this even be done in GUI Mode without entering text mode? I will see!)
Webfocus 7.6.4
Windows 2003 Server, SQL Server 2005
Excel, HTML , JavaScript ,and PDF.
Reportcaster, BID, Tomcat
May 19, 2008, 01:24 AM
Danny-SRLJammer,
SET SUMMARYLINES works quite well. It goes to show that the famous saying is correct once again: "If you have tried everything and it still doesn't work, read the manual!"
No offense! It is what we tell all our consultants...
Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF