Focal Point
[SOLVED] Supress subfoot line if sub total values is zero

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

September 11, 2019, 01:53 PM
Gowtham
[SOLVED] Supress subfoot line if sub total values is zero
Hi All,

I am having scenario like showing all subtotal values in subfoot.
I need is to supress subfoot line whenever subtotal value is zero. Here is sample code.

TABLE FILE TABLE1
COMPUTE TOTALSALE/D22.2= SALE1+ SALE2;NOPRINT
BY REGION
BY COUNTRY
ON REGION SUBFOOT
"Sale for Region ST.TOTALSALE"
ON COUNTRY SUBFOOT
"Sale for country ST.TOTALSALE"

ON TABLE PCHOLD FORMAT PDF
END

This message has been edited. Last edited by: FP Mod Chuck,
September 11, 2019, 05:20 PM
Waz
Check out the WHEN command.

Conditionally Displaying Summary Lines and Text


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

September 12, 2019, 02:03 PM
Gowtham
Thanks Waz... it will work I think..
September 16, 2019, 01:12 PM
Gowtham
Hi Waz,

I had same requirement with more than 12 computation elements which will be shown in subfoot.
In order to the supress subfoot line if the all the 12 values are zero do I need to write WHEN condition for all the field .
Is there any other alternate way to achieve it.
September 16, 2019, 01:26 PM
Doug
You can "write a WHEN condition for all the fields individually"
OR
You can create a COMPUTE which SUMs all fields and use that in your CONDITIONAL / WHEN Statement.
September 16, 2019, 03:18 PM
Waz
As Doug says, create a COMPUTE to build a flag for when to show/hide the subfoot


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

September 18, 2019, 02:48 PM
Gowtham
Thanks waz and doug its working..