Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] How to Supress All Detail Lines - Print Single Line Grand Total?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] How to Supress All Detail Lines - Print Single Line Grand Total?
 Login/Join
 
Member
posted
The following WF Code prints all Detail Lines. How do I print only the GRAND TOTAL LINE? Or stated another way, How do I surpress printing all detail lines and print only final GRAND TOTAL LINE?

TABLE FILE _HOLDDEL
SUM
'_HOLDDEL.SEG01.CAMPUS'
'_HOLDDEL.SEG01.LOCATION'
'_HOLDDEL.SEG01.INSTRUCTION_MODE'
'FST._HOLDDEL.SEG01.vCOUNTCol' AS 'FST,_HOLDDEL.SEG01.vCOUNTCol'
BY '_HOLDDEL.SEG01.EMPLID'
HEADING
""
FOOTING
""
WHERE _HOLDDEL.SEG01.CAMPUS EQ 'ONLIN';
ON TABLE SET PAGE-NUM OFF
ON TABLE COLUMN-TOTAL AS 'TOTAL'
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,
SIZE=12,
STYLE=BOLD,
$
TYPE=FOOTING,
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

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


WebFocus Developer 7.6.10
 
Posts: 13 | Registered: November 16, 2009Report This Post
Virtuoso
posted Hide Post
I was going to suggest just using a straight sum without a BY field, but assuming your use of the FST prefix operator is a necessity, that won't work. And I'm not quite sure what you're looking for by summing fields such as CAMPUS, LOCATION, and INSTRUCTION_MODE. So there isn't a straight-up way to suppress report lines. You could, however, easily create a hold file to get what you need.

your code with my insert:
TABLE FILE _HOLDDEL
SUM 
'_HOLDDEL.SEG01.CAMPUS'
'_HOLDDEL.SEG01.LOCATION'
'_HOLDDEL.SEG01.INSTRUCTION_MODE'
'FST._HOLDDEL.SEG01.vCOUNTCol' AS 'FST,_HOLDDEL.SEG01.vCOUNTCol'
BY '_HOLDDEL.SEG01.EMPLID'
HEADING
""
FOOTING
""
WHERE _HOLDDEL.SEG01.CAMPUS EQ 'ONLIN';
-****INSERT THESE LINES
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD
END
TABLE FILE HOLD
SUM 
CAMPUS
LOCATION
INSTRUCTION_MODE
vCOUNTCol
-****INSERT THESE LINES
ON TABLE SET PAGE-NUM OFF 
-* omit this ON TABLE COLUMN-TOTAL AS 'TOTAL'
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,
SIZE=12,
STYLE=BOLD,
$
TYPE=FOOTING,
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


Regards,

Darin



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
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Member
posted Hide Post
Darin,

Thanks for taking time to look at my code and review my problem.

Proceeding with your thinking, I take out the 'FST.' function. Then, how do I supress the Details lines? I am not trying to SUM the CAMPUS, LOCATION, or INSTRUCTION_MODE. I'm trying only to SUM the vCOUNTCol. The vCOUNTCol in each record contains '1'.

I want to COUNT ONLY 1 Record BY EMPLID, BY CAMPUS AND INSTRUCTION MODE.

Example

5 DETAIL RECORDS.
5ea DETAIL RECORDS WITH SAME EMPLID, AND CAMPUS EQ 'ONLINE'

RPT SUMMARY LINE

ONLINE
1

=============================

4ea DETAIL RECORDS WITH SAME EMPLID, AND CAMPUS EQ 'ONLINE'
1ea DETAIL RECORD WITH SAME EMPLID, AND CAMPUS EQ 'MAIN'

RPT SUMMARY LINE

ONLINE
0

The FUNCTIONAL Logic is to COUNT STUDENTS AS 'ONLINE' ONLY WHEN THE STUDENT IS TAKING ALL 'ONLINE' COURSES.

Any assistance with getting this SUMMARY TOTAL, would be sincerely appreciated.

With much appreciation.

Mike


WebFocus Developer 7.6.10
 
