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.
Does anyone have any tricks to try and position and image in a cell? I opened a case and the official word is that it is not possible, but there might be some work arounds. Has anyone accomplished this?
Thanks,
Matt
DEFINE FILE CAR
DOT_GRN/A200 WITH CAR = '<img src="/ibi_html/vis/dot_grn.gif" alt="Cheap">';
DOT_RED/A200 WITH CAR = '<img src="/ibi_html/vis/dot_red.gif" alt="Zowie">';
DOT_YEL/A200 WITH CAR = '<img src="/ibi_html/vis/dot_yel.gif" alt="Okay">';
END
-*
TABLE FILE CAR
SUM DEALER_COST
COMPUTE REPORT_DOT2/A200 = IF DEALER_COST LT 6000 THEN DOT_GRN
ELSE IF DEALER_COST LE 12000 THEN DOT_YEL
ELSE DOT_RED; AS ''
BY CAR
BY MODEL
ON TABLE PCHOLD FORMAT EXL2K
END
This message has been edited. Last edited by: Kerry,
images are tricky b/c with webfocus they don't 'EMBED'; (they do EMBED with 'other products',); What i had to do, in order to create an order form with pictures of products, and control the height of the row, was trick it. TYPE=DATA,COLUMN=BLOCK,SIZE= &FONTSIZE ,COLOR=WHITE,$ i created a field called BLOCK which contained a '1' and made it huge in font size, and colored white. then the picture (you have it defined correctly, although i don't know whether the alt tag would work in excel).. comes as the next field. so the rows get adjusted in height according to the height of the 'BLOCK' field. It worked. It still allowed the pictures to float, a bad thing, and not sort. But it worked for us... until we switched products... IHTH
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
The method that I use to achieve this is to use a macro to embed the image.
For example
DEFINE FILE CAR
IMAGE/A10=DECODE MODEL(
'V12XKE AUTO' 'a.jpg'
'XJ12L AUTO' 'b.jpg'
'INTERCEPTOR III' 'c.jpg'
'TR7' 'd.jpg'
'B210 2 DOOR AUTO' 'e.jpg'
'COROLLA 4 DOOR DIX AUTO' 'f.jpg'
'2000 4 DOOR BERLINA' 'g.jpg'
'2000 GT VELOCE' 'h.jpg'
'2000 SPIDER VELOCE' 'i.jpg'
'DORA 2 DOOR' 'j.jpg'
'100 LS 2 DOOR AUTO' 'a.jpg'
'2002 2 DOOR' 'k.jpg'
'2002 2 DOOR AUTO' 'l.jpg'
'3.0 SI 4 DOOR' 'm.jpg'
'3.0 SI 4 DOOR AUTO' 'n.jpg'
'530I 4 DOOR' 'o.jpg'
'530I 4 DOOR AUTO' 'p.jpg'
'504 4 DOOR' 'q.jpg'
END
TABLE FILE CAR
PRINT CAR MODEL IMAGE
ON TABLE PCHOLD FORMAT EXL2K
END
This simply puts the name of the image in the cell in excel
The images must be in a folder available to the web server such as baseapp (all required images must exist otherwise it misplaces 1 of the images)
The macro code looks like this, it resolves and embeds the image in the cell and does a little positional adjustment on it
Sub Workbook_Open()
' stops the macro running a second time if it's saved
If SheetName <> "Sheet1" Then
' Skip Macro
Else
Sheets(1).Name = "another name"
Call FindAndInsertPicture
' stops people moving the images about
ActiveSheet.Protect Password:="password", DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
Sub FindAndInsertPicture()
On Error Resume Next
Dim ws As Worksheet
Dim p As Object, t As Double, l As Double, w As Double, h As Double
Dim PictureFileName As String, LookFor As String, sAddress As String
For Each ws In Worksheets
jPeg = ".jpg"
sAddress = ws.Cells.Find(jPeg, , , , xlPart, False).Address
Do While sAddress <> ""
LookFor = ws.Range(sAddress).Value
PictureFileName = "http://webserver/approot/baseapp/" & LookFor
Set p = ActiveSheet.Pictures.Insert(PictureFileName)
With ws.Range(sAddress)
t = .Top
l = .Left
If CenterH Then
w = .Offset(0, 1).Left - .Left
l = l + w / 2 - p.Width / 2
If l < 1 Then l = 1
End If
If CenterV Then
h = .Offset(1, 0).Top - .Top
t = t + h / 2 - p.Height / 2
If t < 1 Then t = 1
End If
.Value = ""
End With
' position picture
With p
.Top = t + 2
.Left = l + 9
End With
sAddress = ""
sAddress = ws.Cells.Find(jPeg, , , xlPart, , xlNext, False).Address
Loop
Next
End Sub