Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [Solved] Display Embedded Thumbnails in 8202

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Solved] Display Embedded Thumbnails in 8202
 Login/Join
 
Member
posted
Hi FP,

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,


Dan B.
WebFocus 8205M
 
Posts: 25 | Registered: May 18, 2017Report This Post
Expert
posted Hide Post
I wonder if you can hold the image (assuming its a gif or jpg), then use SET HTMLFORMTYPE = GIF|JPG and -HTMLFORM {holdname}

Or use EDAGET, do a search of the forum for some examples.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
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 :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Expert
posted Hide Post
Dan,

How about using developers tools in your browser to locate the image within the BIP and maybe use the URL used to render the image there?

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, 2004Report This Post
Guru
posted Hide Post
Here is a working example with CAR:

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

Check what is in your BLOB (base64 encoded?)


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 454 | Location: Europe | Registered: February 05, 2007Report This Post
Expert
posted Hide Post
FocalPointers, the original post mentions
quote:
the image doesn't actually display in Chrome or FireFox
Does this mean it worked in another web browser, Internet Explorer, for example?


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
I tried Frans's example and it displays a red dot in Internet Explorer and a place-holder icon in Chrome.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Guru
posted Hide Post
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.

Would be worth opening a case for this.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 454 | Location: Europe | Registered: February 05, 2007Report This Post
Expert
posted Hide Post
Dan,

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


T

This 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, 2004Report This Post
Member
posted Hide Post
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

Thank you all for the help!

I'll update the thread subject to "solved"


Dan B.
WebFocus 8205M
 
Posts: 25 | Registered: May 18, 2017Report This Post
Expert
posted Hide Post
Good to know it helped Dan. Sometimes an indirect method sorts the day.

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, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [Solved] Display Embedded Thumbnails in 8202

Copyright © 1996-2020 Information Builders