Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Nodata while using subhead

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Nodata while using subhead
 Login/Join
 
Gold member
posted
HI,

I am trying to display '--' value when i encounter a null value.But in my report i use subheads to print column names and their values as well.Hence if i use SET NODATA = '--' it does not work.

Appreciate your help.

Thanks!

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


WebFOCUS 7.6.9
Windows
Excel, HTML, PDF
 
Posts: 71 | Registered: April 17, 2009Report This Post
Virtuoso
posted Hide Post
I'm not quite sure of the relationship you're trying to make. The NODATA value doesn't have anything to do with printing column names using subhead. Can you give us an example of what you're tyring to do and the error you're getting?


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Virtuoso
posted Hide Post
Jan,

There shouldn't be any problem. See example:
  
-* File jan1_1.fex
SET NODATA='--'
DEFINE FILE CAR
JAN/I6 MISSING ON = IF SALES EQ 0 THEN MISSING ELSE SALES;
END
TABLE FILE CAR

BY COUNTRY NOPRINT BY CAR NOPRINT BY BODYTYPE NOPRINT
ON BODYTYPE SUBHEAD
"COUNTRY<+0>CAR<+0>BODYTYPE<+0>JAN"
"<COUNTRY<CAR<BODYTYPE<JAN"
" "
ON TABLE SET STYLE *
TYPE=SUBHEAD, HEADALIGN=BODY, $
ENDSTYLE
END


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Expert
posted Hide Post
Working example:

SET NODATA='--'

TABLE FILE TRAINING
PRINT
*
HEADING
"WEBFOCUS REPORT"
"GRADE: <GRADE"
END

TRAINING is a demo file usually provided with the software installation (though it may be a leftover from an old version of WF). It is the only demo file I can find that has missing data.

If a column with no data is embedded in a HEADER or is in a report row, it displays the NODATA value, so perhaps we don't understand your question.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Gold member
posted Hide Post
Hi,

Am sorry for not giving an example .Taking the EMployee file as an example, the bank_name does not have data for some of the empid's.Although i have used SET NODATA='--' it does not appear.

AM i doing something wrong here ?

Please see the below code:



-* File nodata.fex
-* File jan1_1.fex



SET NODATA='--'
SET ALL=0N

TABLE FILE EMPLOYEE
BY EMP_ID NOPRINT
ON EMP_ID SUBHEAD
"EMPLOYEE<+0>FIRSTNAME<+0>LASTNAME<+0>BANK_NAME"
"<EMP_ID<+0><FIRST_NAME<+0><LAST_NAME<+0><BANK_NAME"
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=SUBHEAD, LINE=1,ITEM=1, WIDTH=1.25, JUSTIFY=RIGHT,WRAP=1, $
TYPE=SUBHEAD, LINE=2,ITEM=1, WIDTH=1.25, JUSTIFY=RIGHT,WRAP=1,$
TYPE=SUBHEAD, LINE=1,ITEM=2, WIDTH=1.25, JUSTIFY=RIGHT,WRAP=1, $
TYPE=SUBHEAD, LINE=2,ITEM=2, WIDTH=1.25, JUSTIFY=RIGHT,WRAP=1, $

TYPE=SUBHEAD, LINE=1,ITEM=3, WIDTH=1.25, JUSTIFY=RIGHT,WRAP=1,$
TYPE=SUBHEAD, LINE=2,ITEM=3, WIDTH=1.25, JUSTIFY=RIGHT,WRAP=1, $
TYPE=SUBHEAD, LINE=1,ITEM=4, WIDTH=1.25, JUSTIFY=RIGHT,WRAP=1,$
TYPE=SUBHEAD, LINE=2,ITEM=4, WIDTH=1.25, JUSTIFY=RIGHT,WRAP=1,$

TYPE=SUBHEAD, LINE=1,ITEM=5, WIDTH=1.25, JUSTIFY=RIGHT,WRAP=1,$
TYPE=SUBHEAD, LINE=3,ITEM=5, WIDTH=1.25, JUSTIFY=RIGHT,WRAP=1,$

TYPE=SUBHEAD, LINE=1,ITEM=5, WIDTH=1.25, JUSTIFY=RIGHT,WRAP=1,$
TYPE=SUBHEAD, LINE=3,ITEM=5, WIDTH=1.25, JUSTIFY=RIGHT,WRAP=1,$

TYPE=SUBHEAD, LINE=1,ITEM=6, WIDTH=1.25, JUSTIFY=RIGHT,WRAP=1,$
TYPE=SUBHEAD, LINE=3,ITEM=6, WIDTH=1.25, JUSTIFY=RIGHT,WRAP=1,$

