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] Hiding COLUMNS with no data and OVER

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Solved] Hiding COLUMNS with no data and OVER
 Login/Join
 
Guru
posted
I have 2 dozen columns that I use in an OVER

Not a real sample
TABLE FILE CAR
PRINT
COUNTRY1 CAR1 OVER
COUNTRY2 CAR2 OVER
...
IF READLIMIT EQ 1
IF RECORDLIMIT EQ 1
END


If the first columnn has nodata then the next does not either. In example: COUNTRY1 and CAR1 both have data or both are empty.

I do have only one record if that helps. However, I have too many columns to think about

How do I not print the entire OVER line if they are blank?

Fernando

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


Prod WF 8.1.04, QA WF 8.2.03, Dev WF 8.2.03
 
Posts: 278 | Registered: October 10, 2006Report This Post
Expert
posted Hide Post
"COUNTRY1 and CAR1 both have data or both are empty"

Include selection criteria?

WHERE COUNTRY1 NE ''


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
Expert
posted Hide Post
So if I understand you correctly, you have one giant record with groups of fields hopefully with the same formats. For instance COUNTRY1 has the same format as COUNTRY2, etc. Please confirm that this is true.

The second thing to know is what kind of file it is? Fixed, relational,?

Even if relational, you can create a flat hold file out of it repeating the fields in order, i.e. COUNTRY1 CAR1 COUNTRY2 CAR2 COUNTRY3 CAR3 etc.

Create an alternate master for this file using the OCCURS clause and the ORDER field. Then you don't have to use OVER. You can simply say:

TABLE FILE filename
PRINT COUNTRY CAR
BY ORDER NOPRINT
WHERE COUNTRY NE ' '
END


Please let me know if you need more detail on this technique. It is a handy one to keep in your back pocket.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Guru
posted Hide Post
Ginny,

I like your idea. However, If I have 4 occurences and they are all blank then I get no records. I have other fields that are part of my query and I need to have those printed.

I have saved my data in a hold table and formatted as alpha.

Fernando


Prod WF 8.1.04, QA WF 8.2.03, Dev WF 8.2.03
 
Posts: 278 | Registered: October 10, 2006Report This Post
Expert
posted Hide Post
Then put the other fields at the beginning of the record and the occuring ones at the end. Then use the alternate master. You can print the fixed fields and they will show up regardless of whether the other columns are blank or not.

You just need to be creative and arrange the data to suit your needs not the other way around. Smiler


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Guru
posted Hide Post
Ginny,

It works. I got creative and created temp columns. These take the first of my columns with data. If none have data then I set it to a space.

Ex:
  
T1/A255 MISSING ON=IF COUNTRY1 IS NOT MISSING THEN COUNTRY1 ELSE 
IF COUNTRY2 IS NOT MISSING THEN COUNTRY2
... 
ELSE ' ';


Fernando


Prod WF 8.1.04, QA WF 8.2.03, Dev WF 8.2.03
 
Posts: 278 | Registered: October 10, 2006Report This Post
Master
posted Hide Post
Do you only want to print the first non blank occurance?


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Report 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] Hiding COLUMNS with no data and OVER

Copyright © 1996-2020 Information Builders