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.
-SET &foot0 = IF &Policy_Year_From EQ _FOC_NULL THEN 'Policy Year From.....: All' ELSE 'Policy Year From....: ' | &Policy_Year_From; -SET &foot1 = IF &Policy_Year_To EQ _FOC_NULL THEN 'Policy Year To.......: All' ELSE 'Policy Year To......: ' | &Policy_Year_To; -SET &foot2 = IF &Date_of_Loss_From EQ _FOC_NULL THEN 'Date of Loss From....: All' ELSE 'Date of Loss_From...: ' | &Date_of_Loss_From; -SET &foot3 = IF &Date_of_Loss_To EQ _FOC_NULL THEN 'Date of Loss To......: All' ELSE 'Date of Loss_To.....: ' | &Date_of_Loss_To; -SET &foot4 = IF &Type_of_Loss EQ _FOC_NULL THEN 'Type of Loss.........: All' ELSE 'Type of Loss........: ' | &Type_of_Loss; -SET &foot5 = IF &Function EQ _FOC_NULL THEN 'Function.............: All' ELSE 'Function............: ' | &Function; -SET &foot6 = IF &BusinessUnit EQ _FOC_NULL THEN 'Business Unit........: All' ELSE 'Business Unit.......: ' | &BusinessUnit; -SET &foot7 = IF &Region EQ _FOC_NULL THEN 'Region...............: All' ELSE 'Region..............: ' | &Region; -SET &foot8 = IF &P_MO_Desc EQ _FOC_NULL THEN 'Primary Modus Desc...: All' ELSE 'Primary Modus Desc..: ' | &P_MO_Desc; -SET &foot9 = IF &S_Mo_Desc EQ _FOC_NULL THEN 'Seconday Modus Desc..: All' ELSE 'Secondary Modus Desc: ' | &S_Mo_Desc; -* File: IBFS:/infwfdev7-devmb02/WFC/Repository/devmb02/Crime_Reports/Chart2.fex Created by WebFOCUS AppStudio -*IA_GRAPH_BEGIN -*Do not delete or modify the comments below *-INTERNAL_COMMENT LINE#0 *-INTERNAL_COMMENT LINE#1 -*Do not delete or modify the comments above ENGINE INT CACHE SET ON -DEFAULTH &WF_STYLE_UNITS='PIXELS'; -DEFAULTH &WF_STYLE_HEIGHT='405.0'; -DEFAULTH &WF_STYLE_WIDTH='770.0'; -DEFAULTH &WF_TITLE='WebFOCUS Report'; GRAPH FILE crime -* Created by Info Assist for Graph SUM CRIME.SELECTN.TOT_LOSS_AMT AS 'TOTAL, LOSS AMOUNT' &SORTBY1LINE WHERE -*( COMPANY_CD EQ '&COMPANY_CD') AND ( CRIME.POLYR.POLICY_YR GE '&Policy_Year_From' ) AND ( CRIME.POLYR.POLICY_YR LE '&Policy_Year_To' ) AND ( CRIME.SELECTN.DATE_OF_LOSS GT '&Date_of_Loss_From') AND ( CRIME.SELECTN.DATE_OF_LOSS LE '&Date_of_Loss_To') AND ( KIND_LOSS EQ '&Type_of_Loss') AND ( CRIME.SELECTN.INCDNT_STATE EQ '&State') AND ( CORP_LEVEL1 EQ '&Function') AND ( CORP_LEVEL2 EQ '&BusinessUnit') AND ( CORP_LEVEL3 EQ '&Region') AND ( CORP_LEVEL4 EQ '&Area') AND ( CORP_LEVEL5 EQ '&Level5') AND ( LOC_NAME EQ '&Location_Name') AND ( LOCATION_CD EQ '&Location_Code') AND ( CAUSITIV_DES EQ '&Caustiv_Des') AND ( P_MO_DESC EQ '&P_MO_Desc') AND ( S_MO_DESC EQ '&S_Mo_Desc') AND ( S_OPEN_DESC EQ '&Safe_Open');
ON GRAPH PCHOLD FORMAT JSCHART ON GRAPH SET VZERO OFF ON GRAPH SET HTMLENCODE ON ON GRAPH SET GRAPHDEFAULT OFF ON GRAPH SET GRWIDTH 1 ON GRAPH SET UNITS &WF_STYLE_UNITS ON GRAPH SET HAXIS &WF_STYLE_WIDTH ON GRAPH SET VAXIS &WF_STYLE_HEIGHT ON GRAPH SET GRMERGE ADVANCED ON GRAPH SET GRMULTIGRAPH 0 ON GRAPH SET GRLEGEND 1 ON GRAPH SET GRXAXIS 0 ON GRAPH SET LOOKGRAPH VBAR ON GRAPH SET AUTOFIT ON ON GRAPH SET STYLE * *GRAPH_SCRIPT setPieDepth(0); setPieTilt(0); setDepthRadius(0); setCurveFitEquationDisplay(false); setPlace(true); *END INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$ TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $ TYPE=FOOTING, JUSTIFY=LEFT, FONT='CALIBRI', SIZE=8, COLOR=RGB(66 70 73), STYLE=BOLD, $ *GRAPH_SCRIPT setReportParsingErrors(false); setSelectionEnableMove(false); setDataTextPosition(4); setDataTextDisplay(true); setTextRotation(getO1Label(),1); *END ENDSTYLE END -RUN
-*IA_GRAPH_FINISHThis message has been edited. Last edited by: Tamra,
Does this happen when you attempt to open the report in the GUI?
If so, my guess is that the GUI dos not like the variable embedded in the code - at least not with this simple syntax - it probably needs stuff around it to make the GUI recognize it as a BY variable.
...
SUM CRIME.SELECTN.TOT_LOSS_AMT AS 'TOTAL, LOSS AMOUNT'
&SORTBY1LINE
WHERE
...
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
Consider the syntax generated when selecting multiple sort fields within a report and try and apply it to your chart. This allows &variables to be used in a BY phrase so might be permissible within the CHART GUI?
If you have no idea what I mean, then create a new procedure and a new report within that procedure. Choose GGSALES as the synonym and click FINISH.
Now add Category, Product, Region, City and Dollars to your report, with the first 4 columns as sort fields.
Now select the 4 sort fields in the report pane by clicking and holding the shift key. With them all highlighted, click the "data" menu item and look for the "Generate Parameter Group" icon. Click the down arrow and choose "One variable for all selected columns".
Now inspect the code generated and you will see the following in place of multiple BY phrases -
BY &RP_FN01B_Sort1.(BY(<Category,CATEGORY>,<Product,PRODUCT>,<Region,REGION>,<City,CITY>)).Please select sort field(s).
Running this will allow the end user to select "All values", but if you want to restrict them to just one field then change the code as follows -
BY &RP_FN01B_Sort1.(-*(<Category,CATEGORY>,<Product,PRODUCT>,<Region,REGION>,<City,CITY>)).Please select sort field(s).
This essentially comments out the additional sort fields when "All values" is selected and results in only the first sort field being used - not sure how correct and acceptable this is, but it works! If it breaks in future then you will need to deal with that at that point!!
If you run the report then you will see how this "special" variable works and how my "amendment" of it works
Now try taking the &variable code and apply it within your chart. I will not guarantee that it will allow you to open the chart in the GUI as it fails!! to no surprise. However, it will work OK and if you front it with an HTML page then you can hide the "All values" prompt as well.
Try it!
ENGINE INT CACHE SET ON
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
-SET &ECHO = ALL;
GRAPH FILE ggsales
-* Created by Info Assist for Graph
SUM GGSALES.SALES01.DOLLARS
BY &RP_FN01B_Sort1.(-* (<Category,CATEGORY>,<Product,PRODUCT>,<Region,REGION>,<City,CITY>)).Please select sort field(s).
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
*END
INCLUDE=endeflt.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
*END
ENDSTYLE
END
-RUN
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004