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] Variable column output

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Solved] Variable column output
 Login/Join
 
Platinum Member
posted
Is it possible to have variable column selection on the HTML lauch page. Example..An HTML report output has the potential to have up to 10 output fields. I was thinking of letting the user select which fields they want to view. I would think these amp variables would be basically NOPRINT or ' ' for values. Anybody have any examples handy. Thanks!

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


WebFocus 7.7.02 WinXP
 
Posts: 236 | Registered: May 12, 2006Report This Post
Platinum Member
posted Hide Post
Could you make an active report and hide those columns? At runtime your user should be able to unhide the columns he/she wants.


WebFOCUS: 7702
O/S : Windows
Data Migrator: 7702
 
Posts: 127 | Location: San Antonio | Registered: May 29, 2009Report This Post
Guru
posted Hide Post
This is how we do it. Though there may be an easier way.

HTML
Used the HTML to set one long string:

1. Create a variable for each available output field choice using check boxes to populate them where the value is “1” if box is checked and “0” when the box is unchecked.

2. Concatenate the variables together with a “-“ in between each variable:

INP10 = tf01 + '-' + tf02 + '-' + tf03 + '-' + tf04 + '-' + tf05 + '-' + tf06 + '-' + tf07 + '-' + tf08 + '-' + tf09 + '-' + tf10 + '-'


FEX
Pass this variable to your fex and use the GETTOK function to set the print fields.
-SET &VSTRING = &INP10;
-SET &FLD01 = IF GETTOK(&VSTRING, 100, 1, '-', 60, 'A60')=1 THEN 'ECSHDRKEY  AS ''BATCH#''' ELSE '-*';
-SET &FLD02 = IF GETTOK(&VSTRING, 100, 2, '-', 60, 'A60')=1 THEN 'POE        AS ''P / E''' ELSE '-*';
-SET &FLD03 = IF GETTOK(&VSTRING, 100, 3, '-', 60, 'A60')=1 THEN 'CLMHDRKEY  AS ''CLAIM NO''' ELSE '-*';
-SET &FLD04 = IF GETTOK(&VSTRING, 100, 4, '-', 60, 'A60')=1 THEN 'CHSTAT     AS ''STATUS''' ELSE '-*';
-SET &FLD05 = IF GETTOK(&VSTRING, 100, 5, '-', 60, 'A60')=1 THEN 'CHLOCA     AS ''CO''' ELSE '-*';
-SET &FLD06 = IF GETTOK(&VSTRING, 100, 6, '-', 60, 'A60')=1 THEN 'EDMEMB     AS ''POLICY#''' ELSE '-*';
-SET &FLD07 = IF GETTOK(&VSTRING, 100, 7, '-', 60, 'A60')=1 THEN 'CHGPNO     AS ''GROUP''' ELSE '-*';
-SET &FLD08 = IF GETTOK(&VSTRING, 100, 8, '-', 60, 'A60')=1 THEN 'ERSTAT     AS ''PATIENT STATE''' ELSE '-*';
-SET &FLD09 = IF GETTOK(&VSTRING, 100, 9, '-', 60, 'A60')=1 THEN 'EDFNAM     AS ''FIRST NAME''' ELSE '-*';
-SET &FLD10 = IF GETTOK(&VSTRING, 100, 10, '-', 60, 'A60')=1 THEN 'EDLNAM     AS ''LAST NAME''' ELSE '-*';

TABLE FILE FILENAME (OR HOLD)
PRINT
&FLD01.EVAL
&FLD02.EVAL
&FLD03.EVAL
&FLD04.EVAL
&FLD05.EVAL
&FLD06.EVAL
&FLD07.EVAL
&FLD08.EVAL
&FLD09.EVAL
&FLD10.EVAL


Glenda

In FOCUS Since 1990
Production 8.2 Windows
 
Posts: 301 | Location: Galveston, Texas | Registered: July 07, 2004Report This Post
Expert
posted Hide Post
I would suggest not commenting out the columns, but NOPRINTing them, then any stylesheet options for individual columns will not be lost.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Guru
posted Hide Post
Very good suggestion.

The user that required the data from our fex wanted nothing but data with a header row on his EXCEL spreadsheet so commenting out opposed to "noprint" didn't matter. However if you are using stylesheet options, you will need to use noprint if your stylesheet options are based on column numbers as opposed to column names.

If your stylesheet options use column names then either way will work.


Glenda

In FOCUS Since 1990
Production 8.2 Windows
 
Posts: 301 | Location: Galveston, Texas | Registered: July 07, 2004Report This Post
Platinum Member
posted Hide Post
Thanks!..this gives me something to work with...I'll report back with my results.


WebFocus 7.7.02 WinXP
 
Posts: 236 | Registered: May 12, 2006Report This Post
Platinum Member
posted Hide Post
Thanks for the help..I was able to do this
 -SET &AHT1 = IF &AHT EQ 1 THEN ' ' ELSE 'NOPRINT';
-SET &CIQP1 = IF &CIQP EQ 2 THEN ' ' ELSE 'NOPRINT';
-SET &QMT1 = IF &QMT EQ 3 THEN ' ' ELSE 'NOPRINT';
-SET &ALLQ1 = IF &ALLQ EQ 4 THEN ' ' ELSE 'NOPRINT';
-SET &REV1 = IF &REV EQ 5 THEN ' ' ELSE 'NOPRINT';
-SET &UNIT1 = IF &UNIT EQ 6 THEN ' ' ELSE 'NOPRINT';
-SET &BBCR1 = IF &BBCR EQ 7 THEN ' ' ELSE 'NOPRINT';
-SET &BBCRU1 = IF &BBCRU EQ 8 THEN ' ' ELSE 'NOPRINT';
-SET &OBCU1 = IF &OBCU EQ 9 THEN ' ' ELSE 'NOPRINT';
-SET &CALLT1 = IF &CALLT EQ 10 THEN ' ' ELSE 'NOPRINT';
-SET &RETCALL1 = IF &RETCALL EQ 11 THEN ' ' ELSE 'NOPRINT';
-SET &CALLOW1 = IF &CALLOW EQ 12 THEN ' ' ELSE 'NOPRINT';
-SET &ADH1 = IF &ADH EQ 13 THEN ' ' ELSE 'NOPRINT';
-SET &CHAT1 = IF &CHAT EQ 14 THEN ' ' ELSE 'NOPRINT';
-SET &EMAP1 = IF &EMAP EQ 15 THEN ' ' ELSE 'NOPRINT';
-SET &SUCP1 = IF &SUCP EQ 16 THEN ' ' ELSE 'NOPRINT'; 
and place the variable either as print or noprint based on the output selections..thanks again!


WebFocus 7.7.02 WinXP
 
Posts: 236 | Registered: May 12, 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     [Solved] Variable column output

Copyright © 1996-2020 Information Builders