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.
I have the following graph code but I am trying to figure out how to use a variable/function that will return current year instead of hardcoding '2009' in the report. And I don't want the user to be prompted.
Please can someone help?This message has been edited. Last edited by: umun,
-SET &CYEAR=EDIT(&YYMD,'9999'); GRAPH FILE RETAIL SUM __OVER_30_DAYS_DELNQNT ACROSS MONTH1 BY ORGANISATION WHERE ( CONVT_TO_CRRNCY EQ 'EUR' ) AND ( YEAR1 EQ '&CYEAR' );
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
Hi GamP, You are too much! It worked. Thank you very much. The next stage of my project is to display the graph for current month and last 3 months.
Please, can you let me know how to get the current month (e.g if December is current month, the value should be '122009'. if July, value= '072009') and how to get the last 3 months.
Thank you.This message has been edited. Last edited by: umun,
Hi GamP, You are too much! It worked. Thank you very much. The next stage of my project is to display the graph for current month and last 3 months.
Please, can you let me know how to get the current month (e.g if December is current month, the value should be '122009'. if July, value= '072009') and how to get the last 3 months.
Thank you.[/QUOTE]
I am able to get current month now with -SET &CMONTH=EDIT(&DMYY,'$$999999');
I am still working on getting last three months. Any idea?
ThanksThis message has been edited. Last edited by: umun,
TABLE FILE WHOLESALE PRINT TOTAL_STOCK_IN_CT/I11S AS 'STOCK_IN_CT' CURRENT_DT INITIAL_DT TEST_DT BY COUNTRY1 BY NEW_USED1 BY FIN_PLAN_MARKETING_DESC1 BY MONTH1 -*ACROSS MONTH1 ON COUNTRY1 SUBTOTAL AS '*TOTAL' WHERE ( MONTH1 GE '092009' ); ON TABLE SET PAGE-NUM OFF ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLCSS ON
The task is to get report for the last 3 months. The source data is from cube and the month value is in mmyyyy format (e.g for sept, value is 092009). With the WHERE CLAUSE above( MONTH1 GE '092009'), the code returns the correct value. But the plan is not to hardcode the initial month as it will be changing.
The DEFINE fields CURRENT_DT, INITIAL_DT and TEST_DT above have 2009/12/10, 092009 and Sep, 2009 values respectively for sept 2009 (an example). But when I used INITIAL_DT in the WHERE clause (MONTH1 GE 'INITIAL_DT' ), I get the following error:
********** 0 ERROR AT OR NEAR LINE 23 IN PROCEDURE homepage_wh (FOC006) THE FORMAT OF THE TEST VALUE IS INCONSISTENT WITH FIELD FORMAT: INITIAL_DT BYPASSING TO END OF COMMAND (FOC009) INCOMPLETE REQUEST STATEMENT **********
Please, can someone help me find out whats wrong and/or solution?
I don't have access to run WF anymore but I think you need to remove the | in your date format... INITIAL_DT/M|YY the slashes should appear automatically due to smart date
------------------------------------------ last version used: v7.1; truly miss the wonderful things I did with WebFOCUS, HTML, & JavaScript.
Posts: 36 | Location: Rolling Meadows, IL | Registered: September 05, 2007
You should always do your date tests against literal dates as opposed to defined fields. Here is an example of how to calculate 3 months paste, though depending on what you really want you might want to subtract 4 instead of 3:
Originally posted by GinnyJakes: You should always do your date tests against literal dates as opposed to defined fields. Here is an example of how to calculate 3 months paste, though depending on what you really want you might want to subtract 4 instead of 3:
Thank you Ginny. It worked perfectly. I appreciate your assistance.
The only issue is that when I use ACCROSS keyword on MONTH1, the data values does not display in a staight line. Please, do know the reason? the sample code is:
TABLE FILE WHOLESALE PRINT TOTAL_STOCK_IN_CT/I11S AS '' BY COUNTRY1 BY NEW_USED1 BY FIN_PLAN_MARKETING_DESC1 ACROSS MONTH1 ON COUNTRY1 SUBTOTAL AS '*TOTAL'
It displays like the following (in a slanting position):
It's not that odd ... PRINT means to show one line per individual record - and that's exactly what's happening. With SUM you specify to roll up all detail records to the first aggregate level (BY of ACROSS) and by doing that the across values will also be printed on the same line.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
I have tried both SUM and PRINT but the values/measures still do not come in a straight line. One of my colleagues just told me that it's a known webFocus issue and that informationbuilders are working on it.
No. You've just got some additional sort level that is preventing the row from being aggregated at the level you want. It isn't a WebFOCUS "issue". It's just standard functionality based on how you've coded it. You'll have to use a SUM with fewer BY fields.
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007