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] How to reference reformatted columns

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] How to reference reformatted columns
 Login/Join
 
Member
posted
I need to be able to dynamically reference an ACROSS column in my procedure. I have been able to do it using the technique in the following sample code ("COLUMN=SALES(&column_num)").

-SET &column_num = 2;

TABLE FILE CAR
SUM
SALES
BY CAR
ACROSS SEATS
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = endeflt,
$
TYPE=DATA,
COLUMN=SALES(&column_num),
BACKCOLOR=GREEN,
$
ENDSTYLE
END


However, I also need to apply dynamic format based on field values in the same procedure. After I apply dynamic format, the column referencing no longer works. See following sample code.

-SET &column_num = 2;
DEFINE FILE CAR
FMT/A10 = IF CAR EQ 'BMW' THEN 'D10.2' ELSE 'D10';
END

TABLE FILE CAR
SUM
SALES/FMT
BY CAR
ACROSS SEATS
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = endeflt,
$
TYPE=DATA,
COLUMN=SALES(&column_num),
BACKCOLOR=GREEN,
$
ENDSTYLE
END


I am guessing it does not work any more because reformatting stores duplicate columns in the internal matrix, and now the referencing is just confused. Does anybody know how to tackle this?

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


WebFOCUS 7.7.3
Windows, All Outputs
 
Posts: 28 | Registered: January 19, 2012Report This Post
Expert
posted Hide Post
do a HELP search on the terms TYPE=ACROSSVALUE and TYPE=ACROSSTITLE




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Virtuoso
posted Hide Post
Unfortuntaely, I think you will need to use column notation instead of column names in order to address the correct column:

-SET &column_num = 4;

DEFINE FILE CAR
FMT/A10 = IF CAR EQ 'BMW' THEN 'D10.2' ELSE 'D10';
END

TABLE FILE CAR
SUM 
SALES/FMT
BY CAR
ACROSS SEATS
ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = endeflt,
$
TYPE=DATA,
COLUMN=C&column_num,
BACKCOLOR=GREEN,
$
ENDSTYLE
END


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Member
posted Hide Post
Thanks. I actually didn't know I could use C-notation like "C&column_num". This is going to very helpful. Question: can you explain why &column_num needs to be set to 4 to reference the second across column? I tested setting it to 1 and it references the first across column. So I am confused how it actually works.


WebFOCUS 7.7.3
Windows, All Outputs
 
Posts: 28 | Registered: January 19, 2012Report This Post
Virtuoso
posted Hide Post
If you review the COLUMN= attribute under style sheet attributes, there are several options involving column numbers. Honestly, I am also confused as to how WebFOCUS assigns column numbers in the internal matrix. There is also a general setting that affects how the columns are numbered:

SET CNOTATION = ALL/EXPLICIT/PRINTONLY

I always try to reference columns by their column names because this makes the code much easier to understand. But sometimes (as in this case) column notation is unavoidable and I have found that experimentation is the only way to determine the correct column number to use.


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 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     [CLOSED] How to reference reformatted columns

Copyright © 1996-2020 Information Builders