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 a problem with my graph and I think it is the HEADING! I have the opportunity to pass parameters for &S and &E in two ways. I could choose a radio button with the parameter "AW","AT", etc. or I could pass it in a textfield, e.g. "2005-01-01" till "2005-01-03". The first example works well but in the second way it does not work. If I delete the whole HEADING, it all works. What can I do with my heading that it works?
Thanks for help, Katy
-SET &S = IF &KZ EQ 'AW' THEN WStart ELSE - IF &KZ EQ 'AT' THEN TStart ELSE - IF &KZ EQ 'AM' THEN MStart ELSE - IF &KZ EQ 'AQ' THEN QStart ELSE - IF &KZ EQ 'AJ' THEN JStart ELSE - IF &KZ EQ 'VW' THEN VorWStart ELSE - IF &KZ EQ 'VM' THEN VorMStart ELSE - IF &KZ EQ 'VQ' THEN VorQStart ELSE - IF &KZ EQ 'VJ' THEN VorJStart; -SET &E = IF &KZ EQ 'AW' THEN WEnde ELSE - IF &KZ EQ 'AT' THEN TStart ELSE - IF &KZ EQ 'AM' THEN MEnde ELSE - IF &KZ EQ 'AQ' THEN QEnde ELSE - IF &KZ EQ 'AJ' THEN JEnde ELSE - IF &KZ EQ 'VW' THEN VorWEnde ELSE - IF &KZ EQ 'VM' THEN VorMEnde ELSE - IF &KZ EQ 'VQ' THEN VorQEnde ELSE - IF &KZ EQ 'VJ' THEN VorJEnde;
-SET &S = IF &bzrvon EQ '' THEN &S ELSE EDIT(&bzrvon,'9999$99$99'); -SET &E = IF &bzrbis EQ '' THEN &E ELSE EDIT(&bzrbis,'9999$99$99');
...
GRAPH FILE WG_VIEW_KD_PERFORMANCE HEADING " " "TEAM: &myteams BASE PERIOD: <&S bis <&E GENERATION: &generation at &TOD.EVAL o`clock"; SUM &KENNZAHL AS 'COUNT' ACROSS myDATUM AS 'DATE' BY TEAM AS 'TEAM' WHERE ((myDATUM GE &S) AND (myDATUM LE &E)) &T.EVAL; ON GRAPH SET LOOKGRAPH VLINE ON GRAPH SET VAXIS 440 ON GRAPH SET HAXIS 700 ON GRAPH SET GRAPHEDIT SERVER ON GRAPH SET BARNUMB OFF ON GRAPH SET 3D OFF ON GRAPH SET GRMERGE ON ON GRAPH SET VZERO ON ON GRAPH SET GRID ON ON GRAPH SET GRAPHSTYLE * setSeriesType(0,2); setLegendDisplay(true); setLegendPosition(2); setUseSeriesShapes(false); setDepthRadius(0); setConnectLineMarkers(true); setConnectScatterMarkers(true); setO1LabelDisplay(true); setO1AxisSide(0); setO1MajorGridDisplay(true); setO1MajorGridStyle(0); setO1MinorGridDisplay(false); setY1LabelDisplay(true); setY1AxisSide(0); setTextFormatPreset(getY1Label(),1); setY1MajorGridDisplay(true); setY1MajorGridStyle(0); setY1MinorGridDisplay(false); setFontSize(getO1Label(),12); setFontSizeAbsolute(getO1Label(),true); setPlace(true); new Color(255,0,0)); ENDSTYLE ON GRAPH SET STYLE * TYPE=HEADING, SIZE =10,STYLE=BOLD, COLOR=NAVY, $ ENDSTYLE ON GRAPH HOLD AS ITEM1 FORMAT HTMTABLE END
katy,the question is 'where is your error'; i suspect that your error has nothing to do with all the code you've put it, but rather in your &var setup; just insert a -TYPE &S &E after each of your setting methods, and have a look at them. Howver, this syntax troubles me: -SET &S = IF &KZ EQ 'AW' THEN WStart ELSE I would expect WStart to be an &var and not a fieldname. eg IF &KZ EQ 'AW' THEN &WStart ELSE or a constant IF &KZ EQ 'AW' THEN 'WStart' ELSE or , if you want this header element to reference a field name in your report, then IF &KZ EQ 'AW' THEN '<WStart' ELSE would take a BY field named WStart from the report and place it in your header.
In your 2nd example, you've actually set your &S to a constant, an edit of some other &var. So i suspect that's the one that works. Any help?
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
I wanted to make variables out of them but then I have problems with DATEADD and DATEMOV... My problem is that when I do not have the clause HEADING " " "TEAM: &myteams BASE PERIOD: <&S bis <&E GENERATION: &generation at &TOD.EVAL o`clock", I have no problems with the showing of the graph, but when I have this heading in my code, I do not have shown a graph when I pass the parameters &bzrvon and &bzrbis. This is why I think the bug is in the heading?!
-SET &S = IF &KZ EQ 'AW' THEN WStart ELSE - IF &KZ EQ 'AT' THEN TStart ELSE - IF &KZ EQ 'AM' THEN MStart ELSE - IF &KZ EQ 'AQ' THEN QStart ELSE - IF &KZ EQ 'AJ' THEN JStart ELSE - IF &KZ EQ 'VW' THEN VorWStart ELSE - IF &KZ EQ 'VM' THEN VorMStart ELSE - IF &KZ EQ 'VQ' THEN VorQStart ELSE - IF &KZ EQ 'VJ' THEN VorJStart; -SET &E = IF &KZ EQ 'AW' THEN WEnde ELSE - IF &KZ EQ 'AT' THEN TStart ELSE - IF &KZ EQ 'AM' THEN MEnde ELSE - IF &KZ EQ 'AQ' THEN QEnde ELSE - IF &KZ EQ 'AJ' THEN JEnde ELSE - IF &KZ EQ 'VW' THEN VorWEnde ELSE - IF &KZ EQ 'VM' THEN VorMEnde ELSE - IF &KZ EQ 'VQ' THEN VorQEnde ELSE - IF &KZ EQ 'VJ' THEN VorJEnde;
-SET &S = IF &bzrvon EQ '' THEN &S ELSE EDIT(&bzrvon,'9999$99$99'); -SET &E = IF &bzrbis EQ '' THEN &E ELSE EDIT(&bzrbis,'9999$99$99');
GRAPH FILE WG_VIEW_KD_PERFORMANCE HEADING "TEAM: &myteams BASE PERIOD: <&S bis <&E GENERATION: &generation at &TOD.EVAL o`clock" SUM &KENNZAHL AS 'COUNT' ACROSS myDATUM AS 'DATE' BY TEAM AS 'TEAM' WHERE ((myDATUM GE &S) AND (myDATUM LE &E)) &T.EVAL;
This is a revisit of one of your earlier problems in which you are trying to set a heading to either a FIELD or a constant. You can't do it with the code you have, but change it to the following and it should function as you would like -
-SET &S = IF &bzrvon EQ '' THEN &S ELSE BZRVON; -SET &E = IF &bzrbis EQ '' THEN &E ELSE BZRBIS;
DEFINE FILE WG_VIEW_KD_PERFORMANCE BZRVON/A8YYMD = EDIT(&bzrvon,'9999$99$99'); BZRBIS/A8YYMD = EDIT(&bzrbis,'9999$99$99'); END
GRAPH FILE WG_VIEW_KD_PERFORMANCE HEADING " " "TEAM: &myteams BASE PERIOD: <&S bis <&E
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
I have tried your example but this also does not work. Then I have shown no graph ... But you are right, it should be the same as my earlier problem. I do not know why this does not work?!
And in my heading I would have BASE PERIOD: "TStart" bis "TStart" and so on, but I want the correct date.
i have tried all these things but it does not work?! It always works if I choosed the radio Button with the values "AW" or "AT" but not if I filled in dates in &bzrvon and &bzrbis.
GRAPH FILE WG_VIEW_KD_PERFORMANCE HEADING "TEAM: &myteams BASE PERIOD: <&S.EVAL bis <&E.EVAL GENERATION: &generation at &TOD.EVAL o`clock" SUM &KENNZAHL AS 'COUNT' ACROSS myDATUM AS 'DATE' BY TEAM AS 'TEAM' WHERE ((myDATUM GE &S) AND (myDATUM LE &E)) &T.EVAL;
I have tried this before but it does not work. If I change &bzrvon to BZRVON than my graph is always not shown. I give you my code again to see where the problem is?
DEFINE FILE WG_VIEW_KD_PERFORMANCE BZRVON/YYMD = '&bzrvon.EVAL'; BZRBIS/YYMD = '&bzrbis.EVAL'; END ... -SET &S = IF &KZ EQ 'AW' THEN WStart ELSE - IF &KZ EQ 'AT' THEN TStart ELSE - IF &KZ EQ 'AM' THEN MStart ELSE - IF &KZ EQ 'AQ' THEN QStart ELSE - IF &KZ EQ 'AJ' THEN JStart ELSE - IF &KZ EQ 'VW' THEN VorWStart ELSE - IF &KZ EQ 'VM' THEN VorMStart ELSE - IF &KZ EQ 'VQ' THEN VorQStart ELSE - IF &KZ EQ 'VJ' THEN VorJStart; -SET &E = IF &KZ EQ 'AW' THEN WEnde ELSE - IF &KZ EQ 'AT' THEN TStart ELSE - IF &KZ EQ 'AM' THEN MEnde ELSE - IF &KZ EQ 'AQ' THEN QEnde ELSE - IF &KZ EQ 'AJ' THEN JEnde ELSE - IF &KZ EQ 'VW' THEN VorWEnde ELSE - IF &KZ EQ 'VM' THEN VorMEnde ELSE - IF &KZ EQ 'VQ' THEN VorQEnde ELSE - IF &KZ EQ 'VJ' THEN VorJEnde; ... -SET &S = IF &bzrvon EQ '' THEN &S ELSE EDIT(BZRVON,'9999$99$99'); -SET &E = IF &bzrbis EQ '' THEN &E ELSE EDIT(BZRBIS,'9999$99$99'); ... GRAPH FILE WG_VIEW_KD_PERFORMANCE HEADING " " "TEAM: &myteams KZ: &mykz BASE PERIOD: <&S.EVAL bis <&E.EVAL GENERATION: &generation at &TOD.EVAL o`clock" SUM &KENNZAHL AS 'COUNT' ACROSS myDATUM AS 'DATE' BY TEAM AS 'TEAM' WHERE ((myDATUM GE &S) AND (myDATUM LE &E)) &T.EVAL;
... -SET &S = IF BZRVON EQ '' THEN &S ELSE EDIT(BZRVON,'9999$99$99'); -SET &E = IF BZRBIS EQ '' THEN &E ELSE EDIT(BZRBIS,'9999$99$99'); ...
but although &bzrvon and &bzrbis are ' ' it goes into the ELSE clause and makes WHERE ((myDATUM GE BZRVN ) AND (myDATUM LE BZRBS )) Why does it go into the ELSE clause when BZRVON and BZRBIS are ' '?
The problem is in the final SET for the S and E variables -
... -SET &S = IF &bzrvon EQ '' THEN &S ELSE EDIT(BZRVON,'9999$99$99'); -SET &E = IF &bzrbis EQ '' THEN &E ELSE EDIT(BZRBIS,'9999$99$99'); ...
This should be -
... -SET &S = IF &bzrvon EQ '' THEN &S ELSE 'BZRVON'; -SET &E = IF &bzrbis EQ '' THEN &E ELSE 'BZRBIS'; ...
The conversion to a displayable date format is controlled within the DEFINE.
Basically, what you were trying to do was to control the HEADING to use either the contents of a date field or a variable value i.e. different entities. WebFOCUS doesn't like the HEADING you were using because the entities were different.
What the changes do (e.g. the DEFINE and the SET) is to provide the same entity type in your HEADING so that WebFOCUS won't complain and fail. The best(?) way to do this was to make the value of &S and &E a field name in all cases.
Tony
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Analyzing your code, your start date variable, &S resolves to either a. the name of a variable -- WStart, etc. -- if &bzrvon is blank, or b. a date constant, if &bzrvon is non-blank. Similarly for the end date, &E.
In the former case, the <&S spot marker in the heading resolves to, say, <WStart which is fine - it imbeds the value of WStart.
In the latter case, <&S yields something like <20050922 which means "tab to position 20,050,922 of the heading line" - you see the point?
Adjust the DM code to conditionally include the "<":
-SET &sd = IF &bzrvon EQ ' ' THEN '<' | &S ELSE EDIT{&bzrvon,'9999$99$99'}; -SET &ed = IF &bzrbis EQ ' ' THEN '<' | &E ELSE EDIT{&bzrbis,'9999$99$99'};
GRAPH ... HEADING ... "... BASE PERIOD: &sd bis &ed ..."
BTW, what is that ";" doing after the heading?
Note: {} represent parens.
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005