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'd like to create a report that displays the embedded thumbnail of selected reports/charts in 8202.
The image appears to be stored as a BLOB in WF_OBJPROPSEX. We use a Postgres DB for the repository so BLOBs are supported fine.
This help doc walks through how to display a BLOB in a fex: Display BLOB
Using that help doc, I wrote the following fex. The handle could be swapped to any handle in your repository to give it a try.
The output "almost" works but the image doesn't actually display in Chrome or FireFox. I get a reserved image space and a generic "your image didn't load" graphic. Has anyone gotten this to work? Does anyone see issues with my syntax?
Thanks for your help (in advance)!
-* Display BLOB image in HTML report
TABLE FILE WF_OBJPROPSEX
PRINT PROPERTY PROPVALUE AS 'PICTURE'
BY PROPERTY
BY OBJ_HANDLE
WHERE OBJ_HANDLE EQ 'aa55c4b9_bdb6_4c44_b335_1453a888e630';
ON TABLE SET PAGE NOPAGE
-**************************
-* Lines between asterisk lines required for BLOB image support
-* for HTML and DHTML formats.
ON TABLE SET HTMLEMBEDIMG AUTO
-* Required to support IE8 with images larger than 32K
ON TABLE SET HTMLARCHIVE ON
-*Required for image positioning in subheads in HTML reports
ON TABLE SET HTMLCSS ON
-**************************
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
TYPE=REPORT,COLOR=BLUE,FONT=ARIAL, GRID=OFF,$
TYPE=HEADING, SIZE = 18, COLOR=RED,$
TYPE=DATA,COLUMN=PROPVALUE,IMAGE=(PROPVALUE),SIZE=(2 2),$
ENDSTYLE
END
This message has been edited. Last edited by: Dan Brooke,
What format are those images? I suspect they're not a web-format (GIF, PNG, JPEG), but rather something like BMP.
Alternatively, is the URL to the images correct? There are differences in how Internet Explorer resolves relative URI's and how standards compliant browsers do that.
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
SET BASEURL='' DEFINE FILE CAR IMG/A500='data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=='; END TABLE FILE CAR PRINT COUNTRY IMG ON TABLE SET PAGE NOPAGE ON TABLE SET HTMLEMBEDIMG OFF ON TABLE SET HTMLARCHIVE OFF ON TABLE SET HTMLCSS ON
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE * TYPE=REPORT,COLOR=BLUE,FONT=ARIAL, GRID=OFF,$ TYPE=HEADING, SIZE = 18, COLOR=RED,$ TYPE=DATA,COLUMN=IMG,IMAGE=(IMG),$ ENDSTYLE END
Hmm I see, apparantly webFOCUS makes a .gif suffix to the text, which is not accepted by Chrome. If you remove the .gif with developer tools you see a red dot in Chrome.
There are components in several tables (or so it appears) that you need to bring together to take advantage of the method used to display the images within the BIP ([server][port]/ibi_apps/).
The URL that is used is of the form "/ibi_apps/wfirs/ibfs/[path to object]?IBFS_action=getAssocImage&IBFS_epoc=[longnumber]"
It appears that you can obtain the necessary components as below in some sample code. It might require some refinement but it appears to give results.
JOIN CLEAR *
JOIN HANDLE IN WF_REPOSOBJ TAG T0 TO MULTIPLE OBJ_HANDLE IN WF_OBJPROPS TAG T1 AS J1
JOIN T1.OBJ_HANDLE IN WF_REPOSOBJ TO MULTIPLE OBJ_HANDLE IN WF_OBJPROPS TAG T2 AS J2
TABLE FILE WF_REPOSOBJ
SUM COMPUTE IMG/A500 = '<img src="/ibi_apps/wfirs/ibfs'||T0.PRT_PATH||'/'||T0.OBJNAME||'?IBFS_action=getAssocImage&|IBFS_epoc='||T1.PROPVALUE||'" />'; AS ''
BY T0.OBJNAME AS ''
WHERE T0.CLASSNAME EQ 'WfItem'
WHERE T1.PROPERTY IN ('ThumbnailDateTime'); -* provides the epoc value
WHERE T2.PROPERTY IN ('ThumbnailType'); -* limits the output to correct object type
-*WHERE HANDLE EQ '0011c317_552d_4195_863f_bf030f661ad2';
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
TYPE=REPORT,COLOR=BLUE,FONT=ARIAL, GRID=OFF,$
ENDSTYLE
END
TThis message has been edited. Last edited by: Tony A,
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
Tony A, your solution worked! This is a very elegant approach considering you use IBI's built in BLOB-rendering functions (instead of trying to do it in the fex) and also no need to join to the WF_OBJPROPSEX table.
To answer others and in case it helps the next person, the image I used were: -png/jpg -base64 encoded BLOB file