Focal Point
How can I Suppress a row using styles

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

July 10, 2008, 09:11 AM
johney
How can I Suppress a row using styles
Hi ,

I have a master file XYZ with following fields

DUMMY
FLOOR
BU
ASSG_SF
COMMON_SF

Oracle View Logic
----------------
CREATE VIEW XYZ AS
SELECT
'1' DUMMY,
FLOOR,
BU,
ASSG_SF,
NULL COMMON_SF
FROM
TABLE A
UNION
SELECT
'2' DUMMY,
FLOOR,
NULL BU,
NULL ASSG_SF,
COMMON_SF
FROM TABLE A;

The sample data will look like as given below.

DUMMY FLOOR BU ASSG_SF COMMON_SF
------------------------------------------------
1 G ABC 100
1 G DEF 200
1 G GHI 300
2 G 50
1 2F ABC 10
1 2F DEF 20
1 2F GHI 30
2 2F 150

For Floor G Common_SF is 50,
For Floor 2F Common_SF is 150,

The reporting requirement here is that user
want assignable_sf to be printed on BU level(every record) but the common_sf should be printed only at the "floor summary level" including summary of assg_sf.

FLOOR BU ASSG_SF COMMON_SF
================================================
G ABC 100 .
G DEF 200 .
G GHI 300 .
------------------------------------------------
Tot Floor G 600 50

2F ABC 10 .
2F DEF 20 .
2F GHI 30 .
------------------------------------------------
Tot Floor 2F 60 150

Common_Sf should be blank for all the records but needs to be printed at floor summary level.

I tried following,

TABLE FILE XYZ
PRINT
FLOOR NOPRINT
DUMMY
BU,
ASSG_SF
COMMON_SF
BY FLOOR
ON FLOOR SUBTOTAL
END

It is giving me the desired result, but I need not show the record which was added to calculate common_sf (with dummy=2). How can I suppress that record from displaying in the detail row by keeping its value to be available for Totals?

Thanks and regards,
Johney Joseph.

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


Version 7.6.11
Webfocus installed in AIX 5.3,
desktop PC: Windows-XP based
Output: Excel, HTML, PDF
July 10, 2008, 09:22 AM
Francis Mariani
Here's one way:

TABLE FILE CAR
SUM
SALES
BY COUNTRY
ON TABLE HOLD AS H001 FORMAT HTMTABLE
ON TABLE SET STYLE *
TYPE=DATA, CLASS=HIDE, WHEN=COUNTRY EQ 'JAPAN', $
ENDSTYLE
END
-RUN

-HTMLFORM BEGIN
<HTML>
<HEAD>
<STYLE TYPE="TEXT/CSS">
.HIDE { DISPLAY: NONE; }
</STYLE>
</HEAD>
<BODY>
!IBI.FIL.H001;
</BODY>
</HTML>


This, of course, works for HTML output only.


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
July 10, 2008, 10:55 AM
johney
Francis,

Thanks for the quick solution. But I need to export the same result to Excel also.....

Thanks and regards,
Johney Joseph.


Version 7.6.11
Webfocus installed in AIX 5.3,
desktop PC: Windows-XP based
Output: Excel, HTML, PDF
July 10, 2008, 12:33 PM
Francis Mariani
As I am in a hurry, I can only a see a method that uses two passes through the data:

TABLE FILE CAR
SUM
SALES
COMPUTE COUNTRY/A10 = 'ZZZTOTAL';
ON TABLE HOLD AS HTOT
END
-RUN

DEFINE FILE HTOT
NCOUNTRY/A10 = 'TOTAL';
END

DEFINE FILE CAR
NCOUNTRY/A10 = COUNTRY;
END

TABLE FILE CAR
SUM
NCOUNTRY
SALES/D10

BY COUNTRY NOPRINT

WHERE COUNTRY NE 'JAPAN';

ON TABLE NOTOTAL

MORE 
FILE HTOT
END
-RUN


The clumsy DEFINEs are to ensure that the word TOTAL is the last row in the final report. This works for any format report.


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