TYPE=SUBHEAD, LINE=2,ITEM=1, WIDTH=1.25, JUSTIFY=RIGHT,WRAP=1,$
TYPE=SUBHEAD, LINE=4,ITEM=1, WIDTH=1.25, JUSTIFY=RIGHT,WRAP=1,$

ENDSTYLE
END



  

Appreciate your help

Thanks!

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


WebFOCUS 7.6.9
Windows
Excel, HTML, PDF
 
Posts: 71 | Registered: April 17, 2009Report This Post
Virtuoso
posted Hide Post
Jan,
The EMPLOYE file could be a good example for this, but not with the field that you used.
In the following code the display of your '--' in the subhead for missing values is shown:
SET NODATA='--'
SET ALL=ON

TABLE FILE EMPLOYEE
BY EMP_ID NOPRINT
ON EMP_ID SUBHEAD
"EMPLOYEE<+0>FIRSTNAME<+0>LASTNAME<+0>COURSE_CODE"
"<EMP_ID<FIRST_NAME<LAST_NAME<COURSE_CODE>"
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=SUBHEAD, LINE=1,ITEM=1, OBJECT=TEXT,  WIDTH=1.25, JUSTIFY=LEFT,WRAP=1.25, $
TYPE=SUBHEAD, LINE=2,ITEM=1, OBJECT=FIELD, WIDTH=1.25, JUSTIFY=LEFT,WRAP=1.25, $
TYPE=SUBHEAD, LINE=1,ITEM=2, OBJECT=TEXT,  WIDTH=1.25, JUSTIFY=LEFT,WRAP=1.25, $
TYPE=SUBHEAD, LINE=2,ITEM=2, OBJECT=FIELD, WIDTH=1.25, JUSTIFY=LEFT,WRAP=1.25, $

TYPE=SUBHEAD, LINE=1,ITEM=3, OBJECT=TEXT,  WIDTH=1.25, JUSTIFY=LEFT,WRAP=1.25, $
TYPE=SUBHEAD, LINE=2,ITEM=3, OBJECT=FIELD, WIDTH=1.25, JUSTIFY=LEFT,WRAP=1.25, $
TYPE=SUBHEAD, LINE=1,ITEM=4, OBJECT=TEXT,  WIDTH=1.25, JUSTIFY=LEFT,WRAP=1.25, $
TYPE=SUBHEAD, LINE=2,ITEM=4, OBJECT=FIELD, WIDTH=1.25, JUSTIFY=LEFT,WRAP=1.25, $
ENDSTYLE
END

You will notice a few differences.
First of all you have to SET ALL = ON for missing values to show in this case.
Then, using BANK_NAME will never show missing values, since the segment the field is in is a unique segment. In (web)focus these segments are treated as always being available, so you'll have to find a real missing field.
Which is the course_code. This shows the '--' in the subheading.

Hope this helps ...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Virtuoso
posted Hide Post
Remember that blank does not mean missing. If the data value is blank, then a value does exists but it is filled with blanks. That is not the same thing as a missing or null value. If the value were truly missing, you would see a dot (.) in the absence of a SET NODATA=statement. Francis and Danny have given you examples. Here's another. In this case I have joined EMPLOYEE to EDUCFILE. Every employee has not attended an education course so they would truly have NO records (missing) in the course file. The SET ALL=PASS forces a left outer join. Otherwise, you would only get employees who have corresponding records in educfile (Inner Join).
SET NODATA=--
SET ALL=PASS
JOIN EMP_ID IN EMPLOYEE TO ALL EMP_ID IN EDUCFILE AS J1
TABLE FILE EMPLOYEE
PRINT EMP_ID COURSE_CODE COURSE_NAME
BY EMP_ID NOPRINT
ON EMP_ID SUBHEAD
"EMPID=<EMP_ID COURSE_CODE=<COURSE_CODE"
END


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Gold member
posted Hide Post
ok!!

Thanks for the reply!


WebFOCUS 7.6.9
Windows
Excel, HTML, PDF
 
Posts: 71 | Registered: April 17, 2009Report This Post
<JG>
posted
To expand on Darin's post

Data is only MISSING if the Master file contains MISSING=ON on the particular column
and the column contains a NULL
(this must be there when the data is loaded it cannot be added afterwards.)

Alternatively you can DEFINE the value as missing at run time.

DEFINE  FILE EMPLOYEE
XX/A20 MISSING ON= IF BANK_NAME EQ ' ' THEN MISSING ELSE BANK_NAME;
END
TABLE FILE EMPLOYEE
BY EMP_ID NOPRINT
ON EMP_ID SUBHEAD
"EMPLOYEE<+0>FIRSTNAME<+0>LASTNAME<+0>BANK_NAME"
"<EMP_ID<+0><FIRST_NAME<+0><LAST_NAME<+0><XX"  
 
Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Nodata while using subhead

Copyright © 1996-2020 Information Builders