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]Column Alias

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED]Column Alias
 Login/Join
 
Member
posted
If I have a simple report with a define field to get the YEAR from a date variable. How can I use the Year in the column alias?

i.e. I want the column to say "CLAIMS INCURRED 2016" and it will update as the dates change instead of hardcoding the year.

Does that make sense?

Thanks Matt



DEFINE FILE HLDRPT1
IN_YEAR/YY = '&&DT_BOY';
END



TABLE FILE HLDRPT1

HEADING
"World Kitchen LLC"
"Total "Line of Coverage: WC"
"Report Run on &DATE"

SUM
IN_1MO_PRIOR_CNT AS 'CLAIMS INCURRED, %%INSERT DEFINE FIELD HERE%%'



BY CORP_LEVEL2 AS 'LEVEL 2' SUB-TOTAL
BY CORP_LEVEL3 AS 'LEVEL 3'

This message has been edited. Last edited by: <Emily McAllister>,
 
Posts: 15 | Registered: April 12, 2016Report This Post
Guru
posted Hide Post
Easy.

SUM
IN_1MO_PRIOR_CNT	AS 'CLAIMS INCURRED &&DT_BOY'
  


OR

 
SUM
IN_1MO_PRIOR_CNT	AS 'CLAIMS INCURRED <IN_YEAR'

 


WebFOCUS 8.1.05 / APP Studio
 
Posts: 272 | Location: Brazil | Registered: October 31, 2006Report This Post
Master
posted Hide Post
Don't think you can do it as a define. Make it a variable, it should work.

-DEFAULTH &MYFIELD = '2014';

TABLE FILE CAR
SUM
     CAR.BODY.SALES
BY  CAR.ORIGIN.COUNTRY AS 'This is &MYFIELD' 
BY  CAR.COMP.CAR
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
END



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Master
posted Hide Post
[QUOTE]SUM
IN_1MO_PRIOR_CNT	AS 'CLAIMS INCURRED <IN_YEAR'[/QUOTE]


Doesn't work.. WebFOCUS thinks your trying to put HTML in your title and it removes it. Or at least in 8.1.04 it does.



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Master
posted Hide Post
If I understand you correctly, you want this:

DEFINE FILE HLDRPT1
IN_YEAR/YY TITLE 'CLAIMS INCURRED 2016' = '&&DT_BOY';
END

Update: Sorry, that's still hardcoding.

Try this:

DEFINE FILE HLDRPT1
IN_YEAR/YY TITLE 'CLAIMS INCURRED &&DT_BOY' = '&&DT_BOY';
END


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
 
Posts: 594 | Location: Michigan | Registered: September 04, 2015Report This Post
Master
posted Hide Post
I think he's trying to convert it to YY at the same time.. I hate date conversions and I have the damn book on it. When a language has a book on just date conversions, it should be a wake up call, that just maybe that needs to be simplified.



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Master
posted Hide Post
quote:
Originally posted by GavinL:
I think he's trying to convert it to YY at the same time.. I hate date conversions and I have the damn book on it. When a language has a book on just date conversions, it should be a wake up call, that just maybe that needs to be simplified.

Hallelujah! So I'm not alone after all. I have that date book too, and I was using it today (Or trying to, anyway). WebFOCUS date handling is perpetually confusing!


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
 
Posts: 594 | Location: Michigan | Registered: September 04, 2015Report This Post
Guru
posted Hide Post
I will buy mine asap.

I got the WebFOCUS Worksheet already.
Dollar is expensive for brazilians, U$1 is around R$3.6

;(

BTW, our President was replaced today. I hope the economy become better!


WebFOCUS 8.1.05 / APP Studio
 
Posts: 272 | Location: Brazil | Registered: October 31, 2006Report This Post
Master
posted Hide Post
After stealing from GavinL, I came up with this:

-SET &DT_BOY = &DATEYY;

TABLE FILE CAR
SUM
     CAR.BODY.SALES
BY  CAR.ORIGIN.COUNTRY AS 'This is &DT_BOY' 
BY  CAR.COMP.CAR
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
END
-RUN


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
 
Posts: 594 | Location: Michigan | Registered: September 04, 2015Report This Post
Member
posted Hide Post
The problem is I want the month name? The fact that I am even asking this is crazy. I have used 4 differnt BI tools and this is certainly the most difficult to accomplis the simpliest tasks.

I need something like...

-SET &MONTH_NAME = ????


TABLE FILE CAR
SUM
CAR.BODY_SALES AS '&MONTH_NAME'
END
-RUN
 
Posts: 15 | Registered: April 12, 2016Report This Post
Silver Member
posted Hide Post
This thread raises several Date related questions. I will try to assist in as many as I can.

DATE COMPLICATION: Because WebFOCUS connects to virtually all database systems, they support many different date formats. These include Alphanumeric dates, Integer dates (Packed and Floating point and Double precision as well). As a general rule the above formats will respect the year component when sorting ONLY when the year is first in the format.
As advanced date components, WebFOCUS supports SmartDate (aka Date) and DateTime formats. These are stored internally as some form of elapsed days with a decimal value for the Time component. As a result they are sorted correctly no matter where the year component is displayed.
FUNCTION USE: There are different functions for each date format. You must use the correct function for the format used (note in 8.1.05 several function are introduced the work with both SmartDate and DateTime formats).
EMBEDDING FIELD values: Column titles can not display embedded fields. You can accomplish this if the date is a sort value and then embedding the field in a SUBHEAD or SUBFOOT.
DIALOGUE MANAGER: DM variable are resolves at the time the focexec is compiled. They do not change with sort breaks.
Good luck to all.



WebFOCUS 8.0.2, FOCUS since 1977 - John@Aviter.com
PDF , Excel, FOCUS, Author of the Keysheets and Dates book.
www.Aviter.com
 
Posts: 40 | Registered: April 19, 2013Report 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]Column Alias

Copyright © 1996-2020 Information Builders