Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]Rename ACROSS column name
Go
New
Search
Notify
Tools
Reply
  
[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, 2011Reply With QuoteReport 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, 2005Reply With QuoteReport 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, 2005Reply With QuoteReport 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, 2004Reply With QuoteReport 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.06OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6131 | Location: 33.8688° S, 151.2093° E | Registered: October 31, 2006Reply With QuoteReport 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, 2010Reply With QuoteReport 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: 103 | Registered: April 06, 2009Reply With QuoteReport 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, 2005Reply With QuoteReport 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, 2011Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]Rename ACROSS column name

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.