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] Column heading with ACROSS

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Column heading with ACROSS
 Login/Join
 
Silver Member
posted
Good morning,

This is most likely an easy solution, but somehow I can’t figure it out… I found the previous post on this topic, and that helped a lot, but I'm still not where I need to be.

I have something similar to this:

SET ASNAMES=ON
-*
DEFINE FILE CAR
GRP_FLAG/I1 = 1;
END
-*
TABLE FILE CAR
PRINT
COUNTRY
CAR
DEALER_COST AS COST
GRP_FLAG
ON TABLE HOLD AS CAR1
END
-*
DEFINE FILE CAR
GRP_FLAG/I1 = 2;
END
-*
TABLE FILE CAR
PRINT
COUNTRY
CAR
RETAIL_COST AS COST
GRP_FLAG
ON TABLE HOLD AS CAR2
END
-*
TABLE FILE CAR1
PRINT
COUNTRY
CAR
COST
GRP_FLAG
ON TABLE HOLD AS SUMMPAGE
MORE
FILE CAR2
END
-*
TABLE FILE SUMMPAGE
SUM
COST AS 'Cost'
BY CAR
ACROSS GRP_FLAG NOPRINT
ACROSS COUNTRY AS ''
ON TABLE SUBTOTAL
END

I would like to show column headings for the COST column, but the tricky part is that I want to show different headings depending on the GRP_FLAG. For example, if GRP_FLAG = 1 show COST as ‘Dealer Cost’ and if GRP_FLAG = 2 then show COST as ‘Retail Cost’.

I would appreciate any help with this.
Thanks,
Luminita

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


7.6.6 on AIX platform
Output: variety (Excel, HTML and PDF)
 
Posts: 33 | Location: New Hampshire | Registered: October 17, 2007Report This Post
Virtuoso
posted Hide Post
Something like this might work..I have no time to test it...

-SET &COST = IF GRP_FLAG EQ 1 THEN 'Dealer Cost' ELSE 'Retail Cost;
TABLE FILE SUMMPAGE
SUM
COST AS '&COST'
BY CAR
ACROSS GRP_FLAG NOPRINT
ACROSS COUNTRY AS ''
ON TABLE SUBTOTAL
END
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Silver Member
posted Hide Post
Nope, this doesn't work. It doesn't display the Cost column heading at all...


7.6.6 on AIX platform
Output: variety (Excel, HTML and PDF)
 
Posts: 33 | Location: New Hampshire | Registered: October 17, 2007Report This Post
Guru
posted Hide Post
In your own example, use "Dealer Cost" or "Retail Cost" for GRP_FLAG in the defines, then get rid of the NOPRINT for GRP_FLAG.
How's it sound?

Hua


Developer Studio 7.6.11
AS400 - V5R4
HTML,PDF,XLS
 
Posts: 305 | Location: Winnipeg,MB | Registered: May 12, 2008Report This Post
Virtuoso
posted Hide Post
This should do it:
  
DEFINE FILE SUMMPAGE
CTITLE/A12 =IF GRP_FLAG EQ 1 THEN 'Dealer Cost' ELSE 'Retail Cost';
END
TABLE FILE SUMMPAGE
SUM
COST AS 'Cost'
BY CAR 
ACROSS GRP_FLAG NOPRINT
ACROSS COUNTRY AS ''
ACROSS CTITLE AS ''
ON TABLE SUBTOTAL
END


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Silver Member
posted Hide Post
Thank you all for taking the time to look at this. The solution provided by Danny worked like a charm!


7.6.6 on AIX platform
Output: variety (Excel, HTML and PDF)
 
Posts: 33 | Location: New Hampshire | Registered: October 17, 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     [SOLVED] Column heading with ACROSS

Copyright © 1996-2020 Information Builders