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.
Ihave report where i show up arrow if the difference between tow value is positive and if the diff is negative i show down arrow.
DEFINE FILE ACTIVITIES_DB
Defyear/YY=OFFICER_DAILY_DATE;
Defmonth/MT=OFFICER_DAILY_DATE;
Defmonthchar/A5V=IF Defmonth EQ 1 THEN 'JAN' ELSE IF Defmonth EQ 2 THEN 'FEB' ELSE IF Defmonth EQ 3 THEN 'MAR' ELSE IF Defmonth EQ 4 THEN 'APR' ELSE IF Defmonth EQ 5 THEN 'MAY' ELSE IF Defmonth EQ 6 THEN 'JUN' ELSE IF Defmonth EQ 7 THEN 'JUL' ELSE IF Defmonth EQ 8 THEN 'AUG' ELSE IF Defmonth EQ 9 THEN 'SEP' ELSE IF Defmonth EQ 10 THEN 'OCT' ELSE IF Defmonth EQ 11 THEN 'NOV' ELSE 'DEC';
FILE_CLASS_DASHBD_DESC/A75V=IF FILE_CLASS_DASHBD EQ '0900' THEN 'Homicide' ELSE IF FILE_CLASS_DASHBD EQ '1100' THEN 'Sexual Assault' ELSE IF FILE_CLASS_DASHBD EQ '1200' THEN 'Robbery' ELSE IF FILE_CLASS_DASHBD EQ '1300' THEN 'Assault' ELSE IF FILE_CLASS_DASHBD EQ '2200' THEN 'Burglary' ELSE IF FILE_CLASS_DASHBD EQ '2300' THEN 'Larceny' ELSE IF FILE_CLASS_DASHBD EQ '3500' THEN 'Drugs' ELSE IF FILE_CLASS_DASHBD EQ '5000' THEN 'Obstruction' ELSE IF FILE_CLASS_DASHBD EQ '54002' THEN 'OUI' ELSE IF FILE_CLASS_DASHBD EQ '93001' THEN 'Traffic Accident' ELSE LCWORD3( 75, FILECLASS_DESC, 'A75' );
FILE_CLASS_DASHBD/A5=IF FILE_CLASS_CODE EQ '54002' THEN '54002' ELSE IF FILE_CLASS_CODE EQ '93001' THEN '93001' ELSE EDIT( FILE_CLASS_CODE, '9999' );
VIOLENT_FLAG/I9=IF FILE_CLASS_DASHBD IN ( '1300', '1200', '1100', '900' ) THEN 1 ELSE 0;
UP_ARROW/A100V= '<img src="run.bip?|BIP_REQUEST_TYPE=BIP_RUN&|BIP_folder=IBFS%253A%252FEDA%252FEDASERVE%252Fimages%252Fscp&|BIP_item=uparrow.png&windowHandle=183439&|IBI_random=4146.954487762527" style="width:40px;height:40px;" >';
DOWN_ARROW/A100V='<img src="run.bip?BIP_REQUEST_TYPE=BIP_RUN&|BIP_folder=IBFS%253A%252FEDA%252FEDASERVE%252Fimages%252Fscp&|BIP_item=downarrow.png&windowHandle=896130&|IBI_random=9436.939050022374" style="width:40px;height:40px;>';
END
TABLE FILE ACTIVITIES_DB
SUM
-* CNT.ACTIVITIES_DB.ACTIVITIES_DB.ACTIVITY_ID
COMPUTE VAL1/I8 = CNT.ACTIVITY_ID;
COMPUTE VALACTIVITYID/A20V = FPRINT(VAL1, 'I8', 'A20V');
UP_ARROW
DOWN_ARROW
BY LOWEST ACTIVITY_TYPE_DESC
BY Defyear
BY TOTAL COMPUTE ROWLABEL/A20V = 'Year ' | EDIT(Defyear);
WHERE Defyear IN ('2016','2017');
-*WHERE FILECLASS_DESC EQ 'ROBBERY';
WHERE RECORDLIMIT EQ 1000000
WHERE READLIMIT EQ 10000000
WHERE DISTRICT EQ '1';
ON TABLE HOLD AS EXTDATA
-*ON TABLE PCHOLD FORMAT HTML
-*ON TABLE PCHOLD FORMAT HTML
END
-RUN
DEFINE FILE EXTDATA
SALES1/I8=IF Defyear EQ 2016 THEN VAL1 ELSE 0;
SALES2/I8=IF Defyear EQ 2017 THEN VAL1 ELSE 0;
END
TABLE FILE EXTDATA
-*ON TABLE PCHOLD FORMAT HTML
SUM
-*COMPUTE VALACTIVITYID/I8 = ( SALES2 - SALES1);
COMPUTE VAL/I8 = ( SALES2 - SALES1);
COMPUTE VALACTIVITYID1/A20V = FPRINT(VAL, 'I8', 'A20V');
COMPUTE VALACTIVITYID/A20V = IF VAL GT 0 THEN VALACTIVITYID1||UP_ARROW ELSE VALACTIVITYID1||DOWN_ARROW;
BY LOWEST EXTDATA.EXTDATA.ACTIVITY_TYPE_DESC
BY TOTAL COMPUTE Defyear/YY = 9999;
BY TOTAL COMPUTE ROWLABEL/A20V = 'Diff';
ON TABLE NOTOTAL
ON TABLE HOLD AS DIFFDATA
END
-RUN
-*-EXIT
TABLE FILE EXTDATA
SUM
EXTDATA.EXTDATA.VALACTIVITYID AS ''
BY LOWEST ACTIVITY_TYPE_DESC AS 'DETROIT'
ACROSS LOWEST EXTDATA.EXTDATA.Defyear NOPRINT
ACROSS EXTDATA.EXTDATA.ROWLABEL AS ''
ON TABLE NOTOTAL
ON TABLE SET STYLE *
INCLUDE = IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/combine_templates/ENblackbluepurple.sty,
$
ENDSTYLE
MORE
FILE DIFFDATA
END
-RUN
But the problem here is,the image is not displaying. It shows the image unavailable icon. I kept the image in EDA server one folder.This message has been edited. Last edited by: FP Mod Chuck,
WF8206,Windows 7,8,10 HTM,PDF,EXCEL
Posts: 229 | Location: MI | Registered: September 13, 2017
SET BASEURL = C:\IBI\APPS\DEMO\
DEFINE FILE CAR
FLAG/A12=
DECODE COUNTRY ( 'ENGLAND' 'IMG_1406.JPG' 'ITALY' 'IMG_1407.JPG'
'FRANCE' 'IMG_1408.JPG' 'JAPAN' 'IMG_1409.JPG' );
END
TABLE FILE CAR
PRINT FLAG
BY COUNTRY AS 'COUNTRY'
WHERE COUNTRY EQ 'JAPAN' OR 'ENGLAND'
ON TABLE SET PAGE-NUM OFF
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=DATA, IMAGE=(FLAG),COLUMN=FLAG, POSITION=(+1.5 +.60), SIZE=(.5 .5),$
TYPE=REPORT, GRID=OFF, $
TYPE=HEADING, SIZE=12, STYLE=BOLD, $
TYPE=SUBFOOT, STYLE=BOLD, $
ENDSTYLE
END
This message has been edited. Last edited by: Chaudhary,
You cannot have the value (COMPUTE VAL/I8 = ( SALES2 - SALES1) ) and the image in the same column (VALACTIVITYID1||UP_ARROW ELSE VALACTIVITYID1||DOWN_ARROW) They need to be two distinct columns.
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013
Hi.. Thanks MartinY.I made changes to the fex and added another hold file for the icon. Thanks to Chaudhary as well.
DEFINE FILE ACTIVITIES_DB
Defyear/YY=OFFICER_DAILY_DATE;
Defmonth/MT=OFFICER_DAILY_DATE;
Defmonthchar/A5V=IF Defmonth EQ 1 THEN 'JAN' ELSE IF Defmonth EQ 2 THEN 'FEB' ELSE IF Defmonth EQ 3 THEN 'MAR' ELSE IF Defmonth EQ 4 THEN 'APR' ELSE IF Defmonth EQ 5 THEN 'MAY' ELSE IF Defmonth EQ 6 THEN 'JUN' ELSE IF Defmonth EQ 7 THEN 'JUL' ELSE IF Defmonth EQ 8 THEN 'AUG' ELSE IF Defmonth EQ 9 THEN 'SEP' ELSE IF Defmonth EQ 10 THEN 'OCT' ELSE IF Defmonth EQ 11 THEN 'NOV' ELSE 'DEC';
FILE_CLASS_DASHBD_DESC/A75V=IF FILE_CLASS_DASHBD EQ '0900' THEN 'xxx' ELSE IF FILE_CLASS_DASHBD EQ '1100' THEN 'yyy' ELSE IF FILE_CLASS_DASHBD EQ '1200' THEN 'zzz' ELSE IF FILE_CLASS_DASHBD EQ '1300' THEN 'aaa' ELSE IF FILE_CLASS_DASHBD EQ '2200' THEN 'bbb' ELSE IF FILE_CLASS_DASHBD EQ '2300' THEN 'ccc' ELSE IF FILE_CLASS_DASHBD EQ '3500' THEN 'ddd' ELSE IF FILE_CLASS_DASHBD EQ '5000' THEN 'eee' ELSE IF FILE_CLASS_DASHBD EQ '54002' THEN 'fff' ELSE IF FILE_CLASS_DASHBD EQ '93001' THEN 'ggg' ELSE LCWORD3( 75, FILECLASS_DESC, 'A75' );
FILE_CLASS_DASHBD/A5=IF FILE_CLASS_CODE EQ '54002' THEN '54002' ELSE IF FILE_CLASS_CODE EQ '93001' THEN '93001' ELSE EDIT( FILE_CLASS_CODE, '9999' );
VIOLENT_FLAG/I9=IF FILE_CLASS_DASHBD IN ( '1300', '1200', '1100', '900' ) THEN 1 ELSE 0;
END
TABLE FILE ACTIVITIES_DB
SUM
COMPUTE VAL1/I8 = CNT.ACTIVITY_ID;
COMPUTE VALACTIVITYID/A100V = FPRINT(VAL1, 'I8', 'A100V');
BY LOWEST ACTIVITY_TYPE_DESC
BY Defyear
BY TOTAL COMPUTE ROWLABEL/A20V = 'Year ' | EDIT(Defyear);
WHERE Defyear IN ('2016','2017');
-*WHERE FILECLASS_DESC EQ 'ROBBERY';
WHERE RECORDLIMIT EQ 1000000
WHERE READLIMIT EQ 10000000
WHERE DISTRICT EQ '1';
ON TABLE HOLD AS EXTDATA
END
-RUN
DEFINE FILE EXTDATA
SALES1/I8=IF Defyear EQ 2016 THEN VAL1 ELSE 0;
SALES2/I8=IF Defyear EQ 2017 THEN VAL1 ELSE 0;
END
TABLE FILE EXTDATA
-*ON TABLE PCHOLD FORMAT HTML
-*COMPUTE VALACTIVITYID/I8 = ( SALES2 - SALES1);
-*COMPUTE VALACTIVITYID1/A20V = FPRINT(VAL, 'I8', 'A20V');
-*COMPUTE VALACTIVITYID/A20V = IF VAL GT 0 THEN VALACTIVITYID1||UP_ARROW ELSE VALACTIVITYID1||DOWN_ARROW;
SUM
COMPUTE VAL/I8 = ( SALES2 - SALES1 );
COMPUTE VALACTIVITYID/A100V = FPRINT(VAL, 'I8', 'A100V');
-*COMPUTE ICON/A100V = IF ( SALES2 - SALES1 ) GT 0 THEN EXTDATA.EXTDATA.UP_ARROW ELSE EXTDATA.EXTDATA.DOWN_ARROW;
BY LOWEST EXTDATA.EXTDATA.ACTIVITY_TYPE_DESC
BY TOTAL COMPUTE Defyear/YY = 9999;
BY TOTAL COMPUTE ROWLABEL/A20V = 'Diff';
ON TABLE NOTOTAL
ON TABLE HOLD AS DIFFDATA
END
-RUN
-*-EXIT
DEFINE FILE DIFFDATA
UP_ARROW/A100V = '<img src="/approot/images/fd1/uparrow.png" style="width:40px;height:40px;">';
DOWN_ARROW/A100V= '<img src="/approot/images/fd1/downarrow.png" style="width:40px;height:40px;">';
END
TABLE FILE DIFFDATA
SUM
COMPUTE VALACTIVITYID/A100V = IF DIFFDATA.DIFFDATA.VAL GT 0 THEN UP_ARROW ELSE DOWN_ARROW;
BY LOWEST DIFFDATA.DIFFDATA.ACTIVITY_TYPE_DESC
BY TOTAL COMPUTE Defyear/YY = 9999;
BY TOTAL COMPUTE ROWLABEL/A20V = 'Icon';
ON TABLE NOTOTAL
ON TABLE HOLD AS DIFFICON
END
-RUN
TABLE FILE EXTDATA
SUM
EXTDATA.EXTDATA.VALACTIVITYID AS ''
BY LOWEST EXTDATA.EXTDATA.ACTIVITY_TYPE_DESC AS 'CITY1'
ACROSS LOWEST EXTDATA.EXTDATA.Defyear NOPRINT
ACROSS EXTDATA.EXTDATA.ROWLABEL AS ''
ON TABLE NOTOTAL
ON TABLE SET STYLE *
INCLUDE = IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/combine_templates/ENblackbluepurple.sty,
$
ENDSTYLE
MORE
FILE DIFFDATA
MORE
FILE DIFFICON
END
-RUN
This fex works
WF8206,Windows 7,8,10 HTM,PDF,EXCEL
Posts: 229 | Location: MI | Registered: September 13, 2017