Focal Point
[CLOSED] Help with SET NODATA

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

July 19, 2012, 10:39 AM
Developer Phila
[CLOSED] Help with SET NODATA
I am working on a report that has several master file integer fields and several defined integer fields. The requirement is to show the master file fields as zero when there is no value and show defined fields as blanks when there is no value. I am using the SET NODATA = 0 or SET NODATA = ' '. The SET NODATA works for the master file fields but it doesn't effect
the defined fields. The defined fields always show 0 when there is no value. I have set the values for the defined fields to 0 and no value but that doesn't seem to do anything when there is no value it always shows zero. Is there any way for me to show 0 for master fields when there is no value and show blanks for defined fields when there is no value?

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


WebFOCUS 7.6
Windows, All Outputs
July 19, 2012, 11:09 AM
rfbowley
Issue 1:

SET NODATA refers to whether the field is missing (is null in the database), not to it's value. Hence, by definition, a DEFINE field can never be affected by NODATA since it can never be missing (null).

Issue 2:

Integer fields can never show a 'blank' since a 'blank' is an alpha character.

That being said, there is a way to "hide" the zero in the defined field using the stylesheet, and that is to make the COLOR attribute the same as the BACKCOLOR whenever the value equals zero:

 
TYPE=REPORT,
   COLUMN=colname,
   COLOR=WHITE,
   BACKCOLOR=WHITE,
WHEN=colname EQ 0,
$




Robert F. Bowley Jr.
Owner
TaRa Solutions, LLC

In WebFOCUS since 2001
July 19, 2012, 11:48 AM
Dan Satchell
If you want numeric fields to display as blank when zero, use the S format option when defining the field.

DEFINE FILE xxx
 FIELD1/I5S = .....;
END



WebFOCUS 7.7.05
July 19, 2012, 11:55 AM
Tony A
NODATA affects data that is null or missing, so your define should reflect this if you want to effect NODATA setting into report output -

SET NODATA = 'N/A'
DEFINE FILE CAR
FIELD1/I9 MISSING ON WITH RCOST = IF COUNTRY NE 'ENGLAND' THEN MISSING ELSE RCOST;
-* etc.
END
TABLE FILE CAR
SUM FIELD1
BY COUNTRY
END

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
July 19, 2012, 11:55 AM
rfbowley
I must be getting old to have forgotten that simple solutions. Good catch Dan


Robert F. Bowley Jr.
Owner
TaRa Solutions, LLC

In WebFOCUS since 2001
July 19, 2012, 03:38 PM
Developer Phila
I tried Dan Satchell's idea and I am getting the blanks. However I have column totals set on and I am no longer getting the total at the bottom. Any suggestions on how to get the column totals back.


WebFOCUS 7.6
Windows, All Outputs
July 19, 2012, 04:07 PM
Francis Mariani
Column totals shouldn't disappear because of the NODATA setting or because of the MISSING ON attribute. This must be happening for a different reason.

Please post the code of the 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