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] Dynamic column visibility

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Dynamic column visibility
 Login/Join
 
Member
posted
I have a need to make some columns on a report dynamically visible/invisible.

I have found posts indicating the use an amper variable to accomplish my goal.

Something like CAR &noprint, where &noprint is set to 'NOPRINT' or ' '.

Is there away to include a custom column title on such a field that will not confuse the GUI.

I have found CAR &noprint 'Column Title' confuses the GUI into showing 2 fields.

The report still runs as intended, I'm just afraid another developer might come along in the future open the GUI and become confused.

Thanks.

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


WebFOCUS 7.6.11
Developer Studio on Windows XP. Server Components running on Windows Server 2003.
Excel, HTML, PDF
 
Posts: 21 | Registered: August 26, 2009Report This Post
Platinum Member
posted Hide Post
I thought it would be
CAR AS 'Column Title' &noprint
 
Posts: 140 | Location: Adelaide South Australia | Registered: October 27, 2006Report This Post
Gold member
posted Hide Post
I'm not sure if you're using a launch page on this report, but i found the best way to do this is with double-list boxes using the code below, this also allows users to select the sort order of the columns:

-SET &ECHO = ALL;
-DEFAULT &WFFMT = 'HTML'
-DEFAULT &SUMPRNT = 'SUM'
-DEFAULT &VERBLIST = '''DEALER_COST'' NONE ''RETAIL_COST'' NONE ''SALES'''
-DEFAULT &SORTLIST = '''COUNTRY'' NONE ''CAR'' NONE ''BODYTYPE'''
-SET &VERB = IF &SUMPRNT EQ 'PRINT' THEN 'PRINT' ELSE 'SUM';
-SET &VERBOBJ1 = STRREP(&VERBLIST.LENGTH, &VERBLIST, 1, '''', 0, 'x', &VERBLIST.LENGTH, A&VERBLIST.LENGTH);
-SET &VERBOBJ = STRREP(&VERBOBJ1.LENGTH, &VERBOBJ1, 5,' NONE', 0, 'x', &VERBOBJ1.LENGTH, A&VERBOBJ1.LENGTH);
-SET &SORTOBJ1 = STRREP(&SORTLIST.LENGTH, &SORTLIST, 1, '''', 0, 'x', &SORTLIST.LENGTH, A&SORTLIST.LENGTH);
-SET &SORTOBJ = 'BY ' | STRREP(&SORTOBJ1.LENGTH, &SORTOBJ1, 4 , 'NONE', 2, 'BY', &SORTOBJ1.LENGTH, A&SORTOBJ1.LENGTH);

TABLE FILE CAR
&VERB
&VERBOBJ
&SORTOBJ
ON TABLE PCHOLD FORMAT &WFFMT
END

**P.S. instead of the word NONE, your code might generate an OR which is what it's supposed to, i have an open case with support for this.


version 8202M
Reporting Server on
Windows Server using DB2 Connect to access data from iseries.
 
Posts: 78 | Registered: December 29, 2009Report This Post
Virtuoso
posted Hide Post
One little trick I've employed is to intentionally misuse FOC_NONE in cases like this. FOC_NONE is usually used when parameters are populated and a specific value needs to be set to 'ALL' - in essence removing the filter completely. So the parameter value is set to FOC_NONE. WebFOCUS is trained to ignore EVERYTHING on a line of code that contains FOC_NONE. So I sometimes use FOC_NONE as an amper variable value when I want to dynamically exclude an ENTIRE line of code. Try setting the value of &noprint to 'FOC_NONE' and see if that solves your problem.
On a related note, the syntax shown by OPALTOSH would be correct. CAR &noprint 'Column Title' would probably give you a syntax error.


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
Member
posted Hide Post
Thanks opaltosh, Joe, and Darin.

I'm continuing to use the &noprint method, placed in the correct position. But still seeing the extra fields in Report Painter.

It's something I can live with.

Thanks all
-redapple.


WebFOCUS 7.6.11
Developer Studio on Windows XP. Server Components running on Windows Server 2003.
Excel, HTML, PDF
 
Posts: 21 | Registered: August 26, 2009Report This Post
Gold member
posted Hide Post
On my box, if i use a no print and Active reports and do an export to excel from Active report, those columns show up.

Not sure if that's considered a bug, but with the columns i'm hiding being sensitive, i am a bit careful with NOPRINT.


version 8202M
Reporting Server on
Windows Server using DB2 Connect to access data from iseries.
 
Posts: 78 | Registered: December 29, 2009Report 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] Dynamic column visibility

Copyright © 1996-2020 Information Builders