Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [Solved]HIDE THE COLUMN IF C0LUMN TOTAL EQ 0
Go
New
Search
Notify
Tools
Reply
  
[Solved]HIDE THE COLUMN IF C0LUMN TOTAL EQ 0
 Login/Join
 
Member
posted
Hi,
I have a scenario in which I have cloumns A,B,C,D,E and F. E and F are Compute Fields (E=A-B and F=C-D). some times E would be zero and some time F would be zero. For example if E=10 and F=0 then my output should print A, B, C, D and E only, F should not be printed because it's zero.

Can Please look into this and let me know.

Thanks,
Kims

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


WebFocus769
Windows
Excel,PDF and HTML
 
Posts: 9 | Registered: February 03, 2011Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Edit option S for your computed field will suppress printing the contents of the field when it is zero. It will not prevent the printing of the column itself.
COMPUTE FIELD/I6S
Will not print the zero value, but you'll still have the column (and title).


GamP

- Using AS 8.2.01 on Windows 7 - IE11.
in Focus since 1988
 
Posts: 1960 | Location: Netherlands | Registered: September 25, 2007Reply With QuoteReport This Post
Member
posted Hide Post
Thank You very much.


Actually I am looking like if the data is zero for that column then entire column should be hidden or no print. if there is a data then it should print that column.

Thanks,
kims


WebFocus769
Windows
Excel,PDF and HTML
 
Posts: 9 | Registered: February 03, 2011Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Kims,

If you will do a search on the forum for HIDE COLUMN - you will find several techniques you can try.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Reply With QuoteReport This Post
Platinum Member
posted Hide Post
One technique is use of the setting..
The option HIDENULLACRS which is meant to suppress ACROSS 0 collumns could work if you HOLD the result and report from the HOLD

SUM A B C D COMPUTE F=..,G=...
ACROSS field HIDENULLACR
ON TABLE HOLD
END
Table file hold
now write the report...

This or a variation may work...


Release 7.6.9
Windows
HTML
 
Posts: 226 | Registered: June 08, 2003Reply With QuoteReport This Post
Platinum Member
posted Hide Post
On thinking about a way to do this.. it appears that the only way is via two passes of the data.
The first to sum up the collumns and HOLD the result. The second to drop any zero column in the HOLD file from the final report.
Something like..
Table file 1
sum A B C D E F
ON TABLE HOLD
END
-READ HOLD &A/8 &B/8 &c etc (check syntax)
-IF &A EQ 0 then ' ' else ' FIELDA ;
-IF &B EQ 0 .....
...
Table file 1
SUM &A &B ...
BY ...
...


Release 7.6.9
Windows
HTML
 
Posts: 226 | Registered: June 08, 2003Reply With QuoteReport This Post
<JG>
posted
Such simple logic is flawed,

ROW A
1 0
2 1
3 -1
Tot 0

You have to use a DEFINE ON the input data and set 0 if 0 and 1 if not 0

i.e. A0/I5 = IF A EQ 0 THEN 0 ELSE 1;

table file xxx
SUM A0 etc.
 
Reply With QuoteReport This Post
Member
posted Hide Post
Thank You all for your suggestions. This issue has been solved.


Thanks,
Kims


WebFocus769
Windows
Excel,PDF and HTML
 
Posts: 9 | Registered: February 03, 2011Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Kims

nice it is solved, but it would help more if you show us how you did it.
and change the subject with the tag [solved]




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Reply With QuoteReport This Post
Member
posted Hide Post
I have used supress column format (D20S) for the fiield which I would like to hide if the entire column(all the values in that column eq 0). This will supress the column if the value is zero, for Title I have done formating using background color. This will not hide the cloumn but the column would be blank.

Thanks,
kims


WebFocus769
Windows
Excel,PDF and HTML
 
Posts: 9 | Registered: February 03, 2011Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [Solved]HIDE THE COLUMN IF C0LUMN TOTAL EQ 0

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.