Focal Point
[SOLVED] Embedding image in a Column FORMAT HTMTABLE

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3367067406

June 01, 2011, 04:46 AM
ChristianP
[SOLVED] Embedding image in a Column FORMAT HTMTABLE
Hello,

is it possible to embed an image to a column depending on a value in the output format HTMTABLE??

Christian

This message has been edited. Last edited by: ChristianP,


WF Production Version: 7.7.02M
WF Test Version: 7.7.02M
Developer Studio: 7.7.02
HTML, EXL2K, FLEX, PDF,PPT
June 01, 2011, 06:19 AM
<JG>
Quite straight forward Christian

create a COMPUTE or DEFINE

The images should reside on the apppath

change /appname/ to the name of your app folder

The concatenated column SRC should contain the actual file name i.e. image.gif
This could come from your data or be a defined or computed column

 
TABLE FILE CAR
SUM   
     COMPUTE SRC/A25= IF DEALER_COST LE 4000 THEN 'red.gif' ELSE
                        IF DEALER_COST LE 5000 THEN 'yellow.gif' ELSE 'green.gif'; NOPRINT

     COMPUTE IMAGE/A200 = '<img src="/approot/appname/' || SRC ||'"  style="width:25px; height:25px;" >'; AS ''
     DEALER_COST
     RETAIL_COST
BY COUNTRY
BY MODEL
BY CAR
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTMTABLE
ON TABLE SET STYLE *
$

ENDSTYLE
END
-RUN
-HTMLFORM BEGIN
!IBI.FIL.REPORT;
-HTMLFORM END

June 06, 2011, 04:31 AM
ChristianP
Hello JG,

your solution works great!!!! we pointed a drilldown on the image, now we have a blue border around the image. how can we avoid this behavior??

Christian


WF Production Version: 7.7.02M
WF Test Version: 7.7.02M
Developer Studio: 7.7.02
HTML, EXL2K, FLEX, PDF,PPT
June 06, 2011, 06:44 AM
<JG>
Christian,

Basic html, add a border attribute to the style.

border:none;
June 06, 2011, 07:26 AM
ChristianP
Perfect!!! I think in most cases a beginner like me thinks too complicated!!
Christian


WF Production Version: 7.7.02M
WF Test Version: 7.7.02M
Developer Studio: 7.7.02
HTML, EXL2K, FLEX, PDF,PPT
June 28, 2011, 10:20 AM
bobjackson
Hi JG
That's really neat!
Can I do the same into Excel and PDF?
Bob


WebFocus 7.6.11
IBM iSeries
June 28, 2011, 11:01 AM
bobjackson
Hi again

Looks like Susannah solved the PDF version in 2007. If you search for "images in pdf report flag" you'll find it

Just need to do Excel now!

Bob


WebFocus 7.6.11
IBM iSeries