Posts: 13 | Registered: November 16, 2009Report This Post
Platinum Member
posted Hide Post
Is be you need count emplid who only haf CAMPUS all eq ONLIN? This be, boolean logic in DEFINE also COMPUTE get you ONLINE value. You can be use HOLD to intermediate file if you needing, so can just do 1 line. First part only build sample data be use -
FILEDEF HOLDMAS DISK _HOLDDEL.MAS
-RUN
-WRITE HOLDMAS FILE=_HOLDDEL,SUFFIX=XFOC
-WRITE HOLDMAS SEGNAME=SEG1, SEGTYPE=S3, $
-WRITE HOLDMAS FIELD=EMPLID           , ,A8 ,A8 , $
-WRITE HOLDMAS FIELD=CAMPUS           , ,A10  ,A10   , $
-WRITE HOLDMAS FIELD=LOCATION         , ,A10  ,A10   , $
-WRITE HOLDMAS FIELD=INSTRUCTION_MODE , ,A10  ,A10   , $
-RUN
CREATE FILE _HOLDDEL
MODIFY FILE _HOLDDEL
FREEFORM EMPLID CAMPUS LOCATION INSTRUCTION_MODE
LOG FORMAT MSG OFF
LOG TRANS MSG OFF
LOG INVALID MSG OFF
DATA
100000,ONLIN,SOMEWHERE1,DIR,$
100000,ONLIN,SOMEWHERE2,DIR,$
100000,ONLIN,SOMEWHERE3,DIR,$
100000,ONLIN,SOMEWHERE4,DIR,$
100000,ONLIN,SOMEWHERE5,DIR,$
100001,ONLIN,SOMEWHERE1,DIR,$
100001,ONLIN,SOMEWHERE2,DIR,$
100001,ONLIN,SOMEWHERE3,DIR,$
100001,ONLIN,SOMEWHERE4,DIR,$
100001,MAIN,SOMEWHERE5,DIR,$
100002,ONLIN,SOMEWHERE1,DIR,$
100002,ONLIN,SOMEWHERE2,DIR,$
100002,ONLIN,SOMEWHERE3,DIR,$
100002,ONLIN,SOMEWHERE4,DIR,$
100002,ONLIN,SOMEWHERE5,DIR,$
END
-RUN
DEFINE FILE _HOLDDEL
  ONLIN/I9 = CAMPUS EQ 'ONLIN';
  OTHER/I9 = CAMPUS NE 'ONLIN';
END
TABLE FILE _HOLDDEL
WRITE ONLIN
      OTHER
      COMPUTE ONLINE/I9 = OTHER EQ 0;
   BY EMPLID
ON TABLE SUBTOTAL ONLINE AS 'Total ONLINE only EMPLIDs '
ON TABLE PCHOLD FORMAT HTML
END
-RUN

Kofi


Client Server 8.1.05: Apache; Tomcat;Windows Server 2012
Reporting Server 8.1.05; Oracle; MS SQL; Windows Server 2012
 
Posts: 106 | Registered: April 06, 2009Report This Post
Virtuoso
posted Hide Post
That's the idea, but the problem is he doesn't want to see the detail lines. The issue here is that the counter needs to be calculated by emplid. The only way to do that is with a BY which then gives you a line for each emplid value. The only way around that, as previously mentioned, is to create a hold file and then summarize that. My previous logic should work. Using Kofi's logic with CAR file:
Count all countries where all car models have more than 4 seats (country-car-model similar to emplid-location-instructionmode)

DEFINE FILE CAR
VALID/I2=SEATS GE 4;
INVALID/I2=SEATS LT 4;
END
TABLE FILE CAR
SUM VALID NOPRINT
    INVALID NOPRINT
    COMPUTE VALID1/I9 = INVALID EQ 0; 
   BY COUNTRY 
ON TABLE HOLD
END
TABLE FILE HOLD
SUM VALID1 AS 'TOTAL,VALID,COUNTRIES'
END


Regards,

Darin



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
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Platinum Member
posted Hide Post
quote:
You can be use HOLD to intermediate file if you needing, so can just do 1 line.

This be why I write this line. I am being sorry if my QUEEN'S ENGLISH no good.

Kofi

I edit for Francis!!!

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


Client Server 8.1.05: Apache; Tomcat;Windows Server 2012
Reporting Server 8.1.05; Oracle; MS SQL; Windows Server 2012
 
Posts: 106 | Registered: April 06, 2009Report This Post
Expert
posted Hide Post
That should be "anguish", not "engrish".


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Member
posted Hide Post
Kofi,

Thanks for the RESPONSE. My CODING is no good. So if you don't speak the QUEEN'S ENGLISH, it's not a problem for me. I knew what you were doing in the CODE. That was plenty clear to me.


WebFocus Developer 7.6.10
 
Posts: 13 | Registered: November 16, 2009Report This Post
Platinum Member
posted Hide Post
motto,

I pleased you understand. I do learn in time. Others need to understand problems for non-ENGLISH speakers.

Kofi

Francis,

I surprised you make such comment?

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


Client Server 8.1.05: Apache; Tomcat;Windows Server 2012
Reporting Server 8.1.05; Oracle; MS SQL; Windows Server 2012
 
Posts: 106 | Registered: April 06, 2009Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] How to Supress All Detail Lines - Print Single Line Grand Total?

Copyright © 1996-2020 Information Builders