Hi George- This may be a brute force approach but in the past, I have examined each column for a non-zero, non-null value and set a flag via a DEFINE, held the output, and printed from the hold file where I selected each column for printing based on the value of the flag. Sorry if I am inarticulate but the hour is late. HTH.
jimster06 DevStu WF 7.6.11 W7 HTML, PDF, EXL2K
September 15, 2013, 05:56 AM
Danny-SRL
George,
Is this what you are looking for?
-SET &ECHO=ALL;
DEFINE FILE CAR
NSALES/I6 MISSING ON=IF SALES EQ 0 THEN MISSING ELSE SALES;
END
TABLE FILE CAR
SUM NSALES ACROSS MPG
BY CAR
ON TABLE SET HIDENULLACRS ON
END
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
September 16, 2013, 11:32 AM
George Patton
Danny, That's pretty much what I have - with a couple of wrinkles...
DEFINE FILE XYZ
UNITS/D7C MISSING ON = IF SOLDBY EQ 'UN' THEN PQTY ELSE MISSING;
END
-SET &PRICESTRING=IF &SHOWPRICE EQ 1 THEN 'KG AS ''Kilos'' UNITS AS ''Units'' FOBT AS ''FOB,TOTAL'''
- ELSE 'KG AS ''Kilos'' UNITS AS ''Units''';
SET NODATA=''
SET HIDENULLACRS=ON
TABLE FILE XYZ
SUM
&PRICESTRING
ACROSS YEAR AS ''
END
Hmmm.... do I need a BY statement I wonder ...
Yes I do ! (just looked it up): "Hides columns with missing data in ACROSS groups within a BY-generated page break."This message has been edited. Last edited by: George Patton,
The UNITS column still shows up - with the NODATA dot as expected. But the HIDENULLACRS just isn't working...
DEFINE FILE XYZ
UNITS/D7C MISSING ON = IF SOLDBY EQ 'UN' THEN PQTY ELSE MISSING;
END
TABLE FILE XYZ
SUM
PQTY
UNITS
BY PDESC
ACROSS BL_YEAR
ON TABLE SET HIDENULLACRS ON
WHERE PSCODE EQ '&SUPPLIER' AND BL_YEAR GE 2010;
ON TABLE PCHOLD FORMAT PDF
END
It looks like HIDENULLACRS only works if there is a single ACROSS field ...This message has been edited. Last edited by: George Patton,
-SET &ECHO=ALL;
DEFINE FILE CAR
NSALES/I6 MISSING ON=IF SALES EQ 0 THEN MISSING ELSE SALES;
END
TABLE FILE CAR
SUM NSALES ACROSS MPG ACROSS SEATS
BY CAR
ON TABLE SET HIDENULLACRS ON
END
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
September 19, 2013, 09:56 AM
George Patton
Danny,
You have two ACROSS fields and a single object field.
My situation is this, which doesn't work. The NSALES column still shows up even though all values are null.
-SET &ECHO=ALL;
DEFINE FILE CAR
SALES=0;
NSALES/I6 MISSING ON=IF SALES EQ 0 THEN MISSING ELSE SALES;
END
TABLE FILE CAR
SUM NSALES MPG ACROSS SEATS
BY CAR
ON TABLE SET HIDENULLACRS ON
END
Did you resolve your issue ? I am having same problem and i cant have it working
thanks!!! Pats.
WebFOCUS 7.6 Windows, All Outputs
May 08, 2014, 11:15 AM
George Patton
Oh boy, this goes back ...
I worked around this in an entirely different way. Your query revived my interest - for a while - but again I've come up with a dead end.
The example in the Dev Studio online help seems to work, but it has me baffled. You definitely need a style section and it also seems to be optimal if you use PAGE-BREAK.
Maybe someone else can come up with something more useful ....