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]Rename ACROSS column name

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]Rename ACROSS column name
 Login/Join
 
Member
posted
I was wondering if its possible to rename an ACROSS column name?

For example

ACROSS LICLASS AS ' ' COLUMNS COL1 AND COL2

What if i wanted to rename COL1 & COL2 to like Results 1, Results 2

Thank you

This message has been edited. Last edited by: Rodney Chan,


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 26 | Registered: October 27, 2011Report This Post
Virtuoso
posted Hide Post
The issue here is that COL1 and COL2 are not really "columns" from a data standpoint but different value instances of the LICLASS field.

So, for you to use different values you'd need to DEFINE them in a different field and use the latter in your ACROSS.

DEFINE FILE blah
NEW_LICLASS/A20 = DECODE LICLASS ('COL1' 'Results 1' 'COL2' 'Results 2' ELSE 'Other');
END

TABLE FILE blah
SUM stuff
ACROSS NEW_LICLASS AS '' COLUMNS 'Results 1' AND 'Results 2'
END



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Virtuoso
posted Hide Post
Another option you may look into would be to HOLD your results first and then report out of it using fixed columns to which you can assign any title you want.

Something like this (not tested):

TABLE FILE blah
SUM STUFF
ACROSS LICLASS AS 'RESULT_'
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS HDATA
END

-*
TABLE FILE HDATA
PRINT RESULT_COL1 AS 'Results 1'
      RESULT_COL2 AS 'Results 2'
END



The trick here is to rely on SET ASNAMES = ON and the effect it has when creating HOLD files out of TABLE FILE statements that use ACROSS.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Member
posted Hide Post
In 7702 and above this works:

TABLE FILE CAR
SUM RC ACROSS COUNTRY AS '' COLUMNS FRANCE AS 'Result1' AND ENGLAND AS 'Result2'
END
 
Posts: 13 | Registered: April 23, 2004Report This Post
Expert
posted Hide Post
quote:
COLUMNS FRANCE AS 'Result1' AND ENGLAND AS 'Result2'


Wow, learn something new every day.

Good One


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
Platinum Member
posted Hide Post
HI,
we use 7702 and the code does not work!!

Regards

Christian


WF Production Version: 7.7.02M
WF Test Version: 7.7.02M
Developer Studio: 7.7.02
HTML, EXL2K, FLEX, PDF,PPT
 
Posts: 156 | Location: Essen Germany | Registered: December 02, 2010Report This Post
Platinum Member
posted Hide Post
quote:
TABLE FILE CAR
SUM RC ACROSS COUNTRY AS '' COLUMNS FRANCE AS 'Result1' AND ENGLAND AS 'Result2'
END

It be working in 7.7.03

Kofi


Client Server 8.1.05: Apache; Tomcat;Windows Server 2012
Reporting Server 8.1.05; Oracle; MS SQL; Windows Server 2012
 
Posts: 106 | Registered: April 06, 2009Report This Post
Virtuoso
posted Hide Post
Nice! It does work in 7.7.03.

Rodney may still need to use some of the provided workarounds for his 7.6 environment.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Member
posted Hide Post
Boo thats what i was looking for!

quote:
TABLE FILE CAR
SUM RC ACROSS COUNTRY AS '' COLUMNS FRANCE AS 'Result1' AND ENGLAND AS 'Result2'
END


I will go with the suggestion by njsden to just use a DEFINE file. Not quite exactly what i was needing but good enough

Thank you!


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 26 | Registered: October 27, 2011Report 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]Rename ACROSS column name

Copyright © 1996-2020 Information Builders