This message has been edited. Last edited by: nsk110483,
May 26, 2010, 11:07 AM
To get that kind of control over the presentation you will need to use SUBFOOT instead of SUBTOTAL; you can then put your text and field elements anywhere you need (including in multiples lines). Keep in mind that you'll most certainly need to use spot markers (<+0> to properly style each element.
Also, the standard functionality of using a BY field is to only print the sort field when the value changes. If you want to display them you can use the setting ON TABLE SET BYDISPLAY ON. You could also just include them in your print statement:
TABLE FILE TABLE_A
COL3 COL4 COL2
BY COL3 NOPRINT
BY COL4 NOPRINT
BY COL2 NOPRINT
ON COL4 SUBTOTAL AS 'SUB-TOTAL YEAR'
ON COL3 SUBTOTAL AS ''
ON TABLE PCHOLD FORMAT HTML
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
May 26, 2010, 11:18 AM
The mock-up code you provided does not seem consistent with the output you're getting (COL2 should be printed to the left of COL1 for example).
Could you work an example with an IBI-provided table of file anyone here can use? The CAR table comes to mind. That way we can be better equipped to help.
May 26, 2010, 01:07 PM
For an HTML or EXL2K report try something like:
TABLE FILE blah
COMPUTE YEAR_MSG/A10 = 'YEAR ' || EDIT(COL4); NOPRINT
ON COL4 SUBFOOT
"<COL3 SUB-TOTAL <ST.COL1"
" <+0> <YEAR_MSG"
ON TABLE SET STYLE *
TYPE=SUBFOOT, BY=COL4, HEADALIGN=BODY, $
TYPE=SUBFOOT, BY=COL4, LINE=1, OBJECT=TEXT, ITEM=1, COLSPAN=2, $
I'm working on air here since you haven't provided a workable code to play with but that should give you something to make some progress.
For PDF, HEADALIGN and COLSPAN are not applicable and therefore you'll need to resort to using POSITION to place each element. Please check the documentation about those and other style sheet keywords in the Creating Report with WebFOCUS Language manual.
(FOC096) WARNING. NO TEXT SUPPLIED BELOW SUBHEAD OR SUBFOOT 0 ERROR AT OR NEAR LINE 204 IN PROCEDURE ADHOCRQ FOCEXEC *
May 27, 2010, 05:46 PM
ON COL4 SUBFOOT "SUB-TOTAL YEAR <+0> Do not put that all on one line.
make it this
ON COL4 SUBFOOT
"SUB-TOTAL YEAR <+0><ST.COL1"
May 28, 2010, 11:08 AM
WARNING. NO TEXT SUPPLIED BELOW SUBHEAD OR SUBFOOT
As the error message clearly says, the text that forms the SUBFOOT or SUBHEAD was not found below the "ON .. SUBFOOT" keyword where it's supposed to go. As Prarie indicated, you put the text right after the SUBFOOT keyword, even though I had provided you with an example as to how to create your SUBFOOT but it seems that the message was not reached as expected.
Anyway, I would still advise you to go over the "Creating Reports with WebFOCUS Language" manual. It will help you get a stronger foundation in WebFOCUS development which will be a must as soon as you get involved in more complex assignments.