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     [CLOSED] Conditionally displaying a field without dialog manager

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Conditionally displaying a field without dialog manager
 Login/Join
 
Platinum Member
posted
I have a very complex report that creates 3 excel files, each with multiple tabs, all done via looping and branching.

On one tab on one spreadsheet, I need to omit one of the columns. In the past, with simpler reports, I've made NOPRINT a variable to accomplish this.

Due to the complexity, I need to do this without dialog manager. The logic is IF FIELD_A = 'X' THEN don't display FIELD_B ELSE display FIELD_B.

FIELD_A contains the values that are used to create the tabs on the spreadsheet.

Thank you.

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


WF 7.7.03, Windows 7, HTML, Excel, PDF
 
Posts: 225 | Location: San Francisco Bay Area, California | Registered: October 26, 2006Report This Post
Guru
posted Hide Post
Any particular reason you want to avoid DM commands?

Dialogue manager was my first thought until I saw the rest of the msg..


-********************
Sandbox: 8206.10
Dev: 8201M
Prod:8009
-********************
 
Posts: 289 | Location: Houston,TX | Registered: June 11, 2004Report This Post
Platinum Member
posted Hide Post
The report is very complex with much looping and dynamic code.


WF 7.7.03, Windows 7, HTML, Excel, PDF
 
Posts: 225 | Location: San Francisco Bay Area, California | Registered: October 26, 2006Report This Post
Master
posted Hide Post
quote:
Originally posted by JohnB:
The report is very complex with much looping and dynamic code.


How much complex it is, one dialog manager command should not hurt it
some thing like this should work
  
-SET &SEL_FLD = IF CONDITION THEN '' ELSE '-*';

Place &SEL_FLD.EVAL in front of the field that needs to be displayed conditionally..


Hope this helps

thank you..


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report This Post
Platinum Member
posted Hide Post
The condition is based on when a FIELD has a specific value. The code is too complex to save the value into a hold file and the do a -READ to load it into a variable. You cannot specify a FIELD and its value the condition in your example.


WF 7.7.03, Windows 7, HTML, Excel, PDF
 
Posts: 225 | Location: San Francisco Bay Area, California | Registered: October 26, 2006Report This Post
Guru
posted Hide Post
Sometimes I had to use conditional styling in the stylesheet like color=white etc.,with a WHEN statement. Would that work for you situation?
 
Posts: 289 | Location: Houston,TX | Registered: June 11, 2004Report This Post
Platinum Member
posted Hide Post
I tried WHEN in the stylesheet code, but that didn't work. Do you have any suggestions on how to do this with stylesheet code?


WF 7.7.03, Windows 7, HTML, Excel, PDF
 
Posts: 225 | Location: San Francisco Bay Area, California | Registered: October 26, 2006Report This Post
Virtuoso
posted Hide Post
quote:
Originally posted by JohnB:
The condition is based on when a FIELD has a specific value. The code is too complex to save the value into a hold file and the do a -READ to load it into a variable. You cannot specify a FIELD and its value the condition in your example.


You can't decide whether to show a field or not in the middle of a result-set. The column for the field is either there or it isn't - it can't be there sometimes and not there other times.

What you can do is give the field a value of MISSING (or '' if you prefer) if certain conditions are met.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Platinum Member
posted Hide Post
A column can be in a report sometimes and not others, when you make NOPRINT a variable. I have done this in the past and it works fine. But this dialogue manager approach is not doable in this report.

-SET &NOPRINT = IF CONDITION THEN ' ' ELSE 'NOPRINT';

TABLE FILE ___
PRINT
FIELD_A
FIELD_B &NOPRINT
BY FIELD_C
END


WF 7.7.03, Windows 7, HTML, Excel, PDF
 
Posts: 225 | Location: San Francisco Bay Area, California | Registered: October 26, 2006Report This Post
Virtuoso
posted Hide Post
If FIELD_A is constant over the scope of the TABLE request, it is feasible.

If it's not constant, the requirement makes no sense -- should the column heading for FIELD_B be visible when you look at some lines and magically invisible when you lok at others on the same tab?
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Platinum Member
posted Hide Post
On one tab only, on only one of the 3 spreadsheets this focexec creates, FIELD_A -- the enire column is not to appear. The user has business reasons why it should not appear on that one tab, but should appear on other tabs. This is a monster focexec, and even the person who wrote it doesn't know how to do this new request.

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


WF 7.7.03, Windows 7, HTML, Excel, PDF
 
Posts: 225 | Location: San Francisco Bay Area, California | Registered: October 26, 2006Report This Post
Virtuoso
posted Hide Post
quote:
A column can be in a report sometimes and not others


That's different from what I was explaining. You can indeed have a report with a column or without a column. You cannot, however, leave out or include a column halfway through a report. The column is either there in its entirety or it isn't.

That is what the OP seems to ask for and I don't think that's possible.
J.gross explains the same issue in a different way.

It might be possible to create a multi-segment master with "missing" fields on the right hand side though. I'm not sufficiently familiar with those or with multi-worksheet excel reports to comment on the possibilities of that combination.

Now if there is some way to create a multi-worksheet Excel report using more than one result set, the problem of the OP can be solved by using a compound report or some such. If it depends on the output of one result set it probably cannot (see earlier reservations).

It may be possible to "hide" the column under certain conditions, but that column is going to be there as long as the excel sheet is built from one TABLE FILE request.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Master
posted Hide Post
quote:
This is a monster focexec, and even the person who wrote it doesn't know how to do this new request.

The trouble with monsters is that they come out at night and eat you.


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Platinum Member
posted Hide Post
Looks like it is not doable without rewriting the focexec.

Thanks, everyone.


WF 7.7.03, Windows 7, HTML, Excel, PDF
 
Posts: 225 | Location: San Francisco Bay Area, California | Registered: October 26, 2006Report 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     [CLOSED] Conditionally displaying a field without dialog manager

Copyright © 1996-2020 Information Builders